Repository navigation
Description
An initial typed without a space before the surname (M.Hassan) has the same shape as a credential written in two chunks (B.Pharm, C.Psych). At the end of a name, S3 (credentials written in joined chunks) reads an unlisted word of that shape by position, the way S4 reads a bare ambiguous acronym. So when the name has words to spare, the surname becomes a suffix:
"Ahmed Ali M.Hassan" → given="Ahmed", family="Ali", suffix="M.Hassan" (SUFFIX_OR_NAME)
"Ahmed Ali M.Hassan, PhD" → family="Ali", suffix="M.Hassan, PhD" (SUFFIX_OR_NAME)
"Hassan, Ahmed M.Ali" → family="Hassan", suffix="M.Ali" (SUFFIX_OR_NAME)
"Ahmed M.Hassan" → family="M.Hassan" (no words to spare)
"M.Hassan, Ahmed Ali" → family="M.Hassan"
"Ahmed Ali B.Pharm" → suffix="B.Pharm" (SUFFIX_OR_NAME)
"Ahmed Ali M.Med" → suffix="M.Med" (listed)
The parser already reports that it guessed (SUFFIX_OR_NAME). The credentials that share the shape are a short list of spellings, though, and listing them would take most of the guessing out of this shape.
Found by comparing against the Rust crate human_name, which splits after a dotted single letter (F.Joachim Weyl → given Joachim) and reads its test row X.Gironés as family Gironés.
How often, and which way the guess is right (measured 2026-11-02, tree 854087b)
Recipe: a token matching (?<![\w.])[A-ZÀ-Þ]\.[A-ZÀ-Þ][a-zà-ÿ'\-]{2,}(?![\w.]), across the local corpora orcid-researchers, ctgov-officials, patentsview-inventors, psc-individuals, nepal-candidates and cz-candidates, parsed with parse(). "Listed" means the token carries vocab:suffix. Whether the second chunk is a credential or a name was sorted by hand from a list of credential chunks (phil, med, pharm, psych, kes, kep, eng, physio, tech, sci, …).
| unlisted token | read as suffix | read as a name word |
|---|---|---|
credential (B.Pharm 16, C.Psych 16, M.Kes 8, M.Pharm 6, M.Sci 5, M.Kep 4, P.Eng 4, …) |
115 | 5 (M.Tech 3, M.Biomed, D.Tech) |
| glued initial + name | 63 | 1,116 |
Where the shape is read by position as a suffix, it is a credential about 2 times in 3, so flipping the default would lose more than it wins. Most of the 115 credentials are a short list of spellings. The top 15 unlisted spellings cover most of them, and several (the Indonesian M.Kes, M.Kep, M.Kom, S.Kom, S.Ked) are degrees the vocabulary does not hold at all.
Proposal: list the credentials, don't recognize them by shape
When: a two-chunk credential such as B.Pharm, C.Psych, M.Kes, M.Pharm, M.Sci, M.Kep, P.Eng, B.Physio, B.Med or M.Tech ends a name.
Then: it reads as a suffix because the vocabulary lists it (a measured batch through tools/vocab/, with bearer checks on each spelling), with no SUFFIX_OR_NAME report. S3's position reading of unlisted words stays as it is.
Because: a credential written in chunks belongs to a closed set that can be listed, while the shape is also written by other things. Besides a glued initial and surname, it is the writing of unspaced initials (#490's E.T. Smith, #995's Иванов И.И.). A shape rule narrow enough to separate those would still match P.Eng and C.Psych exactly.
Accepted: a glued initial and surname at the end of a name with words to spare (Ahmed Ali M.Hassan) keeps losing its surname to the suffix, reported as SUFFIX_OR_NAME. That was about 63 names in the corpora above.
Declined: reading the narrower shape (a single capital, then a capitalized chunk of three or more letters) as a name word by position. It cannot tell M.Hassan from P.Eng, and any unlisted credential would then read as the family.
Missing spaces this could correct
The 1,116 name readings are mostly the opening word (A.Michael Lincoff → given A.Michael) or the only word after the given name (Ahmed M.Hassan → family M.Hassan). The parts land in the right place, but an initial is stuck to a name. Some datasets routinely leave out the space after an initial (#995's Slavic data writes И.И.). So this belongs on the list of missing spaces the parser could restore, beside #490 (E.T. Smith) and #995. It is noted here and not proposed: inserting the space is a tokenization question, and it should be answered for all three shapes at once.
Open questions
- With the batch listed, how many of the 63 names does the position reading still take, and how many unlisted credentials remain?
- Comma shapes: the given part after a family comma (
Hassan, Ahmed M.Ali, read by S5) gets the same answer from the vocabulary. Check the batch's grid for it.
🤖 Generated with Claude Code
Activity
derek73 commentedon Nov 8, 2026
The same glued shape at the front of a name, often with several initials, from the 2024 Lok Sabha candidate list (2026-11-07, 8,103 distinct names): 95 names start with dotted initials glued to the next word (
R.K.SURESH,A.K.GANESH). Today they read as one given name:R.K.SURESHgives given 'R.K.SURESH', family ''R.K.SURESH KUMARgives given 'R.K.SURESH', family 'KUMAR'R.K. SURESHgives given 'R.K.', family 'SURESH'At the front there's no credential reading to compete with, unlike the end of a name, where #998's
B.PharmandC.Psychshare the shape. So splitting after the last dotted single letter, as the Rust cratehuman_namedoes, has less to lose here.Record how a word joined at its full stop is read (decisions/period-j…
Mark msi ambiguous again, and correct the #998 entries after review
Merge master into fix/issue-998-credential-batch
Correct the ded line's reach and bed's gain in the #998 entries
derek73 commentedon Nov 10, 2026
PR #1297 lists the batch:
en.toml, 16 inid.tomlandM.Enfinpt.toml.msiis marked ambiguous, because Msi is a Xhosa surname.peng,ceng,barch,bchir,mendo,bed,ssi(the romanized Korean honorific 씨),sked,shut,merg,makandmor.The figure decisions/period-joined-words asks for (measured 2026-11-09)
The question: how many unlisted credentials written without a final stop would the division read as name words, and how many glued initials would get their surname back?
The recipe is the one above:
(?<![\w.])[A-ZÀ-Þ]\.[A-ZÀ-Þ][a-zà-ÿ'\-]{2,}(?![\w.])in orcid-researchers, ctgov-officials, patentsview-inventors, psc-individuals, nepal-candidates and cz-candidates, counting distinct names per source.(B.Sc;).P.Eng4,B.Chir2,M.Phill2, then one each:S.Hut,B.Tech,B.Arch,C.Eng,M.Endo,S.Ked,M.Specialist,M.Sec,M.Science,M.Erg(14 in ctgov-officials and 4 in ORCID; 16 after a comma)D.Tharu4,M.Amin2,M.Sami2, …A.Michael→A. Michael)A.Professor14,A.Prof4)So with the batch listed, the division costs 18 credentials and gains 63 surnames. Before the batch, the shape's suffix readings were 114 credentials against the same 63. 12 of the 18 are tokens of 8 spellings this batch refuses; the other 6 are one-offs or misspelled (
M.Phill).The issue's shape needs three letters after the stop. With a second chunk of any length, the cost rises to 44 (
M.Ed8,B.Ch5,S.Si4,P.Eng4,B.Ed2, …) and the gain stays at 63. 42 of the 44 stand after a comma. 33 are tokens of spellings the vocabulary refuses: 20 refused here, and 13 ofmedandbch, refused in #1131. So whatever name test the division ships with has to refuse a two-letter chunk, or a word after a comma, or pay for these.The rest of the question moves to #1255, where the division is decided.
🤖 Generated with Claude Code
List credentials written in two chunks joined at a full stop (#998) (#…
Merge origin/master (#998's credential batch) into the H10 branch