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
Share group's connective-join loop with the comma decision's title chain #617
#613 (PR #616) moved rules.md#C1's comma decision to the head of group (_pipeline/_comma.py). The decision reads the part after the comma before any join, but one join has to happen first: rules.md#P3's connective binding title words into one title (John Smith, Mr. and Mrs.). _comma._title_chains makes that join with its own copy of group's connective loop (_group.py, the P3 chain inside _group_segment).
The two copies already differ:
Group merges a run of consecutive connectives before joining; _title_chains doesn't.
Group skips a single-letter connective only in short names (total < 4); _title_chains always skips one.
Group derives a "prefix" kind as well as "title"; _title_chains derives "title" only, which is all a postnominal part can hold.
The first difference shows on garbage input. Prof. Smith, and and Dr. reads title 'and and Dr.', family 'Prof. Smith'. b547c24 read title 'Prof. and and Dr.', family 'Smith'.
Proposal: extract group's connective-join loop into one helper, parameterized by:
which kinds a join derives (title only, or title and prefix);
the single-letter policy.
decide calls it title-only; group calls it as now. This is mechanisms.md#ONE-PREDICATE-PER-QUESTION.
Effort and risk:
The loop leans on closures inside _group_segment (conj, title, prefix, merge) and on the frozen set, so the extraction needs care.
Benchmark rows to re-check: title_chain, plus _SHAPES' conjunctions.
The target is no change in output except the double-connective garbage case. That one should be decided explicitly and recorded in decisions.md.
Activity
Merge pull request #618 from derek73/feat/issue-617-shared-connective…
Share group's connective joins with the comma decision (derek73#617)
Fix what the derek73#617 review found
Fix what the derek73#617 fix-commit review found
Simplify what the /simplify pass on derek73#617 found
Inline group's last three predicate closures