Old-Serb-XLM-RoBERTa with 50% Synthetic Data
Model Description
Old-Serb-XLM-RoBERTa with 50% synthetic data is a transformer-based Named Entity Recognition (NER) model for pre-modern Serbian Cyrillic texts.
The model is based on xlm-roberta-base and fine-tuned for token classification on a custom annotated corpus of medieval Serbian charters and archival documents.
The model recognizes three entity types:
PER — person names
LOC — locations, places, territories, and related geographical references
DEMO — demonymic entities, population names, and group references
The model uses the BIO tagging scheme:
B-PER, I-PER
B-LOC, I-LOC
B-DEMO, I-DEMO
O
This checkpoint was trained using the original annotated training set augmented with an additional 50% of synthetically generated NER examples.
It was selected as the recommended model because it achieved the strongest average weighted F1-score across three out-of-domain evaluation documents.
Intended Use
This model is intended for:
- Named Entity Recognition in pre-modern Serbian Cyrillic texts
- Digital humanities research
- Historical text processing
- Extraction of persons, locations, and demonymic references from medieval Serbian documents
- Corpus exploration and preparation of structured historical data
The model is especially suitable for documents written in historical Serbian Cyrillic, including medieval charters, diplomatic texts, and archival material.
How to Use
1from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
2
3model_id = "marijadjokic/Old-Serb-XLM-RoBERTa-50-synthetic"
4
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForTokenClassification.from_pretrained(model_id)
7
8ner_pipeline = pipeline(
9 "token-classification",
10 model=model,
11 tokenizer=tokenizer,
12 aggregation_strategy="simple"
13)
14
15text = "стефанꙋ ꙋрошꙋ"
16results = ner_pipeline(text)
17
18for entity in results:
19 print(entity)
Training Data
The model was fine-tuned on a manually annotated NER corpus of pre-modern Serbian Cyrillic texts.
The training data are based on medieval Serbian charters and archival documents annotated using the BIO tagging scheme.
To improve generalization in a low-resource historical setting, the original training corpus was augmented with synthetically generated examples (using GPT-4.5-mini).
This checkpoint uses the configuration with 50% synthetic data added to the original training set.
Synthetic examples were generated to resemble historical Serbian Cyrillic texts and were automatically validated for JSON structure, token-label alignment, label validity, and BIO consistency.
Limitations
The model is designed for historical Serbian Cyrillic texts and may not perform well on:
- contemporary Serbian texts
- Latin-script texts
- OCR/HTR output with severe recognition errors
- texts from substantially different periods or genres
- entity categories not included in the training data
The most challenging category is DEMO, mainly because demonymic entities are rare in the annotated corpus and often overlap semantically with locations, territories, or collective references.
The model may also produce:
- false positives for common nouns or occupational terms
- confusion between
PER and LOC
- confusion between
DEMO and LOC
- incomplete multi-token entity spans
- missed entities in highly abbreviated or orthographically complex forms
Authors
Model developed by Marija Đokić Petrović, Vladimir Polomac, and Mihailo St. Popović.