You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should a bare 'И' parse as an initial or the conjunction 'and'? (e.g. 'Хосе И Мария Сантос') #267
The initial regex is ^(\w\.|[A-Z])?$ (nameparser/config/regexes.py). The dotted branch is Unicode-aware (\w), so И. is recognized as an initial — but the bare-letter branch is ASCII [A-Z], so bare E is an initial while bare И is not.
With default constants this has no visible effect. It surfaces as soon as non-Latin conjunctions are configured (see the non-Latin constants proposal), because is_an_initial() is the veto that stops a single capital letter from being treated as a conjunction:
>>>fromnameparserimportHumanName>>>fromnameparser.configimportConstants>>>HumanName("Jose E Maria Santos").first# 'e' is a built-in conjunction;'Jose'# bare 'E' vetoed as initial -> middle 'E Maria'>>>C=Constants()
>>>C.conjunctions.add('и') # Cyrillic 'and'>>>HumanName("Хосе И Мария Сантос", constants=C).first'Хосе И Мария'# bare 'И' NOT an initial -> conjunction joins
The open question is which behavior is right. The bare-capital-initial convention ("John F Kennedy") is largely an English/Latin habit; Russian typography virtually always writes initials with periods (И. С. Петров), so treating a bare И as a conjunction is arguably correct for Cyrillic. Options:
Change the default: make the bare-letter branch Unicode-uppercase-aware so the initial veto is consistent across scripts. Downside: blocks single-letter non-Latin conjunctions by default, and bare initials without periods are rare outside English anyway.
Keep the default and document the override.regexes.initial is editable config like everything else; users who want Latin-style veto behavior for Cyrillic can use:
Note the override must be script-targeted — widening the bare branch to any Unicode letter would also match lowercase e and silently disable the built-in Latin conjunction.
Verified on v1.3.0. Related: the non-Latin constants proposal #269, #265, #266.
changed the title [-]Bare-letter branch of the 'initial' regex is ASCII-only — script asymmetry in the initial veto[/-][+]Should a bare 'И' parse as an initial or the conjunction 'and'? (e.g. 'Хосе И Мария Сантос')[/+]on Jul 7, 2026
Treating the bare letter as a conjunction is definitely the correct approach for Cyrillic.
In Russian, it is и and in Ukrainian, it is either і or й. A bare и or і or й is almost always a conjunction. Standard Cyrillic typography strictly requires periods for initials (e.g., И. Иванов, І. Франко).
Great real-world examples of this are:
Russian:"А. П. и Е. Н. Ивановы"
Ukrainian:"Олесь і Олена Коваленки"
In these examples:
и and і are conjunctions.
A. П., Е. Н. are correctly punctuated initials.
Олесь, Олена are first names.
Ивановы and Коваленки are plural family names. The correct singular base forms for the individuals would be Иванов(m) and Иванова(f) or Коваленко(m+f).
Activity
[-]Bare-letter branch of the 'initial' regex is ASCII-only — script asymmetry in the initial veto[/-][+]Should a bare 'И' parse as an initial or the conjunction 'and'? (e.g. 'Хосе И Мария Сантос')[/+]l1asis commentedon Jul 29, 2026
Treating the bare letter as a conjunction is definitely the correct approach for Cyrillic.
In Russian, it is
иand in Ukrainian, it is eitherіorй. A bareиorіorйis almost always a conjunction. Standard Cyrillic typography strictly requires periods for initials (e.g.,И. Иванов,І. Франко).Great real-world examples of this are:
"А. П. и Е. Н. Ивановы""Олесь і Олена Коваленки"In these examples:
иandіare conjunctions.A. П.,Е. Н.are correctly punctuated initials.Олесь,Оленаare first names.ИвановыandКоваленкиare plural family names. The correct singular base forms for the individuals would beИванов(m) andИванова(f) orКоваленко(m+f).derek73 commentedon Jul 30, 2026
Thanks for the reply. v2.0 of the parser behaves this way by default. Just wanted someone to verify that it was the right call. Thanks!
Merge pull request #306 from derek73/fix/ukrainian-conjunction
docs(rules): topic-review amendments from the issue-filing session (p…
Add the Ukrainian conjunction й (derek73#267 comment, derek73#269 fol…
Pin the initial-repertoire behavior at parse level (derek73#320)
docs(design+release): the evidence rule for single-letter connectives…
Split the eight two-signal rules: P8, P9, C13, and S2's periods claus…