Skip to content

Commit cb5088a

Browse files
derek73claude
andauthored
Add familiar forms from Wikidata's people for Central and Eastern European and Balkan languages, holding the spellings (#1387) (#1503)
* Add a Wikidata generator of familiar-form candidates per language (#1387) tools/vocab/familiar_wikidata.py fetches, country by country, the statements three relations read (birth name against the label, a stated nickname against the given name, the label against the given name) and writes candidate pairs by the language they were found in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Ship the familiar forms two readers agreed on from Wikidata's people (#1387) 766 candidate pairs at two people or more, read by two readers, add 235 familiar forms and 64 alternate spellings in fifteen Central and Eastern European and Balkan languages' files. The generator merges spellings the name match folds alike, and refuses a given-name label that is no name word. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Record #1387's recipe, review and measurements, and credit Wikidata Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix the review's findings: cache keys, cut answers, counts and duplicate rows (#1387) The generator keys each kept answer by its query, writes it under a temporary name of its own and checks it whole when read back, refuses an answer cut inside its last line, reads the cache alone for pairs, counts each column's people once, leaves out a language whose name items it cannot read, and wants a family name in a label. The review drops 11 rows the match reads as another pair, and the spelling test of 2026-11-13 splits 18 agreed spellings, which ship nowhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Record the measured match_diff of the fixed review (#1387) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix the fix commit's review: placement, the birth relation and retries (#1387) A reviewed row's people and languages are the committed tool's, so a pair merged from two spellings keeps every language it was found in (cs.toml had lost vlado); an unreadable family name stops only the two relations that set the family name aside; and the five rows the tool draws for no one leave the review. The retry arms of ask are tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Place each Wikidata pair in the languages its readers judged it in (#1387) The tool's languages added Belarusian to Алёна / Елена through its split twin and dropped Slovak Zuzka; a row's languages are now its own and its same-verdict fold-twins' at review time, and a test holds each direction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Close the HTTPError the retry tests and ask leave open (#1387) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Hold Wikidata's alternate spellings back, shipping the familiar forms alone (#1387) The spelling test that passed the 46 agreed spellings read all three of its planted translations as spellings, so its agreement is no evidence: decided 2026-11-20, they are recorded as a new review category, held, and ship nowhere. ALTERNATE_SPELLINGS is master's again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Correct a comment and the licence entry the hold left stale (#1387) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 35b12d3 commit cb5088a

30 files changed

Lines changed: 3544 additions & 69 deletions

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ The compiled sets, read by `Lexicon` (mostly as the `_sets` field of the same na
282282
- the views' kinds — `GENERATION_WORDS`, `CREDENTIAL_WORDS` (a credential written as a word), `HONORIFIC_WORDS` and `PATRONYMIC_PARTICLES` (3.0's 4b and 4c), private: the kinds the other sets do not record, which classify reads to tag a word for the `generation`, `credentials`, `honorifics` and `patronymic` views (rules/R8, rules/R9)
283283
- case masks — `CAPITALIZATION_EXCEPTIONS` mapping of case MASKS (e.g. `{'phd': 'PhD'}`), compiled from the `cased` property, at most one per word: each value is its key's own letters and digits recased, laid over the word as written, so `ph.d.` repairs to `Ph.D.` and repair never writes the value's own punctuation into the word (#459); `Lexicon` raises `ValueError` on a value that spells anything else; and `CAPITALIZED_PARTICLES` (the `saint` and `rank` kinds, private), the particles case repair writes with a capital rather than in lowercase, keyed on the kind so a word needs no mask of its own (rules/R4, #1069), and `CAPITAL_OPENING_PARTICLES` (the particle readings written `capital_opening`, `ter` and `der`, private), the particles case repair writes with a capital where the word before it in the family name is no particle, nor, where it opens the family name, the word written right before it in any role (`Levon Ter Petrosyan`, but `Jan van der Berg` and `Van der Walt`), keyed on a property because `der`'s kind, `article`, is `de`'s and `la`'s too (rules/R12)
284284
- listed spellings — `SAME_AS`, private, read by `Lexicon` as `_same_as` and nowhere in a parse: every `same_as` keyed by the group of its reading's kind (`_reading_index.SAME_AS_GROUPS`: `given` for a given name or a bound given name, `family` for a surname or a particle, `title`, `suffix`), each word with every full form it carries there (`sr` among titles is both `señor` and `senhor`). The name match (`_match.py`) reads each role in its group through `Lexicon._headwords`, every word reachable through the group's links, so a given name's spelling never matches a surname (`Ma, Jack` / `María, Jack` conflict) and a loop is simply all its words (decisions/name-matching, 2026-11-08); and `SAME_AS_NAMED`, per group, the words of it whose name reading's `same_as` stands beside a name reading of the same kind with none, a name of its own too (`jo`), whose links `_headwords` follows only where `_match._spellings` read the word with its trailing period (the 2026-11-08 #1006 follow-up)
285-
- familiar forms — `FAMILIAR`, private, read by `Lexicon` as `_familiar` (through `Lexicon._familiar_forms`) and nowhere in a parse: each `familiar` reading's `short_for`, the longer given names a short one stands for (`max` -> `maximilian`, `maxwell`), every file's together, which `Lexicon` reads both ways (a pair matches whichever way its source wrote it, never chained) and the name match reads as the opt-in `familiar-form`. `familiar` is a category of its own, never a `given` reading, which would move parses where the word is also a title, particle or suffix; a choice neither prefers nor drops by it (`_reading_index.UNPREFERRED`), and `tools/vocab/familiar.py` writes the shipped ones, and the shipped spellings, from `tools/vocab/familiar_reviewed.tsv` alone, the pairs `tools/vocab/familiar_candidates.py` finds in ORCID, and a few familiar forms the FEC's filings and Congress's legislators evidence, counted by recipes in decisions/name-matching rather than a committed tool, as two readers reviewed them (decisions/name-matching, 2026-11-08 FAMILIAR FORMS, 2026-11-12 ALTERNATE SPELLINGS ARE OPT-IN and 2026-11-13 THE FAMILIAR FORMS FROM DATA ALONE); and `ALTERNATE_SPELLINGS` beside it, each `spelling` reading's `spelling_of`, the given names a name is another spelling of by the person's or a romanization's choice (`olha` of `olga`), read by `Lexicon` as `_alternate` (through `Lexicon._alternate_spellings`) both ways and never chained, and by the name match as the opt-in `alternate-spelling`: a kind of its own, never a `given` reading's `same_as`, which would make the word a name written short and move parses (`GIVEN_NAME_ABBREVIATIONS`)
285+
- familiar forms — `FAMILIAR`, private, read by `Lexicon` as `_familiar` (through `Lexicon._familiar_forms`) and nowhere in a parse: each `familiar` reading's `short_for`, the longer given names a short one stands for (`max` -> `maximilian`, `maxwell`), every file's together, which `Lexicon` reads both ways (a pair matches whichever way its source wrote it, never chained) and the name match reads as the opt-in `familiar-form`. `familiar` is a category of its own, never a `given` reading, which would move parses where the word is also a title, particle or suffix; a choice neither prefers nor drops by it (`_reading_index.UNPREFERRED`), and `tools/vocab/familiar.py` writes the shipped ones, and the shipped spellings, from `tools/vocab/familiar_reviewed.tsv` alone, the pairs `tools/vocab/familiar_candidates.py` finds in ORCID, a few familiar forms the FEC's filings and Congress's legislators evidence, counted by recipes in decisions/name-matching rather than a committed tool, and the Central and Eastern European and Balkan pairs `tools/vocab/familiar_wikidata.py` finds in Wikidata's people (a birth name beside the label, or a nickname or the label beside the given name, per language; 2026-11-20 #1387), as two readers reviewed them (decisions/name-matching, 2026-11-08 FAMILIAR FORMS, 2026-11-12 ALTERNATE SPELLINGS ARE OPT-IN and 2026-11-13 THE FAMILIAR FORMS FROM DATA ALONE); and `ALTERNATE_SPELLINGS` beside it, each `spelling` reading's `spelling_of`, the given names a name is another spelling of by the person's or a romanization's choice (`olha` of `olga`), read by `Lexicon` as `_alternate` (through `Lexicon._alternate_spellings`) both ways and never chained, and by the name match as the opt-in `alternate-spelling`: a kind of its own, never a `given` reading's `same_as`, which would make the word a name written short and move parses (`GIVEN_NAME_ABBREVIATIONS`)
286286

287287
- the group suggester's tables — `config/_order_names.py`, private, written by `tools/vocab/order_names.py` (`--write`; its hand-kept spelling lists sit above the generated blocks) and read by `_suggest` only, never by a parse or a `Lexicon`: `ROMANIZED_SURNAMES` (zh, ko and vi surnames folded by `_suggest.fold`), `COMMON_GIVEN_NAMES`, and `COMMON_SURNAMES` (#1364, the given names' mirror: family-box words ORCID's holders rarely type as a given name, mostly Spanish), the two surname tables read together as `SURNAMES`. They are not `Lexicon` kinds, so a language choice, `strict=True` and a caller's edit do not reach them and no snapshot moves with them (decisions/group-suggestion, 2026-11-10 TABLES)
288288

0 commit comments

Comments
 (0)