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

lat

LASLA-ENC

biblissima-textes/papie-latin#morph

Thibault Clérice

link

fro

fro

Ancien Francais (ENC)

biblissima-textes/papie-french#old-morph

Jean-Baptiste Camps, Ariane Pinche, Thibault Clérice, Frédéric Duval, Lucence Ing, Naomi KANAOKA

link

frm

frm

Moyen Français (ENC)

biblissima-textes/papie-french#middle-morph

Dugaz, Lucien, Ing, Lucence, Vidal-Gorène, Chahan, Duval, Frédéric

link

freem

freem

Early Modern French

biblissima-textes/papie-legacy#freem/*

Simon Gabay, Jean-Baptiste Camps, Thibault Clérice, Jean-Baptiste Tanguy, Matthias Gille-Levenson, Florian Cafiero

link

grc

grc

Ancient Greek

biblissima-textes/papie-greek#gold

Thibault Clérice, Oriane Nédey, Rachel Bawden, Benoît Sagot

link

grc_grecy

grc

Ancient Greek (GreCy)

grc_perseus_trf

Jacobo Myerston

link

grc_soter

grc

Ancient Greek (Sôtêr + GreCy)

Zual/soter-mini, grc_perseus_sm

Zual (Sôtêr), Jacobo Myerston (GreCy)

link

dum

dum

Middle Dutch

biblissima-textes/papie-legacy#dum/*

Mike Kestemont

link

occ_cont

occ_cont

OccitanContemporain

biblissima-textes/papie-legacy#occ_cont/*

Oriane Nédey, Juliette Janès

link

osp

osp

Old Castilian (dummy models)

biblissima-textes/papie-legacy#osp/*

Thibault Clérice

link

hy_hye

hye

Eastern Armenian

biblissima-textes/papie-legacy#hy_hye/*

Chahan Vidal-Gorène, Nadi Tomeh, Victoria Khurshudyan

link

hy_hyw

hyw

Western Armenian

biblissima-textes/papie-legacy#hy_hyw/*

Chahan Vidal-Gorène, Nadi Tomeh, Victoria Khurshudyan

link

hy_xcl

xcl

Classical Armenian

biblissima-textes/papie-legacy#hy_xcl/*

Chahan Vidal-Gorène, Nadi Tomeh, Victoria Khurshudyan

link

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

pie-extended download (from Hugging Face)

pie-extended install-addons

More

lasla

the model

nothing

fro

the model

nothing

frm

the model

nothing

freem

the model

nothing

grc

the model

nothing

lemma (LSJ headwords) and universal POS only

dum

the lemmatizer (the POS model was not converted)

nothing

occ_cont

the model

nothing

osp

the model

nothing

placeholder models

hy_hye

the model

nothing

hy_hyw

the model

nothing

hy_xcl

the pack of 15 networks

downloads the treebank (about 13 MB, and an internet connection) and learns the clitics: keeps 160 KB

grc_soter

nothing

installs grc_perseus_sm (43 MB) and fetches Sôtêr (7.5 MB, from Hugging Face)

pip install "pie-extended[soter]": transformers, spaCy and GreCy

grc_grecy

nothing

installs the spaCy pipeline (grc_perseus_trf: 476 MB; the small ones: 43 MB)

pip install "pie-extended[grecy]": spaCy, spacy-transformers (for a transformer pipeline) and GreCy

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): token is your spelling, treated what the model saw.

  • Enclitics (-que, -ne, -ue…) are split: uirumque gives two lines.

  • Homographs are disambiguated with lexicons (sum1, qui1), that are downloaded with the model. The Dis column tells how a decision was taken. If you ask for columns without lemma, 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.

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 (Միթե, ՞). SpaceAfter is No for 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).