Annif

Latest version: v1.2.0

Safety actively analyzes 682334 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 8

5.2.2

651 Upgrade TensorFlow to version 2.11.*

3.6.1

646 Use axios in web UI; remove jQuery

1.2.0

This release introduces language detection capabilities in the REST API and CLI, improves :hugs: Hugging Face Hub integration, and also includes the usual maintenance work and minor bug fixes.

The new REST API endpoint `/v1/detect-language` expects POST requests that contain a JSON object with the text whose language is to be analyzed and a list of candidate languages. Similarly, the CLI has a new command `annif detect-language`. Annif projects are typically language specific, so a text of a given language needs to be processed with a project intended for that language; the language detection feature can help in this. For details see this [Wiki page](https://github.com/NatLibFi/Annif/wiki/Language-detection). The language detection is performed with the Simplemma library by adbar et al.

The `annif download` command has a new `--trust-repo` option, which needs to be used if the repository to download from has not been used previously (that is if the repository does not appear in the local Hugging Face Hub cache). This option is introduced to raise awareness of the risks of downloading projects from the internet; the project downloads should only be done from trusted sources. For more information see the [Hugging Face Hub documentation](https://huggingface.co/docs/hub/en/security-pickle).

This release also includes automation of downloading the NLTK datapackage used for tokenization to simplify Annif installation. Maintenance tasks include upgrading dependencies, including a new version of Simplemma that allows better control over memory usage. The bug fixes include restoring the `--host` option of the `annif run` command.

Python 3.12 is now fully supported (previously NN-ensemble and STWFSA backends were not supported on Python 3.12).

Supported Python versions:
* 3.9, 3.10,. 3.11 and 3.12

Backward compatibility:
* NN ensemble projects trained with Annif v1.1 or older need to be retrained.
* For other projects, the warnings by SciKit-learn are harmless.

Enhancements
659/799/800/801/802 Language detection in REST API and CLI
779 Python 3.12 support
790/793 Automatically add metadata to Hugging Face Hub repos when uploading projects
809 Make field widths variable in the projects list of the Hugging Face Hub Model Card
803 Automate NLTK datapackage `punkt_tab` download
807 Add `--trust-repo` option to `download` CLI command

Maintenance
724 Upgrade Simplemma & limit its memory usage
796 Update dependencies for 1.2 release
797/811 Bump the github-actions versions
805 Upgrade Docker baseimage to Python 3.12

Bug fixes
788 Add `--host` option to `annif run` (credit: dwinston)
792 Fix limit parameter not passed to requests by HTTP backend
808 Fix missing Hugging Face Hub token from preupload_lfs_files() parameters

1.1.0

This release introduces CLI commands to share projects via Hugging Face Hub, takes care of various maintenance tasks and fixes minor bugs.

The [🤗 Hugging Face Hub](https://huggingface.co/) intends to facilitate the sharing of AI models and datasets, and now Annif CLI includes `upload` and `download` commands, which can be used to push and pull a set of selected projects and vocabularies to and from a Hugging Face Hub repository. In this release these commands are regarded experimental; there can be changes in them in the future. See [this Wiki page](https://github.com/NatLibFi/Annif/wiki/Hugging-Face-Hub-integration) for more information about the commands. See also [this Hugging Face Hub collection](https://huggingface.co/collections/NatLibFi/annif-models-65b35fb98b7c508c8e8a1570) which contains the projects served at Finto AI.

Connexion dependency is upgraded to Connexion 3. From now on, when running Annif with Gunicorn, it is required to use Uvicorn workers; the workers can be set using the option `--worker-class uvicorn.workers.UvicornWorker`, see [Connexion 3 documentation](https://connexion.readthedocs.io/en/3.0.6/v3.html#running-the-application) for more details. However, Docker image users do not have to add this option because an enviroment variable in the Docker image sets the worker-class. Two changes due to the upgrade to Connexion 3 relate to the REST API:
- the header `Access-Control-Allow-Origin: *` is now included in the response only if there's an Origin header in the request, whereas before that header was sent if the Origin header was not present in the request,
- the URL `/v1/projects/` used to give a 404 response, but now it redirects to the correct URL `/v1/projects`.

Support for Python 3.8 is removed. Python 3.12 is supported except for NN-ensemble and STWFSA backends.

It is now possible to select the projects that Annif loads on startup using the environment variable `ANNIF_PROJECTS_INIT`, which can be useful in container environments as this allows distributing resource demand across multiple Annif processes.


**Supported Python versions**
* 3.9, 3.10 and 3.11 are fully supported
* 3.12 is supported except NN-ensemble and STWFSA backends

**Backward compatibility**
* NN ensemble projects trained with Annif v1.0 or older need to be retrained; for other projects the warnings by SciKit-learn are harmless
* When using Annif with Gunicorn HTTP server the worker class needs to be set to Uvicorn with the option `--worker-class uvicorn.workers.UvicornWorker`

**Enhancements**
762/760 Implement `annif upload` and `annif download` commands for Hugging Face Hub integration
774/733 Allow loading selected projects using environment variable
736 Optimization: load a vocabulary only once even if used in different languages
745 Show Annif version in WebUI
751 Create [`SECURITY.md`](https://github.com/NatLibFi/Annif/blob/main/SECURITY.md)

**Maintenance**
702/689/698 Upgrade to Connexion3
780 Add partial Python 3.12 support
770 Drop Python 3.8 support
771/786 Update dependencies for v1.1 release
739 Harden GitHub Actions
781 Make Dependabot group GitHub Actions updates into one PR
740-744/750/757/758/763-766/783 Upgrade GitHub Actions

**Bug fixes**
784/785 Add informational error message for failed loading of nn-ensemble model
732 Fix: Add missing completion command to commands list in RTD
773 Fix blocked http-request for version number on https site
778 Fix project data files detection
752 Fix tests error due to pinned Schemathesis version 3.19.* / Docker rebuild
759 Fix installation on Python 3.8 due to missing Tensorflow-io wheel
767 Fix tests and Docker rebuild due to defunct Schemathesis and pytest dependencies resolution
768 Fix ReadTheDocs builds by upgrading docs build dependencies

1.0.2

This is a patch release that fixes bugs arisen after the Annif 1.0.1 release.

Bugs fixed:
759 Fix installation on Python 3.8 due to missing Tensorflow-io wheel
767 Fix tests and Docker rebuild due to defunct Schemathesis and pytest dependencies resolution

1.0.1

This is a patch release that fixes a bug arisen after Annif 1.0 release.

The bug affected only running unit tests, but the side-effect was that it also prevented rebuilding the Docker image of version 1.0.

Bugs fixed:
747/752 Tests error due to pinned schemathesis version 3.19.* / Docker rebuild fails

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.