Makron-code / analysis /oga_macronizer_diagnostics.md
Urdatorn's picture
Report: name the regrouping script
69b76d0 verified
|
Raw History Blame Contribute Delete
26.9 kB
# What the rule-based macronizer does on OGA: module contributions and abstentions
Statistics from the diagnostics of the rule-based grc-macronizer on the Opera Graeca
Adnotata corpus, restricted to exactly the sentences of
[Urdatorn/oga-macronized-no-norma](https://huggingface.co/datasets/Urdatorn/oga-macronized-no-norma)
(revision `5d737f8`, 2,096,720 sentences), i.e. the silver data the models are trained on.
All-OGA figures (2,234,754 sentences) differ by less than 0.1% and are given only where
the HF subset cannot be isolated.
## Provenance
| | |
|---|---|
| macronizer | grc-macronizer `a949b76` (the code that produced the HF data) plus the diagnostics-logging branch ([PR #12](https://github.com/Urdatorn/grc-macronizer/pull/12), `fa0e923`), which changes no output |
| settings | `Macronizer(make_prints=False, doc_from_file=False, no_hypotactic=False, lowercase=False)`, OGA's own CoNLL-U annotation as `custom_doc` (no odyCy inference) |
| run | job 5715083, 1,999 CoNLL-U files, 500-sentence chunks, 32 workers |
| check | output byte-identical to the run behind the HF data (job 5709453): 2,234,754 lines, 0 differences |
| HF subset | each output line matched to the HF parquet (multiset matching): all 2,096,720 matched, no chunk with a line-count mismatch |
| analysis | `scripts/analyze_rerun.py` (job 5715543); raw numbers in `oga_diagnostics_stats.json`, every abstained form in `oga_abstained_forms.tsv` |
Per-token traces record, for every token sent to the modules, its sentence, lemma, POS
and morphology, its unmarked open-syllable dichrona before and after, and the
**top-level credit** of each module: how many dichrona it resolved for that token. A
recursive pass (e.g. oxytonizing `στρατηγὸν` to `στρατηγόν` and re-running the cascade)
is credited to the recursion module that started it, not to the modules inside it, so the
credits of a token add up to what the cascade resolved for it (checked for every token).
This differs from the module counts in the earlier logs (`tokens_helped`), which count
successes at every recursion depth and overlap (Appendix A).
**Two levels of counting.** Token-level figures count each word in isolation, as the
macronizer sees it. The corpus-level macronization ratio counts the running text in
synapheia, where a word-final vowel before a consonant-initial word is in a closed
syllable and not counted. The two denominators therefore differ (17.71M vs 16.89M
dichrona); both are given below.
## 1. Headline numbers
| | |
|---|---:|
| sentences | 2,096,720 |
| tokens considered (all OGA) | 39,270,335 |
| tokens sent to the modules | 12,978,560 |
| unmarked open-syllable dichrona in those tokens (word in isolation) | 17,708,350 |
| resolved by the modules | 13,869,433 (**78.3%**) |
| left unresolved | 3,838,917 (21.7%) |
| tokens with at least one dichronon left (abstentions) | 2,743,163 (**21.1%** of tokens sent) |
| corpus-level ratio (running text, synapheia) | 12,938,210 / 16,890,517 = **76.6%** |
| marks added: short `^` / long `_` | 12,961,270 / 1,798,025 (**12.2% long**) |
### Token funnel (all OGA)
| tokens considered | 39,270,335 | 100% |
|---|---:|---:|
| no dichronon in an open syllable | 20,548,018 | 52.3% |
| not in the diagnostic word list (almost all punctuation tokens) | 5,381,930 | 13.7% |
| Greek numerals | 341,777 | 0.9% |
| final sigma mid-word (OCR damage) | 7,400 | |
| pathological accents/breathings | 5,448 | |
| **sent to the modules** | **12,985,762** | **33.1%** |
The stop list is empty in this version, so no token is skipped as a stop word. Only 34
macronized words could not be written back into the text ("Could not find occurrence").
## 2. Contribution of each module
Share of the 13,869,433 resolved dichrona, by top-level credit, in cascade order:
| module | type | tokens | dichrona resolved | **share** | long marks* |
|---|---|---:|---:|---:|---:|
| custom | lexical (hand-made) | 3,593,725 | 4,553,470 | **32.8%** | 7.8% |
| wiktionary | lexical | 3,917,440 | 5,216,459 | **37.6%** | 17.6% |
| lsj | lexical | 319,535 | 371,641 | 2.7% | 7.4% |
| nominal_forms | rules | 906,327 | 934,675 | 6.7% | 10.8% |
| verbal_forms | rules | 6,498 | 6,498 | 0.05% | 0% |
| accent_rules | rules | 828,244 | 828,244 | 6.0% | 3.2% |
| prefix | rules | 554,453 | 554,453 | 4.0% | 0.2% |
| double_accent_recursion | recursion | 48,494 | 61,320 | 0.4% | 12.4% |
| reversed_elision_recursion | recursion | 22,811 | 23,651 | 0.2% | 6.0% |
| case_ending_recursion | recursion | 235,718 | 281,967 | 2.0% | 12.8% |
| oxytonization | recursion | 424,348 | 509,824 | 3.7% | 18.8% |
| decapitalization | recursion | 43,991 | 50,165 | 0.4% | 17.6% |
| hypotactic | lexical (verse) | 401,045 | 476,706 | 3.4% | 18.6% |
| accent_rules (final pass) | rules | 360 | 360 | <0.01% | – |
\* Share of long marks among the marks added to tokens that this module alone resolved
(tokens credited to a single module), i.e. how often the module's answer is "long".
**By type:** lexical lookups 76.6% (custom + Wiktionary 70.4%, LSJ 2.7%, hypotactic 3.4%),
morphological and accent rules 16.8%, recursive normalizations 6.7%.
**Observations**
- Two lexical sources do most of the work: Wiktionary (37.6%) and the hand-made custom
list (32.8%) resolve 70% of all dichrona. Custom is large because it covers the most
frequent function words: 1.39M of its dichrona are prepositions (ADP), 0.71M adverbs,
0.41M articles, 0.34M pronouns (e.g. `πα^ρὰ^`, `κα^τὰ^`, `γὰ^ρ`, `τὰ^`, `ἂ^ν`).
Wiktionary carries the content words: 1.86M verbal, 1.49M nominal, 1.26M adjectival
dichrona.
- The rule modules matter for nouns (nominal_forms 0.49M, accent rules 0.45M dichrona in
NOUN) and prefixed verbs (prefix 0.32M in VERB). The verbal-forms rules almost never
fire (6,498 dichrona).
- The recursive normalizations add 6.7%, mostly through oxytonizing graves (3.7%) and
case-ending changes (2.0%). Their long-mark shares (13-19%) are close to Wiktionary's,
since they re-run the lexical lookups on a normalized form.
- The final, overwriting accent-rules pass changes almost nothing (360 dichrona); it is a
safety net, not a contributor.
- Hypotactic (scanned verse) is last in the cascade and still adds 3.4%.
- 96.6% of the tokens with any credit were resolved by a single module (10,557,625 of
10,928,032; two modules 365,857, three 4,550). The cascade is in practice a sequence of
fallbacks, not a combination.
- Long marks are rare overall (12.2%). Modules that decide by rule rather than lookup give
"short" almost always: prefix 99.8% short (all dichronic prefixes are short), accent
rules 96.8% short.
## 3. Abstentions: which words are hard
2,743,163 tokens (21.1% of those sent) keep at least one unmarked dichronon: 501,814
distinct forms of 193,542 lemmas. 887,267 of them (32%) are partially marked. 68.5% have
one unresolved dichronon, 24.1% two, 7.4% three or more.
### By part of speech, against the baseline
A raw abstention rate only means something relative to how common the category is among
the tokens that *can* be abstained on. The table gives three distributions: all tokens of
OGA (the baseline of the corpus), the tokens sent to the modules (those with an unmarked
open-syllable dichronon: the baseline for abstentions) and the abstentions. Over-
representation = the category's abstention rate divided by the overall rate (21.1%), which
equals its share of abstentions divided by its share of tokens sent.
**Significance.** With 13M tokens, a pooled two-proportion test makes almost any difference
significant (all z-tests below give p < 10⁻¹⁰⁰ except INTJ), so the test relied on treats
**works as the unit**: for every work with at least 30 tokens of the category and 30 other
tokens, d = abstention rate of the category − abstention rate of all other tokens in the
same work. The table gives the mean of d over works, a one-sample t-test of d = 0 (Holm-
corrected over the table) and a Wilcoxon signed-rank test, and Cohen's d (mean / SD of d).
Comparing within works controls for texts differing in difficulty. "< 1e-300" means below
floating-point precision.
| POS | share of all OGA tokens | share of tokens sent | share of abstentions | rate | over-rep. | works | mean d (pp) | Cohen's d | p (t, Holm) | p (Wilcoxon) |
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
| NOUN | 17.0% | 30.8% | 43.1% | 29.6% | **1.40** | 1,905 | +10.0 | 1.27 | < 1e-300 | 7e-285 |
| VERB | 15.5% | 24.8% | 33.8% | 28.8% | **1.36** | 1,875 | +11.4 | 1.48 | < 1e-300 | 2e-273 |
| ADJ | 8.9% | 15.6% | 17.5% | 23.8% | 1.13 | 1,827 | +1.9 | 0.24 | 1e-23 | 7e-22 |
| ADV | 12.1% | 8.6% | 3.0% | 7.5% | 0.35 | 1,668 | −14.6 | −2.73 | < 1e-300 | 1e-272 |
| ADP | 6.0% | 8.8% | 0.8% | 1.8% | 0.09 | 1,679 | −20.1 | −2.99 | < 1e-300 | 7e-276 |
| PRON | 6.1% | 4.4% | 1.0% | 4.6% | 0.22 | 1,515 | −16.3 | −2.66 | < 1e-300 | 1e-246 |
| DET | 12.1% | 3.3% | 0.1% | 0.9% | 0.04 | 1,294 | −20.7 | −3.64 | < 1e-300 | 8e-212 |
| CCONJ | 7.2% | 3.0% | 0.3% | 1.9% | 0.09 | 1,260 | −19.0 | −2.62 | < 1e-300 | 3e-201 |
| NUM | 0.2% | 0.3% | 0.1% | 6.4% | 0.30 | 314 | −15.3 | −1.52 | 1e-82 | 5e-46 |
| PART | 0.5% | 0.3% | 0.0% | 0.5% | 0.02 | 257 | −18.2 | −2.12 | 5e-96 | 1e-42 |
| X (unknown) | 0.5% | 0.08% | 0.2% | 49.4% | 2.34 | 62 | +17.9 | 0.61 | 3e-5 | 4e-5 |
| INTJ | 0.2% | 0.04% | 0.07% | 37.0% | 1.75 | 31 | +8.5 | 0.37 | 0.09 (n.s.) | 0.15 (n.s.) |
(PUNCT is 13.8% of all OGA tokens and almost never has a dichronon.)
- Nouns and verbs are over-represented among abstentions (1.40 and 1.36 times their share
of the tokens with dichrona), with large per-work effects (d ≈ 1.3-1.5): in a typical
work their abstention rate is 10-11 points above that of the other tokens.
- Adjectives are only slightly over-represented (1.13; d = 0.24): significant, but small.
- All closed classes are strongly under-represented (0.02-0.35): the hand-made custom list
covers them.
- The baseline matters: articles are 12.1% of all tokens but only 3.3% of the tokens with
an unmarked dichronon, and nouns rise from 17.0% to 30.8%; the abstention shares have to
be read against the middle column, not the first.
### By morphology and word shape (same method)
Here d compares the category with all other tokens of the work, not only with other forms
of the same part of speech; the rates allow the within-POS comparison (e.g. participles
37.8% vs finite verbs 21.9%; all verbs 28.8%).
| category | share of tokens sent | share of abstentions | rate | over-rep. | works | mean d (pp) | Cohen's d | p (t, Holm) | p (Wilcoxon) |
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
| VERB participle | 8.4% | 15.0% | 37.8% | **1.79** | 1,705 | +18.4 | 2.14 | < 1e-300 | 7e-276 |
| VERB finite | 13.1% | 13.6% | 21.9% | 1.04 | 1,794 | +2.6 | 0.35 | 3e-47 | 3e-60 |
| VERB infinitive | 3.1% | 4.8% | 32.2% | 1.52 | 1,316 | +12.4 | 1.62 | < 1e-300 | 1e-208 |
| VERB active | 17.0% | 19.4% | 24.2% | 1.14 | 1,831 | +5.2 | 0.73 | 1e-170 | 6e-165 |
| VERB middle | 6.5% | 11.6% | 37.7% | **1.78** | 1,623 | +18.8 | 2.06 | < 1e-300 | 9e-256 |
| VERB passive | 1.1% | 2.4% | 43.9% | **2.08** | 769 | +22.8 | 2.20 | 6e-296 | 1e-126 |
| VERB present | 13.7% | 15.6% | 24.0% | 1.14 | 1,779 | +5.6 | 0.75 | 2e-174 | 8e-165 |
| VERB past (aorist, perfect, imperfect) | 10.1% | 16.5% | 34.5% | 1.63 | 1,736 | +14.7 | 1.96 | < 1e-300 | 5e-277 |
| VERB future | 0.8% | 1.3% | 34.6% | 1.64 | 660 | +13.8 | 1.59 | 3e-181 | 3e-103 |
| ADJ comparative | 0.6% | 1.2% | 39.7% | **1.88** | 484 | +19.4 | 1.34 | 4e-109 | 1e-71 |
| ADJ superlative | 0.4% | 1.0% | 48.7% | **2.30** | 403 | +28.9 | 2.00 | 3e-142 | 2e-67 |
| NOUN singular | 22.8% | 35.7% | 33.1% | 1.57 | 1,876 | +13.7 | 1.57 | < 1e-300 | 2e-300 |
| NOUN plural | 7.9% | 7.1% | 19.0% | 0.90 | 1,698 | −3.5 | −0.49 | 1e-81 | 1e-97 |
| **lunate sigma** (`ϲ`) | 1.8% | 7.1% | 82.7% | **3.91** | 40 | +61.7 | 7.58 | 6e-36 | 2e-12 |
| capitalized (mostly names) | 7.4% | 18.0% | 51.6% | **2.44** | 1,480 | +25.2 | 1.44 | < 1e-300 | 2e-226 |
| elided (`'`) | 0.8% | 0.6% | 15.3% | 0.72 | 608 | −3.6 | −0.29 | 2e-12 | 9e-18 |
- Within verbs, the derived and marked forms are hard: participles (1.79), middles (1.78)
and passives (2.08), past and future tenses (~1.6), against finite (1.04), active (1.14)
and present (1.14) forms. These are the forms a form lexicon is least likely to list,
and the verbal-forms rules almost never fire (Section 2).
- Degree forms of adjectives are hard (comparative 1.88, superlative 2.30), while
adjectives as a whole are close to average.
- Singular nouns are harder than plurals (1.57 vs 0.90). A plausible reason is that many
plural case endings (-ων, -οις, -ας with known length rules) are resolved by the
nominal-forms and case-ending modules, while singular stems depend on the lexicons.
- Lunate sigma has the largest effect of all (3.91; in the 40 works with enough lunate
tokens, +62 points against the other tokens of the same work). Capitalized words
(2.44) are next. Elided words are slightly easier than average.
### Where in the word the unresolved vowel is
| | share of unresolved dichrona |
|---|---:|
| α / ι / υ | 54.6% / 33.5% / 11.9% |
| antepenult or earlier | **64.9%** |
| penult | 24.0% |
| ultima | 11.1% |
| unaccented / acute / grave | 79.2% / 19.2% / 1.6% |
The largest cells are α before the penult (37.6% of all unresolved dichrona), ι before the
penult (17.9%) and ι in the penult (13.3%). The accent rules can only decide penults and
ultimas (from the accent's position relative to the ultima), so vowels earlier in the word
depend entirely on the lexicons. Unresolved ultimas are rare (11%).
### Most frequent abstentions
| form | abstained | of | note |
|---|---:|---:|---|
| `ἀφ'` | 7,955 | 7,955 | elided `ἀπό` before a rough breathing; `ἀπ'` is handled |
| `δραχ` | 6,228 | 6,228 | abbreviation of δραχμή (Galen, medical recipes) |
| `Ἰησοῦ`, `Ἰησοῦς`, `Ἰησοῦν` | 10,464 | 10,464 | proper name |
| `Ἀριστοτέλης`, `-ους` | 5,467 | 5,467 | proper name |
| `Ἰουδαίων`, `-οι`, `-οις`, `-ους` | 6,994 | 6,994 | ethnic |
| `πόλιϲ`, `τὰϲ`, `ἔϲτι`, `ἐϲτι`, `ἐϲτιν`, `τιϲ` | 14,104 | 14,112 | lunate sigma |
| `ι` | 3,280 | 3,603 | single letter (numeral or label) |
| `Ἀλέξανδρος`, `-ον`, `Ἀλεξά^νδρου` | 6,286 | 6,286 | proper name |
| `ἀγὼ`, `ἀκεῖνο`, `ἀκεῖ`, `ἀκεῖνος` | 5,012 | 5,012 | probably crasis forms (κἀγώ, κἀκεῖνο) whose κ was split off in tokenization |
| `ἀποθα^νεῖν` | 1,753 | 1,753 | prefix `ἀ-` unresolved (see below) |
| `ἐπι^θυ_μί^αν` | 1,255 | 1,255 | ultima `-αν` |
Lemmas with at least 2,000 tokens that are almost never resolved include, besides names,
prefixed verbs (`ἀποδείκνυμι` 99.8%, `ἀπολαμβάνω` 100%, `διαβάλλω` 100%, `ἀποθνήσκω`
98.8%, `ὑπερέχω` 97.0%, `διατίθημι` 97.5%), logical terminology (`κατάφασις`,
`καταφατικός` 100%, `ἀποφατικός` 97.4%, `ἄτομος` 100%, `ἀσώματος` 99.9%) and `ἀγάπη`
(99.7%), `ἀνατολή` (99.7%), `μάθημα` (100%). The prefixed verbs are hard because the
prefix module only marks a prefix when the lemma minus the prefix is an LSJ headword.
### How concentrated the abstentions are
| most frequent abstained forms | share of all abstentions |
|---:|---:|
| 10 | 1.6% |
| 100 | 5.0% |
| 1,000 | 18.2% |
| 10,000 | 46.2% |
| 100,000 | 79.9% |
292,034 of the 501,814 abstained forms (58%) occur once. Adding the 1,000 most frequent
abstained forms to the custom list would resolve about 18% of the abstentions, 10,000
about 46%; beyond that it is a long tail.
## 4. Coverage by text
| collection | sentences | dichrona | ratio |
|---|---:|---:|---:|
| First1KGreek (1st1K) | 1,354,959 | 10,398,907 | 76.1% |
| Perseus | 557,173 | 4,992,187 | 77.7% |
| PTA (Patristic Text Archive) | 115,631 | 909,479 | 75.9% |
| OPP | 68,269 | 584,510 | 76.4% |
Median per work: 78.0% (1,999 works). Authors with at least 100,000 dichrona:
| highest | ratio | | lowest | ratio |
|---|---:|---|---|---:|
| Homer (tlg0012) | **94.6%** | | Suda (tlg9010) | **48.6%** |
| Aristotle (tlg0086) | 84.3% | | Aelius Herodianus (tlg0087) | **50.4%** |
| Alexander of Aphrodisias (tlg0732) | 84.1% | | tlg3135 | 69.4% |
| Plato (tlg0059) | 83.5% | | tlg4090 | 69.9% |
| tlg4015 | 83.2% | | Athenaeus (tlg0008) | 72.3% |
| Simplicius (tlg4013) | 83.0% | | Josephus (tlg0526) | 72.4% |
| tlg2001 | 82.7% | | Septuagint (tlg0527) | 73.0% |
| Aelius Aristides (tlg0284) | 81.7% | | Strabo (tlg0099) | 73.1% |
| Xenophon (tlg0032) | 80.7% | | Polybius (tlg0543) | 73.3% |
Single works: Odyssey and Apollonius' Argonautica 95.2%, Iliad 94.1%. (Author names are
given only where the TLG number is certain; the rest are left as IDs.)
- **Epic is easiest** (Homer, Apollonius ~95%), but only because these texts are in the
hypotactic crawl; see Section 4b.
- **Philosophical prose** (Aristotle, Plato and the commentators) is well above average.
- **Lexica and grammarians are hardest** (Suda 48.6%, Herodian 50.4%): they consist of
headwords, rare forms, accent paradigms and abbreviations.
- **Name-dense historiography, geography and the Septuagint** (Josephus, Athenaeus,
Strabo, Polybius, Diodorus, Septuagint) sit at 72-74%, in line with the 51.6%
abstention rate on capitalized words.
## 4b. Dialect and the hypotactic lexicon
Raw coverage by dialect is misleading, because the hypotactic lexicon is built from a
specific set of verse texts. Checked against the crawl (`hypotactic/tsv`, 38 works, crawl
`64a900b`): 43,959 of the lexicon's 48,080 entries occur in these works, and the four
Aeschylus plays crawled later (Agamemnon, Choephori, Eumenides, Suppliants, 2026-11-17)
contribute only 9 of their 5,464 words of their own, so the lexicon was built from these 38
works: Homer (all of the Iliad and Odyssey), Hesiod (Theogony, Works and Days, Shield), the
Homeric Hymns, the Batrachomyomachia, Apollonius, Aratus, Callimachus (Hymns, Epigrams),
Theocritus (part), Bion, Moschus, Lycophron, Nicander, Oppian (Halieutica, Cynegetica),
Colluthus, Triphiodorus, Pindar (all four books), Aeschylus' Persians, Prometheus and
Seven, Cleanthes, Semonides, Solon, Theognis and Tyrtaeus.
**Which OGA works are in the crawl.** Every HF sentence was checked for word 4-gram overlap
with the crawl (same normalization as the Norma decontamination), and each work scored by
the share of its sentences with at least half of their 4-grams in the crawl. The scores are
bimodal: 71 works score 0.2-0.63 and the other 1,928 at most 0.13 (almost all 0); the
threshold is 0.15. (Even Homer scores only ~0.5, because an OGA sentence spans several
verse lines and 4-grams across line ends are not in the crawl.) The split matches what is
known: Aeschylus' Persians, Prometheus and Seven score 0.45-0.53, his other four plays 0;
Quintus and Nonnus, not crawled, score 0.
**Coverage with and without the hypotactic module.** Hypotactic is the last module of the
cascade, so removing its credits gives the exact coverage without it (token level, words in
isolation). In the 71 crawled works hypotactic supplies 23.5% of all dichrona resolved;
elsewhere 2.4%.
| group | works | coverage | without hypotactic | in crawl: works | coverage | without hyp. | outside crawl: works | coverage | without hyp. |
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
| Epic | 43 | 89.9% | 70.3% | 39 | 96.0% | 74.5% | 4 | 82.0% | 64.8% |
| Doric/Aeolic lyric and bucolic | 17 | 91.5% | 65.2% | 13 | 94.5% | 66.0% | 4 | 70.9% | 59.1% |
| Ionic prose | 54 | 75.6% | 71.9% | – | | | 54 | 75.6% | 71.9% |
| Attic drama | 46 | 82.1% | 75.3% | 3 | 94.7% | 72.8% | 43 | 81.5% | 75.4% |
| Classical Attic prose | 260 | 83.8% | 82.0% | – | | | 260 | 83.8% | 82.0% |
| Koine | 223 | 77.4% | 75.4% | – | | | 223 | 77.4% | 75.4% |
| Atticist / Imperial and late literary prose | 494 | 79.9% | 77.7% | – | | | 494 | 79.9% | 77.7% |
| other (unassigned authors) | 862 | 76.7% | 74.2% | 16 | 96.1% | 68.2% | 846 | 76.6% | 74.2% |
(Token-level coverage, pooled over works; the groups are by author as in Section 4. "Epic
outside the crawl" is Quintus, Nonnus and two minor works.)
**A natural experiment within one author:** Aeschylus' crawled plays (Persians, Prometheus,
Seven) reach 94-95% coverage, his uncrawled plays (Suppliants, Agamemnon, Choephori,
Eumenides) 79-82%; without hypotactic they are level (72-74% vs 71-76%). Hypotactic supplies
21-22% of the dichrona in the crawled plays and 6-7% in the others.
**Group comparisons** (per work, works with at least 2,000 dichrona; Welch t-test and
Mann-Whitney U; "dialectal" = epic, Doric/Aeolic and Ionic; "Attic" = Attic prose and
drama):
| contrast | measure | works | mean coverage | difference | p (Welch) | p (Mann-Whitney) | Cohen's d |
|---|---|---:|---:|---:|---:|---:|---:|
| dialectal vs Attic | with hypotactic, all works | 40 / 158 | 82.5% vs 83.1% | −0.7 pp | 0.68 (n.s.) | 0.06 (n.s.) | −0.09 |
| dialectal vs Attic | with hypotactic, outside crawl | 27 / 155 | 76.1% vs 82.9% | −6.8 pp | 3e-9 | 4e-10 | −1.58 |
| dialectal vs Attic | without hypotactic, all works | 40 / 158 | 71.8% vs 79.8% | −7.9 pp | 2e-13 | 2e-13 | −1.61 |
| dialectal vs Attic | without hypotactic, outside crawl | 27 / 155 | 71.9% vs 79.9% | −8.0 pp | 8e-10 | 1e-10 | −1.65 |
| dialectal vs Koine/Atticist | without hypotactic, outside crawl | 27 / 417 | 71.9% vs 75.9% | −4.0 pp | 2e-4 | 7e-5 | −0.82 |
| Attic vs Koine/Atticist | without hypotactic, outside crawl | 155 / 417 | 79.9% vs 75.9% | +4.1 pp | 8e-16 | 2e-16 | +0.81 |
| Epic vs Attic | with hypotactic, all works | 11 / 158 | 93.9% vs 83.1% | +10.8 pp | 6e-5 | 4e-6 | +2.11 |
| Epic vs Attic | without hypotactic, all works | 11 / 158 | 73.2% vs 79.8% | −6.6 pp | 9e-4 | 2e-4 | −1.34 |
| Doric/Aeolic vs Attic | without hypotactic, all works | 5 / 158 | 63.5% vs 79.8% | −16.3 pp | 5e-4 | 3e-8 | −3.58 |
| Ionic prose vs Classical Attic prose | with hypotactic (never in crawl) | 24 / 114 | 75.8% vs 83.4% | −7.6 pp | 4e-14 | 5e-11 | −2.03 |
**Conclusions**
- The high raw coverage of epic and Doric/Aeolic verse is an artefact of the hypotactic
lexicon, which was built from largely these texts. Without it, or in texts outside the
crawl, dialectal texts are covered about 8 points *worse* than Attic ones (per work
71.9% vs 79.9%, p < 10⁻⁹, d = −1.65) and 4 points worse than Koine/Atticist ones.
Ionic prose, which is never in the crawl, is 7.6 points below Classical Attic prose.
- Attic texts are covered best, 4 points above Koine and Atticist prose, consistent with
the system's Attic-based lexicons and rules.
- Coverage is not correctness: the system normalizes to Attic vowel lengths, and its
lexicons give the length of a form regardless of dialect. Correctness can only be judged
on Norma gold (rule-based mixed accuracy: Alcman 43.3%, Bacchylides 64.4%, Quintus 78.6%,
Nonnus 75.5%, against Thucydides 88.5%; see `error_analysis.test.md`). None of the Norma
test texts is among the 38 crawled works (in OGA, Bacchylides, Quintus, Nonnus and
Aeschylus' Suppliants all score 0 overlap).
## 5. Quick wins suggested by the data
| fix | expected gain |
|---|---|
| normalize lunate `ϲ` to `σ`/`ς` before the lookups ([PR #13](https://github.com/Urdatorn/grc-macronizer/pull/13)) | ~113,000 tokens: for 58% of the 195,326 abstained lunate tokens the same word with σ/ς occurs in the corpus and is never abstained on; +16-20 points coverage on four lunate works |
| add `ἀφ'` (and other aspirated elisions) to the elision handling | 7,955 tokens |
| proper names: a name list with lengths (e.g. from the hypotactic or Wiktionary proper nouns) | a large part of the 495k abstained capitalized tokens |
| prefix module: fall back to the token's stem when the unprefixed lemma is not an LSJ headword | prefixed verbs such as `ἀποθνήσκω` |
| top 1,000 / 10,000 abstained forms into the custom list | 18% / 46% of abstentions |
| skip or expand abbreviations such as `δραχ` | 6,228 tokens |
## Appendix A. Old module counts vs top-level credits
`tokens_helped` (the `oga_macronized_modules.tsv` of the HF data) counts success events
at any recursion depth, and counts custom only when it resolves the whole word. The
credits are what Section 2 uses. All OGA:
| module | tokens_helped (events) | top-level tokens | top-level dichrona |
|---|---:|---:|---:|
| custom | 3,812,637 | 3,595,424 | 4,555,585 |
| wiktionary | 4,324,174 | 3,919,577 | 5,219,287 |
| lsj | 571,982 | 319,755 | 371,904 |
| nominal_forms | 1,008,296 | 906,910 | 935,272 |
| verbal_forms | 6,947 | 6,501 | 6,501 |
| accent_rules | 1,020,879 | 828,722 | 828,722 |
| prefix | 579,231 | 554,703 | 554,703 |
| double_accent_recursion | 48,906 | 48,529 | 61,369 |
| case_ending_recursion | 249,437 | 235,862 | 282,136 |
| reversed_elision_recursion | 22,930 | 22,908 | 23,755 |
| oxytonization | 469,280 | 424,603 | 510,121 |
| decapitalization | 58,113 | 44,011 | 50,187 |
| hypotactic | 482,600 | 401,357 | 477,095 |
| accent_rules (final pass) | (in accent_rules) | 360 | 360 |
LSJ and the accent rules are inflated most by the event count (they fire inside
recursive passes that are credited to the recursion modules).
## Appendix B. Files
| file | content |
|---|---|
| `analysis/oga_macronizer_diagnostics.md` | this report |
| `analysis/oga_diagnostics_stats.json` | all numbers, HF subset and all OGA (`hf`, `all`, `funnel_all_oga`, `ratio`, `works`, `membership`) |
| `analysis/oga_diagnostics_stats_v2.json` | baseline comparisons and per-work tests (`pos`, `features`, `shapes`), per-work coverage with and without hypotactic and crawl overlap (`works`) |
| `analysis/oga_diagnostics_crawl_by_work.json` | dialect groups and contrasts with work-level crawl membership (Section 4b), list of the 71 crawled works |
| `analysis/oga_abstained_forms.tsv` | every abstained form in the HF subset: count abstained, tokens with that form sent to the modules, lemma, POS, morph |
| `analysis/scripts/analyze_rerun.py`, `analyze_diagnostics.py`, `analyze_v2.py` | the analysis; `regroup_crawl_by_work.py` does Section 4b's work-level regrouping from `oga_diagnostics_stats_v2.json` |
| `analysis/slurm/rerun_diagnostics.slurm`, `analyze_rerun.slurm` | the jobs (rerun with smoke test and comparison; analysis) |
| `analysis/logs/` | job logs 5715083 (rerun) and 5715543 (analysis) |
The full diagnostics (33 per-process logs, 25 GB; per-token traces, 1.3 GB; module
result files; still-ambiguous tables) are archived outside the repository
(`diagnostics-job5715083.tar.zst`, 1.8 GB).