udmono models (UD 2.18)
Models for udmono: raw text in, CoNLL-U out. One model per Universal Dependencies treebank does sentence splitting, tokenization, multiword-token expansion, UPOS/XPOS/FEATS, lemmas and dependency trees.
- 3 treebanks, 3 languages, UD 2.18.
- Every treebank is a small pack (~170 MB: LoRA adapters + heads) on one shared base encoder, FacebookAI/xlm-roberta-large (downloaded once). Any number of treebanks can be loaded at once, and switching between them is instant.
- Packs are downloaded on first use; only the treebanks you ask for are fetched.
Usage
pip install udmono
udmono parse -t fi_tdt input.txt -o output.conllu
udmono list
from udmono import Pipeline
nlp = Pipeline("fi_tdt")
doc = nlp("Your text here.")
print(doc.conllu)
Treebanks are selected by UD treebank code (fi_tdt), the prefix of the treebank's file names. See the table below
and the UD website for what each treebank contains.
Treebanks and test scores
The scores are on the UD 2.18 test sets, with raw text in: the model does its own sentence splitting and tokenization. Scored with the official CoNLL 2018 evaluation script (F1).
| Treebank | Language | Treebank license | Train sents | Tokens | Sentences | UPOS | UFeats | Lemmas | LAS | MLAS | BLEX |
|---|---|---|---|---|---|---|---|---|---|---|---|
en_ewt |
English | CC BY-SA 4.0 | 12544 | 99.75 | 94.59 | 97.95 | 98.32 | 98.03 | 93.22 | 88.79 | 89.14 |
fi_tdt |
Finnish | CC BY-SA 4.0 | 12217 | 99.85 | 98.39 | 98.50 | 97.46 | 97.09 | 93.96 | 89.47 | 89.80 |
fr_gsd |
French | CC BY-SA 4.0 | 14450 | 99.91 | 97.24 | 98.56 | 98.57 | 98.95 | 94.73 | 90.17 | 91.13 |
Licenses
The models are released under the Apache License 2.0. Our position is that a trained model does not inherit the
license of its training data. Each pack is trained on one UD treebank, and the treebanks come under various licenses
(the Treebank license column, from each treebank's README), some of them non-commercial (CC BY-NC-*). If you use
the models commercially, establish for yourself that your use is compatible with the license of the treebank the
model was trained on. The base encoder (FacebookAI/xlm-roberta-large) is MIT-licensed.
Training
One recipe for every treebank, with no per-treebank tuning:
- a LoRA adapter (r = 32) for the segmenter and one for the parser on the frozen XLM-R-large;
- checkpoints selected on the dev set (carved from train where a treebank has no dev split; test is never used).
Details are in the code repository: docs/ARCHITECTURE.md, docs/REPRODUCE.md, docs/EVALUATION.md.
Citation
TBA.
Model tree for TurkuNLP/udmono-models
Base model
FacebookAI/xlm-roberta-large