Skip to content

Should Smith Mary match Mary Smith? An opt-in match that reads one side under the other name order #1303

Open

Description

@derek73

A list that mixes "First Last" and "Last First" without commas gives pairs the matcher calls inconsistent and keys apart. On master (01b982e):

>>> m = Parser().matching(other_readings=True)
>>> m.check("Smith Mary", "Mary Smith").consistent
False
>>> sorted(m.keys("Smith Mary")), sorted(m.keys("Mary Smith"))
(['mary;s'], ['smith;m'])

Callers work around it now by building a key for both orders: dataesr's athena builds prenom nom and nom prenom and confirms with an institution, and OpenAlex's pairwise check has a two-word swap fallback. ourresearch/whatsername#1 asks for the same thing on the parsing side.

Proposal: an opt-in "other reading" for the matcher: the name parsed again under the other name_order. It is tried the way other_readings tries an ambiguity's alternative, and keys() covers it, so keys still never separate a consistent pair. A match through it reads as its own outcome, so the table says one side was read in the other order.

Questions to settle

Related: #1006, #1263.

Activity

  1. added this to the 3.1 milestone on Nov 10, 2026
  2. self-assigned this
    on Nov 10, 2026
  3. added
    matchingName matching: Parser.matching(), check() and keys()
    on Nov 10, 2026
  4. changed the title [-]Should `Priem Jason` match `Jason Priem`? An opt-in match that reads one side under the other name order[/-] [+]Should `Smith Mary` match `Mary Smith`? An opt-in match that reads one side under the other name order[/+] on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

matchingName matching: Parser.matching(), check() and keys()

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions