Interlinea
Validated Language-Model Annotation and Rules-First Scansion of Latin and Ancient Greek
Abstract
Interlinea is a reading app for Latin and Ancient Greek. Tap any word of Virgil or Homer and it shows the lemma, the form, the syntax and a gloss, and verse arrives scanned. A language model does the analysis, but it never controls the form of the answer: code numbers the words, a validator checks every tree, and rules narrow each line of verse to the readings its metre allows.
I built it in 24 days, alone, by conducting a team of AI coding agents. This is the web edition of the paper that measures it, told as the story of how it was made. On 833 sentences of expert annotation, the best model finds syntactic heads better than parsers trained on the test treebanks, numbered words alone are worth 15.6 points of attachment accuracy, and models that choose among candidate scansions beat models that scan.
Keywords
- Latin
- Ancient Greek
- large language models
- Universal Dependencies
- structured output
- automatic scansion
- coding agents
An idea worth building
Prooemium
A reader of Latin or Greek spends most of an hour on the forms of words. Lesbia could be nominative, vocative or ablative, and amemus is a subjunctive a beginner reads as a future. Tools such as Morpheus and Alpheios (Crane, 1991; Alpheios, 2026) list every analysis a form allows and leave the reader to choose.
Language models can make that choice. With a few examples they match trained taggers on lemmas and parts of speech (Vidal-Gorène et al., 2026). They also fail in ways a learner cannot see. Asked for twelve words, a model returns eleven, merges an enclitic into its host, gives a form a case it cannot have, or builds a tree with two roots. A reading app that shows such an answer teaches the mistake.
So Interlinea rests on one rule. Code owns the form of the answer, and the model only chooses. The scenes below follow a sentence through the system that rule produced, then the platform around it, then the 24 days in which one person built all of it, and finally what a large evaluation found.
A sentence arrives
The first reader pays
A reader opens a passage of Virgil. The text appears at once, split into sentences in the browser, and each sentence is looked up by a fingerprint of its text. A sentence anyone has read before comes back from the store in milliseconds. The rest go to a model, once.
Why the words are numbered
Verba Numerata
Of all the protocol’s parts, the plainest matters most. The model never sees a sentence it must split. It sees numbered words and answers by number, and that turns out to be worth more than the prompt’s examples, its allow-lists and its correction turn together.
An experiment
Let the model split the sentence itself
To see what the numbered words buy, I gave GPT-6 luna the same 500 gold sentences without them. It had to split each sentence, number the words itself and annotate them. Its words disagreed in number with the gold’s in 5.4% of sentences. It rewrote Seneca’s verse into prose order and twice dropped a non, which reverses the sentence.
A validator, and one second chance
Custos
A model reviewing its own reasoning rarely improves it (Huang et al., 2024). Given a concrete error from outside, it usually does (Kamoi et al., 2024). Interlinea’s validator is that outside voice. It knows nothing about Latin. It knows what a tree is.
What fails
Two roots, a cycle, Case=Fem
Of 833 sentences, GPT-6 luna’s first answer failed the validator on 57. Most of the messages were about trees: 39 answers had no root, two roots or a cycle. In 12 a value sat where none belongs, such as a gender in the case slot, and 9 named an aorist the features did not. Some answers failed more than one check.
Rules first, then a single question
De Metris
Verse needs a different division of labour. The rules of prosody settle most syllables and the metre settles most of the rest. What they cannot know is the length of a vowel the spelling hides. So the rules do all they can, and a model is asked only what they leave open, as a choice among numbered candidates. The scene below is scored on 600 lines from Hypotactic (Chamberlain, 2026).
Syllables
Vivamus, mea Lesbia, atque amemus
Rules split the line into syllables. Where a vowel meets a vowel across words, the first is elided, so Lesbia and atque lose their last syllable to the word after them, as Catullus’ ear did.
The platform around it
Machina
An annotation protocol is only useful inside something people read. Interlinea’s platform is deliberately small: one app, one database, one way to the models, and a store that makes the expensive part happen once per sentence instead of once per reader.
The platform
A small machine around one idea
Interlinea runs on Vercel and Supabase. Readers and software come in through the same edge, and every request either reads what is already stored or asks a model. Only the second costs money, and it happens once per sentence.
Twenty-four days
Fabrica
Interlinea went from an empty repository to a public product in 24 days. In that time it gained a library of 5,234 Latin and Greek works, a reader that annotates every word, verse scansion, a tutor, accounts and payments, an API for software, and an evaluation rigorous enough for a paper. One person built it.
- days
- 24days
- commits
- 379commits
- pull requests
- 74pull requests
- lines of TypeScript
- 83,598lines of TypeScript
- works in the library
- 5,234works in the library
- person
- 1person
AI agents wrote most of the lines. That is the least interesting part. Agents are fast, tireless and literal, and on their own they build the wrong thing quickly. What made these productive was the conducting: deciding what to build and in what order, writing the system down before any code existed, shaping work so several agents could build at once without colliding, judging every result before it was kept, and measuring the product against expert data instead of trusting impressions.
The next two scenes show that work: first the loop at its centre, then the whole history, every commit and pull request in its place.
The conductor
One person, one intent
Every piece of Interlinea began as a decision: what a reader needed next, what it was worth, and what it must never do. The agents were fast and tireless. Deciding what they should build, and what was good enough to keep, stayed with one person.
Day one
The whole system, written down first
On 27 September, before the first line of code, I wrote Interlinea down: what it stores, how it answers, what it costs and how it is tested. Every piece of work afterwards was built against that plan, so many hands could build one coherent thing.
Measure, decide, ship
Quod Invenimus
The evaluation was not an afterthought. It compares four language models with Stanza (Qi et al., 2020) and UDPipe 2 (Straka, 2018), each trained on the treebank it is tested on, against expert annotation in Universal Dependencies (Nivre et al., 2020) and the Ancient Greek and Latin Dependency Treebank (Bamman and Crane, 2011). Two of the gold sets, from Marseille (Pizzorno, 2026) and Artemidorus (Ferreira, 2021), were released after every model’s training data ends (Anthropic, 2026; OpenAI, 2026; Google DeepMind, 2026). What it found changed the product the same week.
The test
833 sentences of expert annotation
I used existing expert treebanks only: the test splits of four Universal Dependencies treebanks of Latin and Greek, and two sets released in August 2026, after every model’s training data ends. The baselines are Stanza and UDPipe 2, each trained on the very treebank it is tested on.
Limits
Fines
Each gold set comes from one annotator or project, and my conversion of the Ancient Greek and Latin Dependency Treebank favours the models by a few points of attachment against the official trees. The two sets released after the models’ cutoffs are small and differ in genre. Glosses, notes and translations, which readers use most, are not scored, and nothing here measures whether reading with Interlinea teaches anyone Latin or Greek. The models are commercial services that change.
The design holds up under all of that. A language model can be the part of a reading tool that knows Latin and Greek, if code is the part that knows what an answer may look like. The best model attaches 86.9% of Latin heads and 91.4% of Greek ones, and the code around it makes sure a reader never sees a malformed answer. Try it on a page of Virgil.
Cite this paper
Rumi Elías Calles (2026). Interlinea: Validated Language-Model Annotation and Rules-First Scansion of Latin and Ancient Greek. Aeterna Institute, De Litteris III. https://aeterna-institute.org/research/interlinea/
@article{calles2026interlinea-validated-language-model-annotation-and-rules-first-scansion-of-latin-and-ancient-greek,
author = {Rumi Elías Calles},
title = {Interlinea: Validated Language-Model Annotation and Rules-First Scansion of Latin and Ancient Greek},
journal = {Aeterna Institute, De Litteris III},
year = {2026},
url = {https://aeterna-institute.org/research/interlinea/},
}References
- Anthropic (2026). System Card: Claude Opus 5.5. Anthropic. Source
- The Alpheios Project (2026). Alpheios: Reading Tools for Classical Languages and Literatures. The Alpheios Project, Ltd.. Source
- David Bamman and Gregory Crane (2011). The Ancient Greek and Latin Dependency Treebanks. Language Technology for Cultural Heritage, Springer. doi:10.1007/978-3-642-20227-8_5
- David Chamberlain (2026). Hypotactic: Greek and Roman Verse, Audio-Visually Enhanced. hypotactic.com. Source
- Gregory Crane (1991). Generating and Parsing Classical Greek. Literary and Linguistic Computing 6(4). doi:10.1093/llc/6.4.243
- Anise Ferreira (2021). UNESP Trees: Coleção de treebanks dos Projetos Abertos em Letras Clássicas Digitais. Perseids Publications. Source
- Google DeepMind (2026). Gemini 3.8 Flash Model Card. Google DeepMind. Source
- Jie Huang, Xinyun Chen, Swaroop Mishra, Huaixiu Steven Zheng, Adams Wei Yu, Xinying Song, and Denny Zhou (2024). Large Language Models Cannot Self-Correct Reasoning Yet. ICLR 2024. Source
- Ryo Kamoi, Yusen Zhang, Nan Zhang, Jiawei Han, and Rui Zhang (2024). When Can LLMs Actually Correct Their Own Mistakes? A Critical Survey of Self-Correction of LLMs. Transactions of the Association for Computational Linguistics. doi:10.1162/tacl_a_00713
- Joakim Nivre, Marie-Catherine de Marneffe, Filip Ginter, Jan Hajič, Christopher D. Manning, Sampo Pyysalo, Sebastian Schuster, Francis Tyers, and Daniel Zeman (2020). Universal Dependencies v2: An Evergrowing Multilingual Treebank Collection. Proceedings of LREC 2020. Source
- OpenAI (2026). GPT-6 Luna Model. OpenAI API documentation. Source
- Gabriel H. Pizzorno (2026). Correction as Annotation: Bootstrapping a Dependency Parser for Documentary Medieval Latin. arXiv preprint. doi:10.48550/arXiv.2609.06266
- Peng Qi, Yuhao Zhang, Yuhui Zhang, Jason Bolton, and Christopher D. Manning (2020). Stanza: A Python Natural Language Processing Toolkit for Many Human Languages. Proceedings of ACL 2020: System Demonstrations. doi:10.18653/v1/2020.acl-demos.14
- Milan Straka (2018). UDPipe 2.0 Prototype at CoNLL 2018 UD Shared Task. Proceedings of the CoNLL 2018 Shared Task. doi:10.18653/v1/K18-2020
- Chahan Vidal-Gorène, Bastien Kindt, and Florian Cafiero (2026). Under-resourced Studies of Under-resourced Languages: Lemmatization and POS-tagging with LLM Annotators for Historical Armenian, Georgian, Greek and Syriac. arXiv preprint. doi:10.48550/arXiv.2602.15753
- Brandon T. Willard and Rémi Louf (2023). Efficient Guided Generation for Large Language Models. arXiv preprint. doi:10.48550/arXiv.2307.09702
De Litteris