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
particles_ambiguous has no effect on the parse under name_order=FAMILY_FIRST #359
Removing a word from particles_ambiguous — the customization docs/customize.rst documents — changes no field at all under a non-default name order:
van LISTED default given='van' family='Gogh' amb=[particle-or-given]
van REMOVED default given='' family='van Gogh' amb=[] <- knob applies
van LISTED FAMILY_FIRST given='Gogh' family='van' amb=[particle-or-given]
van REMOVED FAMILY_FIRST given='Gogh' family='van' amb=[] <- identical fields
Only the ambiguity report moves. The same asymmetry read from the other end: a name opening with a never-given particle stops folding into the surname.
default FAMILY_FIRST
de Mesnil family='de Mesnil' family='de', given='Mesnil'
de la Vega family='de la Vega' family='de', given='la Vega'
Compare "Juan de la Vega", where the chain does survive the order change and only the destination flips (family='de la Vega' -> given='de la Vega') — that case works as intended.
Cause
nameparser/_pipeline/_post_rules.py:80-92 keys on roles, not position:
It fires only when the leading particle was assigned GIVEN, which happens under given-first ordering. Under FAMILY_FIRST that token is already FAMILY and the following piece is GIVEN, so the tag test inspects the wrong token and declines. The rule's intent — "a leading never-given particle means the whole name is a surname" — is order-agnostic; its implementation is not.
The decision, not just the fix
Worth settling before touching it: what shouldname_order=FAMILY_FIRST mean for a Latin-script name opening with a particle? Reading "de Mesnil" as family de plus given Mesnil is defensible if the caller has declared family-first and means it. If the answer is "the particle still chains", the rule needs to key on position rather than role.
Docs that must move with the behaviour
Both written in #354, both accurate today, both stale the moment this changes:
nameparser/config/particles.py — the PARTICLES docstring asserts Policy(name_order=FAMILY_FIRST) gives family de, given Mesnil
AGENTS.md:136 — the same claim
#358 deliberately scoped its documentation sweep to the default order and asserts nothing about non-default orders for never-given particles, precisely so it would not bless this output.
Found while sweeping #355. Any fix needs a differential run — it changes parse output for a shipped policy.
Activity
Say what membership decides, not what it chains (#355)
Cover the shapes the fold's guards actually depend on (#359)
Say what rule 1b enforces, and name both family-first orders (#359)
Scope the last two leading-particle claims, and cite the open questio…
Stop documenting the Sir de Mesnil reading as intended (#359, #367)
Merge pull request #361 from derek73/claude/issue-359-particle-fold-o…
Say which fields the title fix actually moves (#367)
docs(rules): topic-review amendments from the particle-arc session (p…
Key the leading-particle fold on position, not on the GIVEN role (der…
Move the docs that said FAMILY_FIRST splits at the particle (derek73#359
State rule 1b as the invariant it enforces, not as a leading-particle…
docs(release_log): say what the release is, plainly
Correct AGENTS.md's particles.py bullet to P1's one-site fold