Repository navigation
Title-case Mac in case repair unless a mask records the name (#1014) - #1016
Merged
Merged
Conversation
Case repair capitalized after any `ma?c` prefix, so a single-case MACHADO repaired to MacHado, MACIAS to MacIas. Measured over 4,616 mixed-case Mac writings in four local corpora, that matched the writer's spelling 16.3% of the time; plain title case 83.7%. Mac is now title-cased unless the vocabulary records its casing; Mc keeps its convention (96.8% of 6,312 writings). 42 Gaelic surnames written MacX by most of their bearers (at least three writings) get masks as `family` readings carrying `cased`, which name readings may now carry: in en.toml, and again in gd.toml and ga.toml by origin so a strict Gaelic choice keeps them. Measured match with the masks: 91.2% (in-sample). A chunk after a full stop now takes its own mask, as a hyphen part does, so J.MACDONALD keeps its capital (J.MacDonald) and credential chunks take theirs (Phd.Md forced -> PhD.Md). rules/R4 and R5 amended; decisions/R4 records the measurement and recipe; REGEXES["mac"] keeps its key and matches Mc alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…case-repair # Conflicts: # nameparser/config/regexes.py # tests/v2/test_regex_sync.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1014.
What changes
capitalized()no longer gives an inner capital after aMacprefix by shape alone:JOHN MACHADOJohn MacHadoJohn MachadoMARIA MACIASMaria MacIasMaria MaciasJAMES MACKENZIEJames MacKenzieJames MackenzieRONALD MACDONALDRonald MacDonaldRonald MacDonald(mask)J.MACDONALD SMITHJ.MacDonald SmithJ.MacDonald Smith(chunk mask)JOHN MCDONALDJohn McDonaldMacXby most of their bearers (more than half of at least three writings) carry acasedmask on afamilyreading. Name readings may now carrycased(_reading_index.BEHAVIORAL), and an entry holding only such a reading compiles, so the build no longer warns it inert.en.toml, the anglicized spellings being English ones. They are listed again ingd.toml(37) andga.toml(the Irish MacCarthy, MacMahon, MacManus, MacDermott), soparser_for(locales.GD/GA, strict=True)keeps them.J.MacDonald, and it lets credential chunks take theirs in forced repair (Phd.Md→PhD.Md,Msc.Ed.→MSc.Ed.)._render._MACbecomes_MC, matching Mc alone (nameparser.config.regexes, which held the public copy, left master in Removenameparser.config.regexesin 3.0? The parser has not readREGEXESsince 2.0 #1008).Measured (2026-11-02)
The sources are ORCID's family-name box plus the names in the UK Electoral Commission donors, GOV.UK people and ClinicalTrials.gov officials local corpora. Each writing was counted as typed; the recipe is in decisions/R4's 2026-11-02 #1014 entry.
MacX)Bearers of the Gaelic names split by family: MacDonald 143 vs Macdonald 77, Mackenzie 59 vs MacKenzie 44. So no shape can decide them, and a per-word mask can.
Accepted costs:
SHIRLEY MACLAINE→Shirley Maclaine. The release log points callers toLexicon.capitalization_exceptions.McX:Mchunu→McHunu.Moves
Macáková/Machová,MacíasandMachbubaare fixed;Shirley Maclaineand the fictionalmacdole-eisenhowerare the accepted cost; forcedMsc.Ed.→MSc.Ed..snapshot.py --local ctgov-officials --basemaster:mac.ukec-individuals: 69 moves, all Mac names.Docs
Shirley MaclainetoRonald Macdonald, since the forced repair of the old one now changes nothing.rules_budget.json.Checks
-m serialbenchmarks, mypy, ruff andbuild.py --checkpass.🤖 Generated with Claude Code