NatLibFi / Annif

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

Allow overriding subject label language in CLI and REST suggest operations #630

Closed osma closed 2 years ago

osma commented 2 years ago

Fixes #628

This PR implements an option --language / -L for the annif suggest command as well as an optional language parameter for the REST API suggest method, both of which allow overriding the language of returned subject labels.

TODO:

codecov[bot] commented 2 years ago

Codecov Report

Base: 99.61% // Head: 99.58% // Decreases project coverage by -0.03% :warning:

Coverage data is based on head (3cfcac8) compared to base (597e67e). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #630 +/- ## ========================================== - Coverage 99.61% 99.58% -0.04% ========================================== Files 87 87 Lines 5945 5990 +45 ========================================== + Hits 5922 5965 +43 - Misses 23 25 +2 ``` | [Impacted Files](https://codecov.io/gh/NatLibFi/Annif/pull/630?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi) | Coverage Δ | | |---|---|---| | [annif/cli.py](https://codecov.io/gh/NatLibFi/Annif/pull/630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi#diff-YW5uaWYvY2xpLnB5) | `99.68% <100.00%> (+<0.01%)` | :arrow_up: | | [annif/rest.py](https://codecov.io/gh/NatLibFi/Annif/pull/630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi#diff-YW5uaWYvcmVzdC5weQ==) | `96.22% <100.00%> (-3.78%)` | :arrow_down: | | [tests/test\_cli.py](https://codecov.io/gh/NatLibFi/Annif/pull/630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi#diff-dGVzdHMvdGVzdF9jbGkucHk=) | `100.00% <100.00%> (ø)` | | | [tests/test\_rest.py](https://codecov.io/gh/NatLibFi/Annif/pull/630/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi#diff-dGVzdHMvdGVzdF9yZXN0LnB5) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

sonarcloud[bot] commented 2 years 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 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication