{"id":21198719,"url":"https://github.com/natlibfi/annif","last_synced_at":"2025-04-04T19:15:22.733Z","repository":{"id":37444418,"uuid":"100936800","full_name":"NatLibFi/Annif","owner":"NatLibFi","description":"Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.","archived":false,"fork":false,"pushed_at":"2024-05-28T16:12:42.000Z","size":8500,"stargazers_count":185,"open_issues_count":69,"forks_count":41,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-05-29T07:21:10.564Z","etag":null,"topics":["annif","annotation-tool","classification","code4lib","connexion","flask-application","glam","machine-learning","multilabel-classification","python","rest-api","subject-indexing","text-classification"],"latest_commit_sha":null,"homepage":"https://annif.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NatLibFi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-21T09:36:52.000Z","updated_at":"2024-05-31T17:08:55.978Z","dependencies_parsed_at":"2023-02-12T22:01:17.748Z","dependency_job_id":"ac70edf2-4848-4f5e-92be-0843f68eb40c","html_url":"https://github.com/NatLibFi/Annif","commit_stats":{"total_commits":2228,"total_committers":20,"mean_commits":111.4,"dds":"0.49955116696588864","last_synced_commit":"6d9938cb425795c214c3ccce3ec27a1596ea9332"},"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FAnnif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FAnnif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FAnnif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NatLibFi%2FAnnif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NatLibFi","download_url":"https://codeload.github.com/NatLibFi/Annif/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234923,"owners_count":20905854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annif","annotation-tool","classification","code4lib","connexion","flask-application","glam","machine-learning","multilabel-classification","python","rest-api","subject-indexing","text-classification"],"created_at":"2024-11-20T19:53:06.267Z","updated_at":"2025-04-04T19:15:22.693Z","avatar_url":"https://github.com/NatLibFi.png","language":"Python","readme":"\u003cimg src=\"https://annif.org/static/img/annif-RGB.svg\" width=\"150\"\u003e\n\n[![DOI](https://zenodo.org/badge/100936800.svg)](https://zenodo.org/badge/latestdoi/100936800)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Container image](https://img.shields.io/badge/container_image-quay.io-blue.svg)](https://quay.io/repository/natlibfi/annif)\n[![CI/CD](https://github.com/NatLibFi/Annif/actions/workflows/cicd.yml/badge.svg)](https://github.com/NatLibFi/Annif/actions/workflows/cicd.yml)\n[![codecov](https://codecov.io/gh/NatLibFi/Annif/branch/main/graph/badge.svg)](https://codecov.io/gh/NatLibFi/Annif)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/NatLibFi/Annif/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/NatLibFi/Annif/?branch=main)\n[![Code Climate](https://codeclimate.com/github/NatLibFi/Annif/badges/gpa.svg)](https://codeclimate.com/github/NatLibFi/Annif)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/NatLibFi/Annif/badge)](https://securityscorecards.dev/viewer/?uri=github.com/NatLibFi/Annif)\n[![codebeat badge](https://codebeat.co/badges/7a8ef539-0094-48b8-84c2-c413b4a50d57)](https://codebeat.co/projects/github-com-natlibfi-annif-main)\n[![CodeQL](https://github.com/NatLibFi/Annif/actions/workflows/codeql.yml/badge.svg)](https://github.com/NatLibFi/Annif/actions/workflows/codeql.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=NatLibFi_Annif\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=NatLibFi_Annif)\n[![docs](https://readthedocs.org/projects/annif/badge/?version=latest)](https://annif.readthedocs.io/en/latest/index.html)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Open in GitHub Codespaces](https://img.shields.io/static/v1?\u0026label=Tutorial+in+Codespaces\u0026message=Open\u0026color=brightgreen\u0026logo=github)](https://codespaces.new/NatLibFi/Annif-tutorial/tree/codespaces)\n\nAnnif is an automated subject indexing toolkit. It was originally created as\na statistical automated indexing tool that used metadata from the\n[Finna.fi](https://finna.fi) discovery interface as a training corpus.\n\nAnnif provides [CLI commands](https://annif.readthedocs.io/en/stable/source/commands.html) for administration, and a [REST API](https://api.annif.org/v1/ui/) and web UI for end-users.\n\n[Finto AI](https://ai.finto.fi/) is a service based on Annif;\nsee a [🤗 Hugging Face Hub collection](https://huggingface.co/collections/NatLibFi/annif-models-65b35fb98b7c508c8e8a1570) of the models that Finto AI uses.\n\nThis repository contains a rewritten production version of Annif based on the\n[prototype](https://github.com/osma/annif).\n\n# Basic install\n\nAnnif is developed and tested on Linux. If you want to run Annif on Windows or Mac OS, the recommended way is to use Docker (see below) or a Linux virtual machine.\n\nYou will need Python 3.9-3.12 to install Annif.\n\nThe recommended way is to install Annif from\n[PyPI](https://pypi.org/project/annif/) into a virtual environment.\n\n    python3 -m venv annif-venv\n    source annif-venv/bin/activate\n    pip install annif\n\nStart up the application:\n\n    annif\n\nSee [Getting Started](https://github.com/NatLibFi/Annif/wiki/Getting-started)\nfor basic usage instructions and\n[Optional features and dependencies](https://github.com/NatLibFi/Annif/wiki/Optional-features-and-dependencies)\nfor installation instructions for e.g. fastText and Omikuji backends and for Voikko and spaCy analyzers.\n\n## Shell compeletions\nAnnif supports tab-key completion in bash, zsh and fish shells for commands and options\nand project id, vocabulary id and path parameters.\n\nTo enable the completion support in your current terminal session use `annif completion`\ncommand with the option according to your shell to produce the completion script and\nsource it. For example, run\n\n    source \u003c(annif completion --bash)\n\nTo enable the completion support in all new sessions first add the completion script in\nyour home directory:\n\n    annif completion --bash \u003e ~/.annif-complete.bash\n\nThen make the script to be automatically sourced for new terminal sessions by adding the\nfollowing to your `~/.bashrc` file (or in some [alternative startup\nfile](https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html)):\n\n    source ~/.annif-complete.bash\n\nFor details and usage for other shells see\n[Click documentation](https://click.palletsprojects.com/en/8.1.x/shell-completion/).\n# Docker install\n\nYou can use Annif as a pre-built Docker container image from [quay.io/natlibfi/annif](https://quay.io/repository/natlibfi/annif) repository. Please see the\n[wiki documentation](https://github.com/NatLibFi/Annif/wiki/Usage-with-Docker)\nfor details.\n\n# Development install\n\nA development version of Annif can be installed by cloning the [GitHub\nrepository](https://github.com/NatLibFi/Annif).\n[Poetry](https://python-poetry.org/) is used for managing dependencies and virtual environment for the development version.\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for information on [unit tests](CONTRIBUTING.md#unit-tests), [code style](CONTRIBUTING.md#code-style), [development flow](CONTRIBUTING.md#development-flow) etc. details that are useful when participating in Annif development.\n\n## Installation and setup\n\nClone the repository.\n\nSwitch into the repository directory.\n\nInstall [pipx](https://pypa.github.io/pipx/) and Poetry if you don't have them. First pipx:\n\n    python3 -m pip install --user pipx\n    python3 -m pipx ensurepath\n\nOpen a new shell, and then install Poetry:\n\n    pipx install poetry\n\nPoetry can be installed also without pipx: check the [Poetry documentation](https://python-poetry.org/docs/master/#installation).\n\nCreate a virtual environment and install dependencies:\n\n    poetry install\n\nBy default development dependencies are included. Use option `-E` to install dependencies for selected optional features (`-E \"extra1 extra2\"` for multiple extras), or install all of them with `--all-extras`. By default the virtual environment directory is not under the project directory, but there is a [setting for selecting this](https://python-poetry.org/docs/configuration/#virtualenvsin-project).\n\nEnter the virtual environment:\n\n    eval $(poetry env activate)\n\nStart up the application:\n\n    annif\n\n# Demo install in Codespaces\nAnnif can be tried out in the [GitHub Codespaces](https://docs.github.com/en/codespaces). Just open a page for configuring a new codespace via the badge below, start the codespace from the green \"Create codespace\" button, and a terminal session will start in your browser with the contents of the [Annif-tutorial](https://github.com/NatLibFi/Annif-tutorial) repository:\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/NatLibFi/Annif-tutorial/tree/codespaces)\n\n# Getting help\n\nMany resources are available:\n\n * [Usage documentation in the wiki](https://github.com/NatLibFi/Annif/wiki)\n * [Annif tutorial](https://github.com/NatLibFi/Annif-tutorial) for learning to use Annif\n * [annif-users](https://groups.google.com/forum/#!forum/annif-users) discussion forum; please use this as a channel for questions instead of personal e-mails to developers\n * [Internal API documentation](https://annif.readthedocs.io) on ReadTheDocs\n * [annif.org](https://annif.org) project web site\n\n# Publications / How to cite\n\nSee below for some articles about Annif in peer-reviewed Open Access\njournals. The software itself is also archived on Zenodo and\nhas a [citable DOI](https://doi.org/10.5281/zenodo.5654173).\n\n## Citing the software itself\n\nSee \"Cite this repository\" in the details of the repository.\n\n## Annif articles\n\u003cul\u003e\n\u003cli\u003e\nGolub, K.; Suominen, O.; Mohammed, A.; Aagaard, H.; Osterman, O, 2024.\nAutomated Dewey Decimal Classification of Swedish library metadata using Annif software.\nJournal of Documentation, in press.\nhttps://doi.org/10.1108/JD-01-2022-0026\n\u003cdetails\u003e\n\u003csummary\u003eSee BibTex\u003c/summary\u003e\n\n    @article{golub2024annif,\n      title={Automated Dewey Decimal Classification of Swedish library metadata using Annif software},\n      author={Golub, Koraljka and Suominen, Osma and Mohammed, Ahmed Taiye and Aagaard, Harriet and Osterman, Olof},\n      journal={J. Doc.},\n      year={in press},\n      doi = {10.1108/JD-01-2022-0026},\n      url={https://www.emerald.com/insight/content/doi/10.1108/JD-01-2022-0026},\n    }\n\u003c/details\u003e\n\u003c/li\u003e\n\u003cli\u003e\nSuominen, O.; Inkinen, J.; Lehtinen, M., 2022.\nAnnif and Finto AI: Developing and Implementing Automated Subject Indexing.\nJLIS.It, 13(1), pp. 265–282. URL:\nhttps://www.jlis.it/index.php/jlis/article/view/437\n\u003cdetails\u003e\n\u003csummary\u003eSee BibTex\u003c/summary\u003e\n\n    @article{suominen2022annif,\n      title={Annif and Finto AI: Developing and Implementing Automated Subject Indexing},\n      author={Suominen, Osma and Inkinen, Juho and Lehtinen, Mona},\n      journal={JLIS.it},\n      volume={13},\n      number={1},\n      pages={265--282},\n      year={2022},\n      doi = {10.4403/jlis.it-12740},\n      url={https://www.jlis.it/index.php/jlis/article/view/437},\n    }\n\u003c/details\u003e\n\u003c/li\u003e\n\u003cli\u003e\nSuominen, O.; Koskenniemi, I, 2022.\nAnnif Analyzer Shootout: Comparing text lemmatization methods for automated subject indexing.\nCode4Lib Journal, (54). URL:\nhttps://journal.code4lib.org/articles/16719\n\u003cdetails\u003e\n\u003csummary\u003eSee BibTex\u003c/summary\u003e\n\n    @article{suominen2022analyzer,\n      title={Annif Analyzer Shootout: Comparing text lemmatization methods for automated subject indexing},\n      author={Suominen, Osma and Koskenniemi, Ilkka},\n      journal={Code4Lib J.},\n      number={54},\n      year={2022},\n      url={https://journal.code4lib.org/articles/16719},\n    }\n\u003c/details\u003e\n\u003c/li\u003e\n\u003cli\u003e\nSuominen, O., 2019. Annif: DIY automated subject indexing using multiple\nalgorithms. LIBER Quarterly, 29(1), pp.1–25. DOI:\nhttps://doi.org/10.18352/lq.10285\n\u003cdetails\u003e\n\u003csummary\u003eSee BibTex\u003c/summary\u003e\n\n    @article{suominen2019annif,\n      title={Annif: DIY automated subject indexing using multiple algorithms},\n      author={Suominen, Osma},\n      journal={{LIBER} Quarterly},\n      volume={29},\n      number={1},\n      pages={1--25},\n      year={2019},\n      doi = {10.18352/lq.10285},\n      url = {https://doi.org/10.18352/lq.10285}\n    }\n\u003c/details\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\n# License\n\nThe code in this repository is licensed under Apache License 2.0, except for\nthe dependencies included under `annif/static/css` and `annif/static/js`,\nwhich have their own licenses; see the file headers for details.\n\nPlease note that the [YAKE](https://github.com/LIAAD/yake) library is\nlicensed under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.txt), while\nAnnif itself is licensed under the Apache License 2.0. It is commonly\naccepted that the GPLv3 and Apache 2.0 licenses are compatible at least in\none direction (GPLv3 is more restrictive than the Apache License); obviously\nit also depends on the legal environment. The Annif developers make no legal\nclaims - we simply provide the software and allow the user to install\noptional extensions if they consider it appropriate. Depending on legal\ninterpretation, the terms of the GPL (for example the requirement to publish\ncorresponding source code when publishing an executable application) may be\nconsidered to apply to the whole of Annif+extensions if you decide to\ninstall the optional YAKE dependency.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlibfi%2Fannif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatlibfi%2Fannif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatlibfi%2Fannif/lists"}