Commit f5d383e
fix: recognize trailing suffix_not_acronyms in lastname-comma format (closes #144)
In 'Last, First Middle I' format, a trailing single-letter suffix like 'I'
was silently absorbed into the middle name because is_suffix() rejects single
uppercase letters via is_an_initial().
Add is_suffix_at_lastname_comma_end() which applies when the piece is the
final token of the post-comma segment and no explicit comma-separated suffix
follows (len(parts)==2). When parts[2] exists the caller already declared a
suffix, making the trailing token more likely a middle initial
(e.g. 'Doe, Rev. John V, Jr.'), so that case is excluded.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 8d5f769 commit f5d383e
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
507 | 521 | | |
508 | 522 | | |
509 | 523 | | |
| |||
767 | 781 | | |
768 | 782 | | |
769 | 783 | | |
770 | | - | |
| 784 | + | |
771 | 785 | | |
772 | 786 | | |
773 | 787 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
169 | 177 | | |
170 | 178 | | |
171 | 179 | | |
| |||
0 commit comments