Why Thin Brackets Trip Up OCR in 7,592 Armenian Inscription Records
By Gregory Hain
Based on: Towards an Armenian Epigraphic Corpus — Chahan Vidal-Gor{è}ne, Arpine Avetisyan, Edita Matevosyan, Seda Kirakosyan, Victoria Khurshudyan, Pollet Samvelian
If you want to see an optical character recognition pipeline stumble in a deeply educational way, show it an academic book printed in 1982.
That book is volume V of the Divan hay vimagrut'yan, where specialists began checking a new digital corpus of Armenian inscriptions. Across the first 39 records they checked, the error rate for Armenian letters was 2.5 percent. Then there were the editorial signs. The pipeline confused forward slashes with brackets. It mistook restoration brackets for correction brackets. On correction brackets alone, the error rate reached 244.1 percent. One reason a rate can go that high is that the system can insert a bracket where the printed edition has none.
Those thin strokes sit at the center of Towards an Armenian Epigraphic Corpus, a preprint posted on November 23, 2026, by Chahan Vidal-Gorène and colleagues at Calfa, Université Sorbonne Nouvelle, SeDyL, Inalco, and Lattice. The team set out to turn the ten-volume Divan into an open, searchable resource called the Corpus Inscriptionum Armenicarum Electronicum (CIAE). Read the paper on arXiv.
The engineering problem comes into focus on a single page. A reader needs to know what the inscription says, where a line ended on the stone, and which letters an editor supplied centuries later. In the printed transcription, the difference can come down to which end of a vertical stroke carries a tiny horizontal mark.

When a printed volume is the only surviving witness
The inscriptions recorded in the Divan date from the fifth to the eighteenth century. For H. Orbeli, who helped establish editorial principles for Armenian epigraphy during the excavations at Ani, their value lay partly in what other historical sources passed over. The inscriptions preserve evidence of secular, economic, and social life, sometimes in just a few lines on a monument.
By the 1960s, some previously recorded inscriptions had already disappeared. Weathering, neglect, war, and deliberate destruction have since damaged or erased whole sites, including the cross-stones of Julfa. In Artsakh (Nagorno-Karabakh), satellite imagery has documented the destruction of churches and cemeteries since 2021.
For a growing number of inscriptions, the only surviving witness is the Divan hay vimagrut'yan (Corpus of Armenian Inscriptions), published in ten regional volumes between 1960 and 2017 by the Institute of Archaeology and Ethnography of the National Academy of Sciences of Armenia.
The problem is also one of access. Ithaca, a model that helps restore and attribute Greek inscriptions, was trained on 78,608 inscriptions derived from the Packard Humanities Institute's searchable collection. Aeneas, which extends that approach to Latin, was trained on 176,861 inscriptions drawn from three epigraphic databases. A digital corpus of Georgian inscriptions has existed since 2015.
Armenian epigraphy lacked a comparable digital resource. Scans of all ten volumes were available, but finding an inscription in a scan and searching across nearly 7,600 structured records are different tasks. Making that collection searchable meant figuring out how to read a page on the editors' terms.
Why scholarly pages are hard to parse
Consider record no. 4 on page 13 of volume V. It describes a four-line inscription on the lower part of a cross-stone set into a southern pillar. Its transcription includes the year (1223). Elsewhere on the same page are facsimile drawings, and the pipeline has to decide which one belongs with this text.
A Divan record brings together several kinds of evidence:
- Location and description. The entry identifies the inscription and describes its position and state of preservation.
- Bibliographic references. Citations point readers to previous editions of the inscription.
- The diplomatic transcription. The typeset text records the inscription using signs for features such as missing letters, editorial restorations, and divisions between lines.
- Facsimile drawings. Where present, drawings beside the typeset text preserve evidence of letter forms and ligatures. Armenian inscriptions use several hundred ligatures.
The machine reading and the specialist's correction of record no. 4 give a sense of the stakes. Here is the same short passage in both:
Machine reading Թ⎣Վ⎦ԻՆ⎣Ն⎦ ։ՈՀԲ։ (1223)
Corrected reading Թ⎡Վ⎤Ի⎡Ն⎤ ։ՈՀԲ։ (1223)
The numeral and the date in parentheses survive intact. Around them, the machine chooses the wrong kind of bracket and includes an extra letter. A reader who recognizes the year can still miss what the edition says about the letters leading up to it.
The typography takes some learning even for a reader with a clear scan:
- Upper half-brackets
⎡ ⎤enclose text restored by the editor. - Lower half-brackets
⎣ ⎦mark an editorial correction or addition, such as letters omitted by the engraver or supplied to expand an abbreviation. - Parentheses
( )usually enclose a year converted to AD. - Dots flanking Armenian letters, as in
։Ա։, mark letters used as numerals. - A forward slash
/marks a line division in volumes that use that convention.
A searcher may want to find a word regardless of the brackets inside it. An epigrapher citing the same word needs to know exactly where those brackets fall.
The three-model pipeline
The CIAE team divided the work among three models. One locates the drawings, another reads the printed characters, and a third uses the page image and the OCR text to identify records and fields. A deterministic parser then turns the result into structured data.
Divan page scan
|
+--> YOLO11n locates facsimile drawings
| |
| +--> Crop drawings for display
| +--> Mask drawings on the OCR page
| |
| v
| Calfa OCR (CRNN)
| |
| v
+--> High-resolution page image + recognized text
|
v
Gemini 3 Flash
Six annotated example pages
|
v
One tagged block per record
|
v
Deterministic parser
|
v
notices.jsonl (7,592 records)
Step 1. Isolating drawings with YOLO11n
The team trained a YOLO11n detector on 300 annotated page images with a single target class, the facsimile drawing.
When the detector locates a drawing, the pipeline crops it for the online reader and masks the corresponding area on the page used for OCR. That lets the corpus keep the drawn letter forms while reducing the noise they would introduce into recognition of the printed text. Plates and blank sheets are also discarded at this stage.
Step 2. Reading text with a specialized CRNN
With the drawings masked, Calfa OCR reads the printed page. Its recognizer is a convolutional recurrent neural network (CRNN).
The authors chose a dedicated recognizer on the strength of earlier work in which specialized CRNNs read text more accurately than the vision-language models studied. Supplying that OCR reading also helps limit hallucinations when the next model structures the page. It still leaves room for mistakes, including one particularly recognizable failure in which the model reproduces an example from its prompt.
Step 3. Structuring fields with Gemini 3 Flash
A stream of recognized text still needs boundaries. Where does the description end? Which lines belong to the transcription? Where do the references for the next record begin?
The team gave Gemini 3 Flash both the OCR text and the page image, using high resolution to keep the small editorial signs legible. Six annotated pages served as in-context examples. The choice of model drew on earlier research on the twentieth-century Armenian diaspora press. In that earlier study, Gemini 3 Flash recorded a character error rate of 6.3 percent, compared with 33–37 percent for Qwen2.5-VL and Qwen3-VL.
For the Divan, Gemini returned one tagged block per record. The example published in the paper includes DESCRIPTION, NB_LIGNES (number of lines), TRANSCRIPTION, and REFERENCE.
Step 4. Parsing the records and flagging suspect readings
A deterministic parser converted the tagged blocks into JSON records, joined entries that ran across page breaks, normalized runs of dots representing lost text, and standardized line-division marks.
Automated checks flagged records for early proofreading. The checks looked for:
- Unbalanced or empty brackets.
- Gaps in entry numbering.
- Repeated character sequences.
- Output copied from an in-context example in place of a reading of the target page.
Across 2,305 pages, the pipeline produced 7,592 structured records containing 7,347 transcriptions, roughly 900,000 characters, and 11,479 bracketed editorial spans. It also detected 5,458 drawings. Finding a drawing and pairing it with the right record turned out to be separate problems.
The bracket problem
Specialists first inspected the output volume by volume. They judged it usable for search and identified the editorial signs as the main source of errors. The first round of detailed proofreading put numbers to that observation.
As of November 2026, proofreaders had checked the text of 39 records comprising 6,027 characters, starting with volume V. They chose the records themselves, so the figures describe this sample. Some signs were rare even within it.
| Character category | Occurrences | Error rate | What the reviewers found |
|---|---|---|---|
| Armenian letters | 4,132 | 2.5% | Letters were read relatively reliably |
Lacuna dots (...) |
195 | 0.0% | No errors in the checked records |
Parentheses (( )) |
56 | 0.0% | No errors in the checked records |
Letter-numerals (։Ա։) |
79 | 1.3% | Few errors in the checked records |
Restoration brackets (⎡ ⎤) |
134 | 100.7% | 52 read as correction brackets, 39 omitted |
Line-division slashes (/) |
165 | 63.0% | 62 read as brackets, 34 omitted |
Correction brackets (⎣ ⎦) |
68 | 244.1% | Errors included 45 insertions where the edition had no such mark |
Square brackets ([ ]) |
4 | 75.0% | Too few occurrences for a firm conclusion |
| All characters | 6,027 | 6.7% | Overall character error rate |
Excluding editorial signs, the overall character error rate was 2.4 percent. Including them brought it to 6.7 percent, nearly three times as high.
How does one class of brackets reach 244.1 percent? For each sign category, the authors counted both missed and spurious characters, then divided by the number of occurrences in the checked text:
$$\text{Error rate for a sign category} = \frac{\text{missed characters} + \text{spurious characters}}{\text{reference occurrences}} \times 100%$$
There were only 68 genuine correction brackets in the sample. A restoration bracket misread as a correction bracket adds a spurious mark to the correction-bracket count. So does a slash misread that way. The authors also counted 45 correction brackets inserted where the edition had none. Several kinds of error can therefore accumulate against the same small denominator.
Most of these confusions involved thin strokes. Of 101 missed restoration brackets, 52 came back as correction brackets and 39 disappeared. Of 101 missed line divisions, 62 came back as brackets and 34 disappeared. Those counts locate the difficulty much more precisely than a single score for the page.
The signs also change meaning across volumes. Volume V uses ⎣ ⎦ for letters the engraver omitted or abbreviated and [ ] for superfluous letters on the stone. Elsewhere, square brackets usually enclose letters supplied by the editor. Volume IX marks line divisions with line breaks. Each volume's own table of signs remains authoritative, and square brackets appear in fewer than 4 percent of the machine transcriptions, making them difficult both to learn and to evaluate.

Turning GitHub into an epigraphic workbench
The team opened the corpus to collaborative correction while proofreading was still in progress. Readers could already search the collection. Specialists could use the same interface to check the fields, compare them with the scan, and leave a correction that preserved the original machine reading.
The platform at epigraphy.calfa.fr is a static web application. The data live in the public GitHub repository calfa-co/armenian-inscriptions-data, where corrections are stored separately from machine output.
Specialist checks text and facsimile box against the scan
|
v
Pre-filled GitHub issue
|
v
GitHub Action checks the submission
|
+------------+------------+
| |
Team member Other contributor
| |
Direct commit Pull request
| |
| Editor checks scan
| |
+------------+------------+
|
v
corrections/{id}.json
|
v
corrections.json rebuilt on publication
When an epigrapher opens a record, the interface displays the extracted fields beside the original page scan. Dedicated controls help the reviewer enter editorial signs, and the platform rejects corrections with unbalanced brackets.
Proofreading also covers the drawings. A reviewer can accept a facsimile box, redraw its boundaries, reject it, or assign a drawing when the pipeline left its record uncertain. Of the first 36 boxes examined, reviewers accepted 22, redrew 13, and rejected one.
Submitting a validated or corrected record opens a pre-filled GitHub issue. An automated workflow checks the record, fields, box, and brackets. For a team contribution, the workflow commits the correction directly. For other contributors, it opens a pull request that an editor reviews against the scan.
That work produces more than a corrected entry. An adjusted box supplies an annotation for retraining the detector. A corrected page can serve as an in-context example for Gemini. A checked drawing paired with its transcription supplies training data for a model that might learn to read the drawings themselves.
Why it matters for document engineering and OCR pipelines
1. Aggregate character error rate hides differences that matter to readers
An overall rate of 6.7 percent tells a reader little about whether to trust a date, a word, or a restoration. In these 39 records, all 56 parentheses were reproduced correctly. Restoration brackets had an error rate above 100 percent. Reporting errors by character class makes it possible to see which parts of a transcription still need the closest inspection.
2. CRNNs and vision-language models can do different jobs on the same page
The CRNN gives Gemini a first reading of the printed text. Gemini uses that reading together with the page image to group text into records and fields, a job that the authors say would otherwise require a separate layout model. The paper evaluates the resulting pipeline as a whole. Its comparison of Gemini with open-weight alternatives comes from the earlier press study.
3. A graphic worth keeping can still get in the way of OCR
A facsimile drawing is valuable precisely because it preserves shapes the typeset transcription cannot convey. Cropping it for display and masking it for OCR gives the reader access to both forms of evidence. The remaining challenge is deciding which drawing belongs beside which record, a decision the pipeline leaves open when several candidates fit.
4. Search and display need different treatments of editorial notation
A reader searching for ՍՈՒՐԲ can also find Ս[ՈՒՐ]Բ. The CIAE ignores editorial signs during search while retaining them in the transcription, subject to its normalization of lacuna dots and line divisions. A reader can then inspect the brackets against the scan and export the machine values, the corrected values, or both.
5. GitHub can carry an editorial review workflow
A static reader, pre-filled issues, automated checks, and editor-reviewed pull requests give the project a way to accept corrections while keeping their provenance. The published data can also be exported as CSV, JSON, or JSON Lines. For someone citing an inscription, the authors ask for both the digital record and the printed volume.
What happens after the text is digitized
A searchable edition is one aim of the CIAE. Another is to provide “silver data” in Classical and Middle Armenian for computational linguistics and language models. The machine readings provide scale, and the growing collection of checked passages records where those readings need correction.
The MESROP initiative (Machine learning for Epigraphic Study and Recognition Of the Armenian Patrimony) plans to train a language model on the corpus to propose readings for lost or worn passages. A collection of inscriptions gives that work a starting point. The paper reports the extraction and proofreading results so far, with restoration among the project's future aims.
The plans also reach back to the monuments. The Armenian Cultural Heritage Institute has documented hundreds of sites in Armenia and Artsakh through photogrammetry and 3D scanning. MESROP envisions a platform where photographs of inscriptions can be deposited and linked to their records and to 3D models of the monuments. For inscriptions the Divan does not illustrate, the team also hopes to produce new facsimiles, ideally automatically from photographs and 3D models.
Meanwhile, an affiliated project is using the platform to build the first digital corpus of Armenian inscriptions from Artsakh. Editors are checking volume V first, then extending the collection with photographs and drawings, starting with Martakert. Each inscription receives a diplomatic transcription alongside a normalized text that expands abbreviations and regularizes spelling. Its metadata follow a schema inspired by EpiDoc. An EpiDoc export for the CIAE is also planned.
The boundaries of the current benchmark
- Evaluation sample size. The quantitative rates come from 39 records chosen by proofreaders, with work beginning in volume V. They give a close view of particular errors. A corpus-wide estimate would need to account for the other volumes and their differing conventions.
- Unresolved drawing associations. Across all 7,592 records, the pipeline automatically paired a drawing in 46 percent of cases. In 39 percent, several candidates remained ambiguous. In 15 percent, no drawing was detected. Those percentages refer to records. The detector's separate threshold for retaining a box for display was a confidence score above 40 percent, and most facsimiles still awaited manual confirmation.
- Readings inherited from the printed edition. Even a perfect transcription of a Divan page can carry forward an error made by its editors. The platform allows specialists to correct those readings while preserving access to the scan and the machine output.
- Contributor access. Submitting a correction requires a GitHub account, which some epigraphers do not have.
The first 39 checked records show why the CIAE keeps the scan, the machine reading, and the specialist's correction together. A reader can search across 7,592 records, open a four-line inscription from 1223, and inspect the tiny bracket that says which letters an editor restored. For an inscription that survives only in print, that distinction is part of what the digital corpus exists to preserve.