Commit c19ce96
fix: correct suffix boundary lookup for prefixed last names (#100)
The prefix-joining loop located the suffix stop boundary with a
value-based pieces.index() that searched from position 0. When a token
value repeated (a trailing title that is also a suffix acronym, e.g.
the second 'dr' in 'dr Vincent van Gogh dr'), it matched the leading
occurrence, producing an empty slice that duplicated pieces and
corrupted the middle name. Constrain the lookup to start at i + 1,
consistent with the sibling next_prefix lookup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent f14fb58 commit c19ce96
2 files changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
980 | 980 | | |
981 | 981 | | |
982 | 982 | | |
983 | | - | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
984 | 987 | | |
985 | 988 | | |
986 | 989 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
| |||
0 commit comments