Downloads · 30 days
9
1% of all-time downloads
cook/cicero-similis
cicero-similis is a fill-mask model from cook. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as apache-2.0.
A Latin Language Model, trained on Latin texts, and evaluated using the corpus of Cicero, as described in the paper What Would Cicero Write? -- Examining Critical Textual Decisions with a Language Model by Todd Cook,…
Downloads · 30 days
9
1% of all-time downloads
All-time downloads
1.3K
Public
Repo size
1.7 GB
Likes
0
Public
Click a slice to open those files.
.h5329 MB · 40%
From the Hugging Face model README
A Latin Language Model, trained on Latin texts, and evaluated using the corpus of Cicero, as described in the paper What Would Cicero Write? -- Examining Critical Textual Decisions with a Language Model by Todd Cook, Published in Ciceroniana On Line, Vol. V, #2.
Normalize text using JV Replacement and tokenize using CLTK to separate enclitics such as "-que", then:
from transformers import BertForMaskedLM, AutoTokenizer, FillMaskPipeline
tokenizer = AutoTokenizer.from_pretrained("cook/cicero-similis")
model = BertForMaskedLM.from_pretrained("cook/cicero-similis")
fill_mask = FillMaskPipeline(model=model, tokenizer=tokenizer, top_k=10_000)
# Cicero, De Re Publica, VI, 32, 2
# "animal" is found in A, Q, PhD manuscripts
# 'anima' H^1 Macr. et codd. Tusc.
results = fill_mask("inanimum est enim omne quod pulsu agitatur externo; quod autem est [MASK],")
Currently the model training data excludes modern and 19th century texts, but that weakness is the model's strength; it's not aimed to be a one-size-fits-all model.
Trained on the corpora Phi5, Tesserae, Thomas Aquinas, and Patrologes Latina.
5 epochs, masked language modeling .15, effective batch size 32
A novel evaluation metric is proposed in the paper What Would Cicero Write? -- Examining Critical Textual Decisions with a Language Model by Todd Cook, Published in Ciceroniana On Line, Vol. V, #2.
TODO What Would Cicero Write? -- Examining Critical Textual Decisions with a Language Model by Todd Cook, Published in Ciceroniana On Line, Vol. V, #2.