#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.
Cost so far:
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.
Related: #613, #616, #611.
#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_chainsmakes that join with its own copy of group's connective loop (_group.py, the P3 chain inside_group_segment).The two copies already differ:
_title_chainsdoesn't.total < 4);_title_chainsalways skips one._title_chainsderives "title" only, which is all a postnominal part can hold.Cost so far:
_title_chainsneeded its own fix for a quadratic slice rebuild, found in Decide C1 once after classify and bind the comma part; fold P6 into assign (#613) #616's review, and its own_PREFIXED_SHAPESclock row (title_chain).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:
decide calls it title-only; group calls it as now. This is mechanisms.md#ONE-PREDICATE-PER-QUESTION.
Effort and risk:
_group_segment(conj,title,prefix,merge) and on thefrozenset, so the extraction needs care.title_chain, plus_SHAPES'conjunctions.Related: #613, #616, #611.