Models¶
The table is generated from the code of the package, so it always lists the models of this version. Runs is the model of Hugging Face (or the spaCy pipeline, or Sôtêr) that the model runs: you can also use it by that name. Each model has a More link to its documentation or its publication: please cite it when you use it (see Citation).
Model |
Language |
Name |
Runs |
Authors |
More |
|---|---|---|---|---|---|
|
|
LASLA-ENC |
|
Thibault Clérice |
|
|
|
Ancien Francais (ENC) |
|
Jean-Baptiste Camps, Ariane Pinche, Thibault Clérice, Frédéric Duval, Lucence Ing, Naomi KANAOKA |
|
|
|
Moyen Français (ENC) |
|
Dugaz, Lucien, Ing, Lucence, Vidal-Gorène, Chahan, Duval, Frédéric |
|
|
|
Early Modern French |
|
Simon Gabay, Jean-Baptiste Camps, Thibault Clérice, Jean-Baptiste Tanguy, Matthias Gille-Levenson, Florian Cafiero |
|
|
|
Ancient Greek |
|
Thibault Clérice, Oriane Nédey, Rachel Bawden, Benoît Sagot |
|
|
|
Ancient Greek (GreCy) |
|
Jacobo Myerston |
|
|
|
Ancient Greek (Sôtêr + GreCy) |
|
Zual (Sôtêr), Jacobo Myerston (GreCy) |
|
|
|
Middle Dutch |
|
Mike Kestemont |
|
|
|
OccitanContemporain |
|
Oriane Nédey, Juliette Janès |
|
|
|
Old Castilian (dummy models) |
|
Thibault Clérice |
|
|
|
Eastern Armenian |
|
Chahan Vidal-Gorène, Nadi Tomeh, Victoria Khurshudyan |
|
|
|
Western Armenian |
|
Chahan Vidal-Gorène, Nadi Tomeh, Victoria Khurshudyan |
|
|
|
Classical Armenian |
|
Chahan Vidal-Gorène, Nadi Tomeh, Victoria Khurshudyan |
Every model is a model of Hugging Face, and the code that tokenizes the text and builds the output. Installation tells how to download them, and Implement things how to add yours.
What each model needs¶
Every model needs the package (Installation) and a recent PyTorch (it comes with PaPie). A GPU is optional
(--device cuda). What differs is what has to be downloaded or installed for the model, and how much room it takes
on the disk (in downloads/, or in PIE_EXTENDED_DOWNLOADS). The sizes are the ones of the downloads when this was
written, rounded:
Model |
|
|
More |
|---|---|---|---|
|
the model |
nothing |
|
|
the model |
nothing |
|
|
the model |
nothing |
|
|
the model |
nothing |
|
|
the model |
nothing |
lemma (LSJ headwords) and universal POS only |
|
the lemmatizer (the POS model was not converted) |
nothing |
|
|
the model |
nothing |
|
|
the model |
nothing |
placeholder models |
|
the model |
nothing |
|
|
the model |
nothing |
|
|
the pack of 15 networks |
downloads the treebank (about 13 MB, and an internet connection) and learns the clitics: keeps 160 KB |
|
|
nothing |
installs |
|
|
nothing |
installs the spaCy pipeline ( |
|
A model of PaPie 1.0 has one head for each task: asking for fewer columns with --tasks or --disable-tasks (see
Tagger usage) runs fewer of them, and so needs less time. (The memory was not measured.)
What to know about each model¶
Latin (lasla)¶
Nine Pie models, one per task (lemma, pos, Case, Numb, Gend, Deg, Mood_Tense_Voice, Person, Dis).
The morphological tasks are merged in one morph column.
The text is normalized before tagging (
u/v,i/j, numbers, abbreviations):tokenis your spelling,treatedwhat the model saw.Enclitics (
-que,-ne,-ue…) are split:uirumquegives two lines.Homographs are disambiguated with lexicons (
sum1,qui1), that are downloaded with the model. TheDiscolumn tells how a decision was taken. If you ask for columns withoutlemma, the disambiguation is skipped.
French (fro, frm, freem) and Middle Dutch (dum)¶
Old French (fro), Middle French (frm) and Early Modern French (freem). Their
morphological tasks (MODE, TEMPS, PERS, NOMB, GENRE, CAS, and DEGRE) are merged in morph. fro, frm
and freem share the same post-processing. dum has only lemma and pos and cuts the text on spaces.
Ancient Greek (grc, grc_grecy)¶
grc is biblissima-textes/papie-greek#gold: the lemma aligned to the headwords of the LSJ and the universal POS, nothing else. grc_grecy runs the GreCy spaCy pipelines
instead, by default grc_perseus_trf (the Perseus treebank, with a transformer). Its tasks are lemma, pos, tag
and morph (UD features). Elisions (δι') are kept in their word, and the apostrophe is given to the model as U+02BC,
as GreCy requires: your spelling stays in token.
grc_soter gives the lemma from Sôtêr mini (a lemmatizer of 1.9 million
parameters) and the part of speech from the light pipeline grc_perseus_sm: see Combine engines: a lemmatizer and a spaCy pipeline. The lemma is
better than the one of the pipelines (94.6% against 92.8% and 93.5% on the Perseus treebank) and the part of speech is
8 points worse than the one of the transformer.
To use another pipeline for one run: Tagger usage (
--model_path).To change the pipeline of the model for everybody, or to add a model that runs a spaCy pipeline: Change the pipeline of grc_grecy in Backends.
Occitan (occ_cont) and Old Castilian (osp)¶
occ_cont has a tokenizer for contemporary Occitan. osp is only a proof of concept: its models are placeholders,
do not rely on its output.
Armenian (hy_hye, hy_hyw, hy_xcl)¶
Eastern (hye), Western (hyw) and Classical (xcl) Armenian are the Pie models of Vidal-Gorène, Tomeh and
Khurshudyan (2024), trained on the Universal Dependencies treebanks. There is one
Pie model per task, 25, 30 and 15 of them: --tasks lemma,pos loads only two.
They expect tokenized input like the treebanks, so they share a tokenizer
(ArmenianTokenizer) that does the same:
punctuation (
։ ՝ « » ( ) , ...) and hyphens are tokens of their own;the marks written on a vowel (
Մի՞թե,թե՛) become a token after their word (Միթե,՞).SpaceAfterisNofor the word, since the mark was written inside it;numbers (
1.000) and ellipsis stay in one piece, the Western apostrophe stays on its clitic (կ՚,ուզեմ);sentences end with
։ : ! ? …, not with a dot (initials, abbreviations and numbers).
On the dev sets of the Eastern and Western treebanks, the tokenizer gives exactly the words of the treebank for 99.5% and 99.4% of the sentences.
Classical Armenian: learn the clitics first
The treebank of Classical Armenian makes the clitics words of their own (զմեղս gives զ, մեղս; յանապատին gives
յ, անապատի, ն) and the model expects them cut. No rule can do it (many words begin with զ or end with ն),
so a small model learns where the treebank cuts:
pie-extended install-addons hy_xcl
It downloads the treebank, learns in a few seconds and keeps 160 KB. On the test set of the treebank, the cuts are found with an F1 of 97.3%, and 90% of the sentences have exactly the words of the treebank (13% without it).
The treebank is licensed CC BY-NC-SA 4.0: what is learned stays on your machine, it is not distributed with Pie Extended. Without this step the clitics are not split, and a warning says so.
The Eastern and Western treebanks (CC BY-SA 4.0) are the source of a few example sentences used to test the tokenizer
(tests/data/armenian_ud_sample.json).