Skip to content

Use letter case to disambiguate suffix vs. surname: "Jack MA" vs "Jack Ma" #289

Description

@derek73

Four post-nominals in suffix_acronyms_ambiguous are also ordinary surnames: do, ed, jd, ma. The parser decides between the two readings by position — an ambiguous acronym is a credential when removing it still leaves a given and a family name, and a surname otherwise:

>>> parse("Jack MA").family
'MA'
>>> parse("John Smith MA").suffix
'MA'

That rule works well, but it throws away a signal the input already carries. Letter case is currently ignored entirely — these parse identically today:

>>> parse("Jack MA").family,       parse("Jack Ma").family
('MA', 'Ma')
>>> parse("John Smith MA").suffix, parse("John Smith Ma").suffix
('MA', 'Ma')

Yet MA and Ma read very differently to a person. In "Jack MA", all-caps suggests a degree; in "John Smith Ma", title case suggests a surname. Both are cases where the positional rule and the case signal disagree.

The constraint that makes this non-trivial: case is only informative when the input as a whole varies in case. JOHN SMITH MA and john smith ma come from all-caps and all-lower data sources, where case carries no information at all — and a lot of real name data looks like that. So this can't be a hard rule; it would have to be a tiebreaker consulted only when the string shows mixed case, which the parser would need to determine first.

Sketch, if it's worth doing:

  • decide whether the input is uniformly cased (all upper, all lower) or mixed
  • only for mixed-case input, let an all-caps ambiguous acronym lean credential and a title-case one lean surname
  • keep the positional rule as the fallback whenever case is uninformative

This stays deterministic — no model, no training data — so it doesn't conflict with the parser's guarantee that the same input always parses the same way.

Came out of the 2.0 work on the positional rule (8147ac6); capitalized() already reasons about single-case vs mixed-case input, so some of the detection logic exists.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions