NeoLatiNER

NeoLatiNER is an XLM-RoBERTa-large model fine-tuned for named-entity recognition in OCR-derived Early Modern Latin texts about natural philosophy. It predicts persons (PRS), groups (GRP), and geographical locations (GEO) using IOB2 labels.

Person-name recognition was the primary research target. The GRP and GEO classes were retained for reuse but were not evaluated in the same depth.

Usage

Install transformers and PyTorch, then run:

from transformers import pipeline

ner = pipeline(
    "token-classification",
    model="mhvdr/neolatiner-model",
    aggregation_strategy="simple",
)

entities = ner("Cartesius in Gallia natus est.")
for entity in entities:
    print(entity["word"], entity["entity_group"], entity["score"])

The underlying labels are O, B-PRS, I-PRS, B-GRP, I-GRP, B-GEO, and I-GEO. With aggregation_strategy="simple", the pipeline combines adjacent IOB2 predictions and returns entity groups such as PRS, GRP, and GEO.

For lower-level control:

from transformers import AutoModelForTokenClassification, AutoTokenizer

repo_id = "mhvdr/neolatiner-model"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForTokenClassification.from_pretrained(repo_id)

Long documents must be split into passages that fit XLM-R's input limit. Preserve enough surrounding context for ambiguous names and retain confidence scores for review.

Evaluation

The released checkpoint was evaluated on the held-out test split of mhvdr/neolatiner-dataset using strict IOB2 entity matching. The test split contains 1,460 records and 639 annotated entities.

Entity Precision Recall F1 Support
GEO 0.6533 0.7784 0.7104 167
GRP 0.4937 0.4588 0.4756 85
PRS 0.7541 0.7209 0.7371 387
Micro average 0.6914 0.7011 0.6962 639

Training data

The model builds on XLM-R and Latin NER material from the Herodotos Project and the Corpus Burgundiae Medii Aevi, followed by fine-tuning on two rounds of manually annotated, in-domain Early Modern Latin excerpts. The final in-domain dataset is available at mhvdr/neolatiner-dataset.

Limitations

The target texts contain OCR errors, spelling variation, inflection, abbreviated names, and inconsistent capitalization. Predictions require domain-aware review and post-processing. The annotation sampling strategy emphasized excerpts likely to contain entities and low-confidence predictions, so the data is not a representative random sample of Early Modern Latin. The model was designed for research use, not high-stakes or fully automated decisions.

Citation

To cite the model itself:

Van der Ree, M. H., & Donker, S. (2026). NeoLatiNER: A Named-Entity Recognition Model for Early Modern Latin [Fine-tuned transformer model]. Hugging Face. https://huggingface.co/mhvdr/neolatiner-model. Archived at https://doi.org/10.5281/zenodo.22226398.

@misc{vanderree_donker_2026_neolatiner,
  author    = {van der Ree, Michiel H. and Donker, Silvia},
  title     = {{NeoLatiNER: A Named-Entity Recognition Model for Early Modern Latin}},
  year      = {2026},
  version   = {1.0.0},
  publisher = {Hugging Face},
  doi       = {10.5281/zenodo.22226398},
  url       = {https://huggingface.co/mhvdr/neolatiner-model},
  note      = {Fine-tuned transformer model; version archived on Zenodo}
}

The model has been applied and evaluated in: Donker, S. (forthcoming, 2026). The Great Unreferenced. Citation Patterns in Early Modern Natural Philosophy. In: Javier Cha, Matt Erlin and Susan Schreibman (Eds). Journal of Cultural Analytics Ten-Year Anniversary Issue: Reflections on a Decade of Seeing the Forest and the Trees.

Downloads last month
6
Safetensors
Model size
0.6B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train mhvdr/neolatiner-model