Skip to main content
Home

Keyword extraction from archival documents (statistical and vocabulary-controlled) - ATRIUM

Finds keywords in archival documents, of two kinds that are kept apart and have different outputs.

Statistical keywords characterise a document and each of its pages: KeyBERT (embedding-based, the default), YAKE, or a legacy lemma-frequency method named after ÚFAL's KER. Each keyword carries the method that produced it, its score and its rank; scores compare only within one method. The REST API and the command line read the same inputs with the same code: the ATRIUM document record, plain text, the CoNLL-U or TEITOK files of ATRIUM NLP enrichment, or a line table (CSV). Lines that OCR post-processing categorised as illegible or empty are left out. The keywords are added to the record; the batch command line also writes CSV tables per document and per page.

Vocabulary-controlled keywords are experimental and not yet evaluated. For each text line, a large language model whose output is constrained to the vocabulary's terms chooses the term of the AMČR keyword lists or the TEATER thesaurus that describes the line. It gives the Czech keywords found in the line with their English translations, a confidence value and the identifiers of the vocabulary records behind the term. The REST API runs this kind through a model service the deployment configures (OpenRouter or Ollama) and adds the result to the record, apart from the statistical keywords. A batch job with a locally hosted model on a GPU remains for research runs. Each release publishes the vocabulary it uses, CC0.

Container images for the REST API (ghcr.io/ufal/atrium-keyword-extract-api: /extract_keywords, /extract_keywords_text), the batch command line and the GPU research batch. A kind that fails fails the whole call: nothing partial is returned. Every run records its provenance (paradata). The tool continues the keyword extraction of atrium-nlp-enrich and atrium-llm-enrich.

In the ATRIUM pipeline it is the last enrichment step: it reads the ATRIUM document record that the NLP enrichment leaves and writes its keywords and its vocabulary terms into two separate blocks, linking named entities that are vocabulary terms to their AMČR identifiers. The vocabulary-controlled kind runs only where a model service is configured. The vocabulary of each release also gives the ATRIUM translator its protected terms. The record and who writes what in it: the document contract.

The code is MIT.

ComponentLicence or termsUsed when
Legacy method (lemma frequency)MIT, part of the codemethod=legacy.
KeyBERT; sentence-transformers; embedding model (paraphrase-multilingual-MiniLM-L12-v2)MIT; Apache-2.0; Apache-2.0method=keybert, the default.
YAKEAGPL-3.0Only method=yake.
AMČR keyword lists, TEATER thesaurusCC0The vocabulary of the controlled keywords.
Language model, self-hosted or through a provider's APIThe model's licence; the provider's termsOnly the controlled keywords, once a deployment configures a model. The paradata records the model's id.

Each run lists the components it used, each with its own licence or terms. None of these is the licence of the output: the rights in an output depend first on the source document, and only their holder can state them (Licences and paradata).

European Union flag

The SSH Open Marketplace is maintained and will be further developed by three European Research Infrastructures - DARIAH, CLARIN and CESSDA - and their national partners. It was developed as part of the "Social Sciences and Humanities Open Cloud" SSHOC project, European Union's Horizon 2020 project call H2020-INFRAEOSC-04-2018, grant agreement #823782.

CESSDACLARINDARIAH-EU