• Stars
    star
    159
  • Rank 229,316 (Top 5 %)
  • Language
    Python
  • License
    Other
  • Created almost 7 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums. This repository is used for developing a production version of the system, based on ideas from the initial prototype.

DOI License CI/CD codecov Code Climate Scrutinizer Code Quality codebeat badge CodeQL Quality Gate Status docs Code style: black

Annif is an automated subject indexing toolkit. It was originally created as a statistical automated indexing tool that used metadata from the Finna.fi discovery interface as a training corpus.

This repo contains a rewritten production version of Annif based on the prototype. It is a work in progress, but already functional for many common tasks.

Finto AI is a service based on Annif; see the source code for Finto AI.

Basic install

Annif 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.

You will need Python 3.8+ to install Annif.

The recommended way is to install Annif from PyPI into a virtual environment.

python3 -m venv annif-venv
source annif-venv/bin/activate
pip install annif

You will also need NLTK data files:

python -m nltk.downloader punkt

Start up the application:

annif

See Getting Started in the wiki for more details.

Shell compeletions

Annif supports tab-key completion in bash, zsh and fish shells for commands and options and project id, vocabulary id and path parameters.

To enable the completion support in your current terminal session use annif completion command with the option according to your shell to produce the completion script and source it. For example, run

source <(annif completion --bash)

To enable the completion support in all new sessions first add the completion script in your home directory:

annif completion --bash > ~/.annif-complete.bash

Then make the script to be automatically sourced for new terminal sessions by adding the following to your ~/.bashrc file (or in some alternative startup file):

source ~/.annif-complete.bash

For details and usage for other shells see Click documentation.

Docker install

You can use Annif as a pre-built Docker container. Please see the wiki documentation for details.

Development install

A development version of Annif can be installed by cloning the GitHub repository. Poetry is used for managing dependencies and virtual environment for the development version.

See CONTRIBUTING.md for information on unit tests, code style, development flow etc. details that are useful when participating in Annif development.

Installation and setup

Clone the repository.

Switch into the repository directory.

Install pipx and Poetry if you don't have them. First pipx:

python3 -m pip install --user pipx
python3 -m pipx ensurepath

Open a new shell, and then install Poetry:

pipx install poetry

Poetry can be installed also without pipx: check the Poetry documentation.

Create a virtual environment and install dependencies:

poetry install

By 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.

Enter the virtual environment:

poetry shell

You will also need NLTK data files:

python -m nltk.downloader punkt

Start up the application:

annif

Getting help

Many resources are available:

Publications / How to cite

Two articles about Annif have been published in peer-reviewed Open Access journals. The software itself is also archived on Zenodo and has a citable DOI.

Citing the software itself

See "Cite this repository" in the details of the repository.

Annif articles

  • Suominen, O.; Inkinen, J.; Lehtinen, M., 2022. Annif and Finto AI: Developing and Implementing Automated Subject Indexing. JLIS.It, 13(1), pp. 265–282. URL: https://www.jlis.it/index.php/jlis/article/view/437
    See BibTex
    @article{suominen2022annif,
      title={Annif and Finto AI: Developing and Implementing Automated Subject Indexing},
      author={Suominen, Osma and Inkinen, Juho and Lehtinen, Mona},
      journal={JLIS.it},
      volume={13},
      number={1},
      pages={265--282},
      year={2022},
      doi = {10.4403/jlis.it-12740},
      url={https://www.jlis.it/index.php/jlis/article/view/437},
    }
    
  • Suominen, O.; Koskenniemi, I, 2022. Annif Analyzer Shootout: Comparing text lemmatization methods for automated subject indexing. Code4Lib Journal, (54). URL: https://journal.code4lib.org/articles/16719
    See BibTex
    @article{suominen2022analyzer,
      title={Annif Analyzer Shootout: Comparing text lemmatization methods for automated subject indexing},
      author={Suominen, Osma and Koskenniemi, Ilkka},
      journal={Code4Lib J.},
      number={54},
      year={2022},
      url={https://journal.code4lib.org/articles/16719},
    }
    
  • Suominen, O., 2019. Annif: DIY automated subject indexing using multiple algorithms. LIBER Quarterly, 29(1), pp.1–25. DOI: https://doi.org/10.18352/lq.10285
    See BibTex
    @article{suominen2019annif,
      title={Annif: DIY automated subject indexing using multiple algorithms},
      author={Suominen, Osma},
      journal={{LIBER} Quarterly},
      volume={29},
      number={1},
      pages={1--25},
      year={2019},
      doi = {10.18352/lq.10285},
      url = {https://doi.org/10.18352/lq.10285}
    }
    

License

The code in this repository is licensed under Apache License 2.0, except for the dependencies included under annif/static/css and annif/static/js, which have their own licenses, see the file headers for details. Please note that the YAKE library is licended under GPLv3, while Annif is licensed under the Apache License 2.0. The licenses are compatible, but depending on legal interpretation, the terms of the GPLv3 (for example the requirement to publish corresponding source code when publishing an executable application) may be considered to apply to the whole of Annif+Yake if you decide to install the optional Yake dependency.

More Repositories

1

Skosmos

Thesaurus and controlled vocabulary browser using SKOS and SPARQL
PHP
209
star
2

Skosify

Validate, convert and improve SKOS vocabularies
Python
51
star
3

RecordManager

A metadata record management system written in PHP, intended to be used in conjunction with VuFind or another Solr-based discovery interface. Provides import, export, harvesting (OAI-PMH), normalization, deduplication and Solr index update functionality with support for multiple metadata formats. Also includes an OAI-PMH provider that can be used to access the data stored in RecordManager database. Functionality driven by simple command line programs for easy automation.
PHP
43
star
4

Annif-tutorial

Instructions, exercises and example data sets for Annif hands-on tutorial
Jupyter Notebook
34
star
5

bib-rdf-pipeline

Scripts and configuration for converting MARC bibliographic records into RDF
Shell
29
star
6

Finto-data

Vocabulary data and tools for the Finto service
Python
16
star
7

loglevel-message-prefix

β›” [NOT MAINTAINED] Plugin for loglevel which allows defining prefixes for log messages
JavaScript
15
star
8

sru-client-js

SRU Javascript client library
JavaScript
7
star
9

Finto-suggestions

Finto-suggestions
Vue
7
star
10

Annif-corpora

Document and subject corpus collection for use in testing Annif subject indexing tool
7
star
11

bib-lod-ui

Web app for publishing bibliographic Linked Open Data as HTML pages and RDF serializations
Python
6
star
12

melinda-oai-pmh-provider

Melinda OAI-PMH provider
JavaScript
6
star
13

mauiservice

REST microservice wrapper for Maui automated indexing tool
Java
6
star
14

koha-plugin-rest-di

REST API plugin for Koha to provide additional functionality for discovery interfaces such as VuFind
Perl
6
star
15

usemarcon

Rule-based MARC record manipulation program and library
C++
5
star
16

marc-record-serializers

Convert records to and from different MARC formats
JavaScript
5
star
17

json-similarity

β›” [DEPRECATED] Compute similarity of JSON objects with tests that yield points
JavaScript
4
star
18

MARC21ToISNIAtomPub

A tool to transform MARC21 files from MARC21 format into ISNI AtomPub requests.
Python
4
star
19

FintoAI

Finto AI suggests subjects for a given text. It's based on Annif, a tool for automated subject indexing.
JavaScript
4
star
20

qvain-api

Qvain backend
Go
4
star
21

marc-record-js

MARC record implementation in JavaScript
JavaScript
4
star
22

passport-atlassian-crowd-js

Passport strategy for Atlassian Crowd
JavaScript
4
star
23

Skosmos-widget-suggestions

Skosmos plugin for making suggestions for new concepts
Vue
4
star
24

marc-record-merge-js

A configurable Javascript module for merging MARC records
JavaScript
3
star
25

Finto-suggestio

System for suggesting new concepts for vocabularies
JavaScript
3
star
26

ocrui-frontend

HTML
3
star
27

qvain-js

Qvain frontend
JavaScript
3
star
28

finna-solr

XSLT
2
star
29

oracledb-mock-js

A mock for oracledb Node.js module
JavaScript
2
star
30

ntp-model

An element set plan for an Integrated Authority Service for Persons and Organizations
HTML
2
star
31

Annif-client

Python client library for accessing Annif REST API
Python
2
star
32

Finna-client

Python client library for accessing Finna REST API
Python
2
star
33

Skosmos-client

Python client library for accessing Skosmos REST API
Python
2
star
34

lkd

HTML
2
star
35

loglevel-message-buffer

β›” [NOT MAINTAINED] Plugin for loglevel which allows buffering of log messages
JavaScript
2
star
36

oai-pmh-client-js

OAI-PMH Javascript client library
JavaScript
2
star
37

oai-pmh-server

β›” [DEPRECATED] Modular OAI-PMH server
JavaScript
2
star
38

MARC-File-MARCXML

MARCXML implementation for MARC records
Perl
2
star
39

marc-record-similarity

β›” [DEPRECATED] Checks the similarity of 2 marc records using neural network
JavaScript
2
star
40

yso-marcbib

Python
2
star
41

SolrPlugins

Solr plugins
Java
2
star
42

Skosmos-widget-finna

JavaScript
2
star
43

melinda-record-import-harvester-publication-archives

Publication archives record harvester for the Melinda record batch import system
JavaScript
2
star
44

melinda-marc-record-utils

Utility functions for dealing with MARC records
JavaScript
2
star
45

digitalia-notebook

Jupyter Notebook
2
star
46

Discourse-Crowd

PHP
1
star
47

openwayback-overlay-example

An overlay example for OpenWayback
Java
1
star
48

CustomDimensionsManager

Console plugin for synchronization of custom dimensions configuration between Matomo sites
PHP
1
star
49

rundeck-job-proxy

Proxy server for Rundeck job executions. Converts the request's JSON payload to job arguments (e.g. Gitlab & Github)
JavaScript
1
star
50

melinda-record-import

Melinda record batch import system
1
star
51

ansible-role-koha

Jinja
1
star
52

marc-record-validate

Validate and fix MARC records
JavaScript
1
star
53

skosmos-widget-finaf

skosmos-widget
JavaScript
1
star
54

Finto-test

finto test repo
1
star
55

koha-plugin-rest-biblios

Perl
1
star
56

docker-rabbitmq-backup

Docker image for dumping data from rabbitmq containers
Shell
1
star
57

MARC-Record-AutoPunct

Perl
1
star
58

NDL-VuFind-Solr

Solr 6 for NDL-VuFind2 (Finna 2 based on VuFind)
XSLT
1
star
59

melinda-rest-api

Melinda REST API documentation
1
star
60

mets-viewer

JavaScript
1
star
61

loglevel-std-streams

β›” [NOT MAINTAINED] Plugin for loglevel which sends all messages to stderr on Node.js
JavaScript
1
star
62

sfs-4900

Transliteration of cyrillic to latin according to Finnish standard SFS 4900
JavaScript
1
star
63

voyager-batchcat-edge-cs

C# API for Voyager BatchCat DLL to use with Edge.js
C#
1
star
64

marc-record-validators-melinda

Melinda-related validators for marc-record-validate
JavaScript
1
star
65

rundeck-git-retriever-plugin

A plugin for Rundeck that retrieves Git repositories for use in jobs.
Python
1
star
66

docker-sftpd

Docker image for OpenSSH SFTPD server
Dockerfile
1
star
67

Skosmos-widget-hero

JavaScript
1
star
68

melinda-poistot

UI for removing references to local libraries from Melinda
JavaScript
1
star
69

docker-shibboleth-sp

Shibboleth service provider multi-container Docker images
Dockerfile
1
star
70

Skosmos-widget-wiki

CSS
1
star
71

xmlhttprequest-mock

Mock for XMLHttpRequest that works both in Browser and Node.js and can override globals
JavaScript
1
star
72

melinda-merge

UI for merging MARC records in Melinda
JavaScript
1
star