Skip to content

Should John Smith y Maj. read title Maj., as John Smith y Prof. does? (today: family Smith y Maj.) #1168

Closed

Description

@derek73

P13 (a connective ending the name words) steps over a trailing title to find the connective, but its test for "a trailing title" is a hand-written copy of H5 (the trailing title run)'s. The copy lacks #999's arm for a gated title written short, so the walk stops at Maj. and Gen. where it steps over Prof. and Dr.:

>>> parse("John Smith y Prof.").title, parse("John Smith y Prof.").family
('Prof.', 'Smith y')
>>> parse("John Smith y Maj.").title, parse("John Smith y Maj.").family
('', 'Smith y Maj.')
>>> parse("John Smith Maj.").title
'Maj.'

Proposed: _group._is_trailing_title calls _pieces.is_trailing_title_word, the predicate H5's chain asks. That's one call in place of one call, so it costs no frames.

Measured (#1158's pass, on 87,384 grid rows): no corpus name moves. 108 grid rows move, all given-first and all Gen./Maj.; for example, JUAN GARCIA y Maj. goes from family GARCIA y Maj. to title Maj., family GARCIA y. A second 12,800-parse grid moved 246, each toward the Prof. reading.

Also: a guard test asserting that P13's walk-back steps over every lone trailing word _pieces.trailing_candidates admits, so the next drift between the two fails a test. P13 rows with a gated title go into the case table. Found by #1158's simplify pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions