NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
197 stars 41 forks source link

Upgrade Simplemma & limit its memory usage #724

Closed osma closed 2 weeks ago

osma commented 1 year ago

This PR upgrades Simplemma to the latest version 1.1.1 and adds some wrapper code to make it possible to use Simplemma language detection with a limit on the number of languages simultaneously loaded into memory. The number of languages is currently hardcoded at 5.

This will enable adding language detection functionality to the REST API in PR #659 , which has not been merged yet due to concerns about memory usage.

codecov[bot] commented 1 year ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.64%. Comparing base (337ee70) to head (61c9409). Report is 8 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #724 +/- ## ======================================= Coverage 99.64% 99.64% ======================================= Files 91 93 +2 Lines 6831 6854 +23 ======================================= + Hits 6807 6830 +23 Misses 24 24 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

juhoinkinen commented 1 month ago

In PR #796 Simplemma is updated to 1.1, so this could be merged after that.

There I already did some neccessary changes to the language detection code: https://github.com/NatLibFi/Annif/pull/796/commits/49d50520ee136dc159538f65bd3f810a0e4efae2

osma commented 3 weeks ago

Rebased on current main and force-pushed.

sonarcloud[bot] commented 3 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud