papie · lemmatization and tagging for historical languages
papie is a PyTorch-Lightning library for lemmatization and tagging of historical languages. It is the next major version of PaPie (0.x), a fork of Pie, [PaPie / Pie; Manjavacas et al. 2019] : words are embedded at character level, a sentence encoder adds context, and each task (lemma, POS, morphology) has its own decoder. Training, evaluation and checkpointing run through the Lightning CLI. Nothing in the library is tied to a language: the inputs are plain TSV, the encoders work on characters or bytes, and the reported experiments (Latin so far; Occitan, Old French and Middle French to follow) are examples, not limits.
What it offers
- Several lemma decoders — attentional, copy/pointer, Levenshtein edit, masked non-autoregressive, T5. → Architecture
- Pluggable source encoders, including a frozen ByT5 and a tiny byte-level T5 encoder you can distil yourself. → T5 approach
- Candidate features from a dictionary or an analyzer such as Collatinus. → Candidate features
- Fast CPU inference: INT8 quantization, a char cache, and a benchmarking command. → CPU inference
- Benchmarks per language (Latin first), including a comparison with the published LASLA models. → Benchmark
Start with Getting started.
Citation
If you use papie, please cite:
Oriane Nédey, Rachel Bawden, Benoît Sagot and Thibault Clérice. 2026. papie: lemmatization and tagging for historical languages (software).
@software{nedey_papie,
author = {N{\'e}dey, Oriane and Bawden, Rachel and Sagot, Beno{\^i}t and Cl{\'e}rice, Thibault},
title = {papie: lemmatization and tagging for historical languages},
year = {2026},
note = {Software}
}