Skip to main content
Home

NLP enrichment of text lines (UDPipe 2, NameTag 3, flexiconv's TEITOK) - ATRIUM

Adds linguistic annotation and named entities to the text lines of Czech archival documents. The lines go to the LINDAT UDPipe 2 service, with its Czech model, for tokens, lemmas, part-of-speech tags, morphological features and dependency syntax, and to the NameTag 3 service, with its general multilingual model, for named entities such as people, places and organisations. The main output is TEITOK XML, the TEI-based format of the TEITOK corpus platform, in which every word keeps its place on the page when a layout is known. CoNLL-U files, entity tables per page and per document and a collection summary (CSV) are written beside it.

The input is the ATRIUM document record, whose lines are the text and whose line boxes are the layout: each word's position is estimated within its line. For research and batch use it also reads line tables (CSV or XLSX with a text column), plain text, ALTO files with the word positions the OCR recorded, and documents converted into TEITOK with flexiconv on the command line (PDF, office files, PAGE XML, hOCR). Lines that OCR post-processing categorised as illegible or empty are left out of a record; in a table, illegible lines are left out on request.

Command-line pipeline, or REST API container image (ghcr.io/ufal/atrium-nlp-enrich-api): /enrich, /enrich_text and background /jobs; /rescale fits the word boxes to page images of another size, and /project_record copies a finished record's page categories and keywords into the TEITOK header. Both read the inputs with the same code, and every run records its provenance (paradata). Keywords are extracted by a separate tool, ATRIUM keyword extraction.

In the ATRIUM pipeline it follows the OCR post-processor: it reads the ATRIUM document record, adds each line's lemma, part of speech and features and the record's named entities, and writes the TEITOK file, which AMČR stores beside the record. Keyword extraction then reads the same record. Until the terms of LINDAT's services are settled, AMČR does not publish the outputs made through them. The record and who writes what in it: the document contract.

The code is MIT.

ComponentLicence or termsUsed when
LINDAT UDPipe 2 and NameTag 3 servicesLINDAT Terms of UseEvery run, unless other instances of the services are configured.
UDPipe 2 model (Czech PDT, UD 2.15); NameTag 3 models (multilingual OntoNotes by default, Czech CNEC 2.0 optional)CC BY-NC-SA 4.0Every run, through the services.
UDPipe 2 and NameTag 3 enginesMPL 2.0The software behind the services.
flexiconv (optional)MITOnly when documents are converted to TEITOK, on the command line.

How the models' licence and the services' terms bear on the annotations is an open question with LINDAT. 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