Skip to content

parse("Andrew") reports no ambiguity, but given-or-family is a guess #449

Description

@derek73

A name with exactly one name word carries no information about which field that word belongs to. The library reads it as the given name so the same input always reads the same way — a convention, not a determination — and reports nothing:

parse("Andrew").given        # 'Andrew'
parse("Andrew").ambiguities  # ()

rules.md#A1 already sets the contract this falls under: "where the text's structure or a word's reading is genuinely uncertain, the parse completes on the best reading and carries an ambiguity report naming the doubt." This is such a case and carries none. AmbiguityKind has seven members and no given-or-family fork; PARTICLE_OR_GIVEN is the shape one would follow.

The hard part is the condition, not the report

mechanisms.md#AMBIGUITY-AT-THE-DECISION-SITE requires a fork to fire where the outcome was chosen, not where the code arrived — its recorded failure is a fork reported for all 39 ambiguous particles on "Dr. Van Jr." on the weaker test.

"Exactly one name word" is the weaker test. Measured over the 1,085 differential corpus names, a naive lone given word, nothing else decided it condition fires on 19:

Andrew · abdul · de                        <- the actual subject: one word, no information
Duke of Edinburgh · Duke of Wellington     <- a particle join; the lone "name word" is a joined unit
Dean of Chemistry · John of the Doe
John & Jane · Juan and Garcia · e and e    <- conjunction joins
, John                                     <- a comma name

Only three or four are the case this issue is about. The rest have real structure in the input — particles, conjunctions, a comma — and the parse made a decision about them; they merely end up as a single unit afterwards. A fork there would cry wolf.

So the condition wanted is closer to "no vocabulary, no structure and no rule contributed to this reading" than to a word count, and working that out is the substance of the issue.

Where it must not fire

Every rule that carves an exception from the lone-word convention has decided the word, so none of these is a guess:

input decided by fork?
Andrew nothing yes
Dr. Smith H1 no
'Smitty' Smith N3 no
Sir John H1's given-name-title carve-out no
Smith née Jones M4 (#445) no

Note #445 reduces this issue's population: it turns a class of guesses into determinations. Measure the fork's reach after #445 lands, not before.

Also worth weighing

  • A new AmbiguityKind member is a public enum addition, so it is a compatibility surface in a way a parse fix is not.
  • A bare one-word name is a common input. A new fork on it reaches every caller reading .ambiguities, and the differential gate reports ambiguity changes, so the blast radius should be measured before the reading is chosen.

Raised by Derek on #445: "given or family is really a guess. we have no information, it could be either. we pick one to be consistent." #445 records that framing in rules.md#O5 — the convention is written as a convention — so adding the report later changes behavior against a rule that already describes the doubt rather than contradicting one that denied it.

Activity

  1. self-assigned this
    on Aug 27, 2026
  2. added this to the v2.3 milestone on Sep 7, 2026
  3. added a commit that references this issue on Sep 8, 2026
  4. derek73 commented on Sep 8, 2026

    @derek73
    OwnerAuthor

    Shipped in 2.3.0 via #518 as AmbiguityKind.GIVEN_OR_FAMILY ("given-or-family").

    What reports. A name of one name word that nothing else decided is read by rules.md#O5's convention — given under the default order, family under a declared family-first one — and now says so, with detail naming the field the convention chose (the kind cannot, because the field follows name_order; the PARTICLE_OR_GIVEN precedent). The report is emitted at the one site in assign that places the word. Your framing from #445 is the rule's statement: given or family is a guess, the parser picks one to be consistent, and the guess is recorded.

    The measured population is 27 corpus names, not the three or four the issue's naive count suggested — because a conjunction join reads as ONE unit (Duke of Edinburgh, John of the Doe), a lone word beside a suffix is still a lone word (Smith Jr., 'Smitty' Jones Jr., Donald mc), a glued-honorific peel can leave a Latin word the script cannot order (Andersonさん), and three names have a script rule that declined to decide (マイケル, 王·Smith, 田中、太郎). Derek chose to report on the whole O5 population as the rule defines it rather than narrow the emitter to bare words.

    What stays silent, and why: a title anywhere in the name, before or after a family comma (Dr. Smith, John V, Dr.); a family comma that names a family (Smith, Andrew); a maiden marker (#445's Smith née Jones); a nickname standing alone (N3); bound-given, particle and initial-shape claims (abdul, de, J.); and every name a script rule ordered (W4) — the guard tests whether a script_orders entry RESOLVED the order, not whether it agreed with the declaration, so 毛泽东 is silent under FAMILY_FIRST as well. A nickname or a suffix standing BESIDE the lone word decides nothing about its field, so those names report; the first draft claimed otherwise and the mutation counts (nine and one names) corrected it.

    Your compatibility note — "a new AmbiguityKind member is a public enum addition" — holds, and the enum's own contract licenses it in a minor release; it went in as an Additions bullet the way SEGMENTATION did in 2.1.0. HumanName exposes no ambiguities, so the v1 surface is untouched. The differential compares _ambiguities from baseline 2.0 on: 27 names diff on that pseudo-field alone, classified under six rules (one Latin alternation and five literal CJK-bearing rules the honorific guard forces), and no role changed for any corpus name under any order.

    The "honest output" flag the #471 close-out deferred to this bundle is this kind. Rationale: decisions.md#O5, the 2026-09-07 entry.

  5. added 4 commits that reference this issue on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions