Skip to content

JOSE E MARIA SANTOS reads the conjunction E as an initial; an all-caps name carries no case signal to read it from #479

Description

@derek73

A single-letter conjunction is read as an initial whenever it is written uppercase — including when the whole name is uppercase, where the capital says nothing about the writer's intent.

JOSE E MARIA SANTOS is a differential corpus name. Measured:

input given middle family e tagged
jose e maria santos jose e maria santos conjunction
Jose e Maria Santos Jose e Maria Santos conjunction
Jose Ortega Y Gasset Jose Ortega Y Gasset initial
JOSE E MARIA SANTOS JOSE E MARIA SANTOS initial

This is a parse difference, not a rendering one: the conjunction joins the pieces around it in the lowercase spelling and splits the name in the uppercase one.

The distinction

Row 3 is working as intended and should stay. In a mixed-case name the writer has made an explicit choice: they wrote Ortega Y Gasset with a capital Y when the convention is lowercase, so reading it as an initial honors what they wrote. That is the same principle the case-repair gate already runs on — mixed case is the writer's decision and the library defers to it (rules.md#R5, decisions.md#R5).

Row 4 is the defect. In an all-uppercase name every letter is capital, so the capital on E carries no information at all. The initial reading is an inference drawn from a signal that is not there, and it silently restructures the name.

Mechanism

_INITIAL is ^(\w\.|[A-Z])$ — a bare single uppercase letter matches, and nothing consults whether the surrounding name is uniformly uppercase. Nothing in the pipeline computes that today (grep for isupper across nameparser/_pipeline/ returns nothing), so this needs a signal the parse does not currently carry. capitalize() has an equivalent notion in its own gate, but that is in _render and runs after the parse.

Affects the single-character members of Lexicon.conjunctions: &, e, y, и, й, і, و.

Scope, measured over the 1,103-name differential corpus

  • 1 name is in the defect class: JOSE E MARIA SANTOS.
  • 13 names are in the working-as-intended class — mixed-case with an uppercase single-letter conjunction token, John E Smith among them. Any fix must leave all 13 alone, which is what makes "uppercase means initial" the wrong rule to simply delete.

Not new

Shipped since 1.x and untouched by #458. 1.4.0 gives first='JOSE', middle='E MARIA', last='SANTOS' for the uppercase spelling and first='jose e maria', last='santos' for the lowercase one — the same split. So a fix is a deliberate deviation from v1 and needs a release-log classification.

Split out from #478, which is the related but distinct capitalize() question about hyphenated tokens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions