Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annif: Explore for subject field metadata (epic) #14

Open
9 tasks
hortongn opened this issue Mar 3, 2023 · 2 comments
Open
9 tasks

Annif: Explore for subject field metadata (epic) #14

hortongn opened this issue Mar 3, 2023 · 2 comments

Comments

@hortongn
Copy link
Member

hortongn commented Mar 3, 2023

@hortongn hortongn moved this from Triage to Todo in App Dev AI Project Mar 3, 2023
@scherztc
Copy link

scherztc commented Mar 8, 2023

@hortongn hortongn moved this from Todo to In Progress in App Dev AI Project Mar 9, 2023
@scherztc
Copy link

scherztc commented Mar 16, 2023

How to get ANNIF running locally (Development Install): https://github.com/NatLibFi/Annif/wiki

Note: Must be using python version between 3.8 to 3.10

  1. git clone [email protected]:NatLibFi/Annif.git
  2. Install pipx and Poetry if you don't have them. First pipx:

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

  1. Open a new shell, and then install Poetry:

pipx install poetry

  1. Create a virtual environment and install dependencies:

poetry install --all-extras

  1. Enter the virtual environment:

poetry shell

If you are restarting

  1. You will also need NLTK data files:

python -m nltk.downloader punkt

  1. Copy projects.cfg.dist to projects.cfg

  2. Load Subject Vocabulary

CD to directory above ANNIF
git clone : [email protected]:NatLibFi/Annif-corpora.git

CD into ANNIF directory

annif load-vocab yso ../Annif-corpora/vocab/yso-skos.ttl

  1. We will train the model using the the English language training data generated from Finna.fi metadata:

annif train tfidf-en ../Annif-corpora/training/yso-finna-en.tsv.gz

  1. Start up the application:

annif run

10b. Restarting the application.

You will need to run poetry shell and annif run each time if you exit the poetry shell

  1. Test Document (GUI)

Visit localhost:5000
Copy/Paste Text
Select TF-IDF English
Run

or CLI

cat document.txt | annif suggest tfidf-en

or CLI with folder of documents

annif eval tfidf-en /path/to/documents/

  1. Explore API
    The Swagger UI documentation for the REST API is at http://localhost:5000/v1/ui/

@hortongn hortongn changed the title Explore Annif for subject fields Epic: Explore Annif for subject fields Mar 16, 2023
@hortongn hortongn changed the title Epic: Explore Annif for subject fields Annif: Explore for subject filed metadata (epic) Mar 16, 2023
@hortongn hortongn changed the title Annif: Explore for subject filed metadata (epic) Annif: Explore for subject field metadata (epic) Mar 16, 2023
@hortongn hortongn moved this from In Progress to On Hold / Backlog in App Dev AI Project Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: On Hold / Backlog
Development

No branches or pull requests

2 participants