|
13 | 13 | 'iii', |
14 | 14 | 'iv', |
15 | 15 | 'v', |
| 16 | + # Bare, not '(ret)'/'(vet)': moved here from literal parenthesized |
| 17 | + # entries in SUFFIX_ACRONYMS. parse_nicknames()'s handle_match() now |
| 18 | + # strips parens/quotes before this set is consulted, so the bare form |
| 19 | + # is correct -- do not re-add the parenthesized form, that would |
| 20 | + # silently reintroduce the #111 bug (parenthesized "(Ret)" matching |
| 21 | + # literally instead of going through nickname/suffix disambiguation). |
| 22 | + 'ret', |
| 23 | + 'vet', |
16 | 24 | ]) |
17 | 25 | """ |
18 | 26 |
|
19 | 27 | Post-nominal pieces that are not acronyms. The parser does not remove periods |
20 | 28 | when matching against these pieces. |
21 | 29 |
|
| 30 | +""" |
| 31 | +SUFFIX_ACRONYMS_AMBIGUOUS = set([ |
| 32 | + # Suffix acronyms that also commonly work as given-name nicknames on |
| 33 | + # their own (e.g. "Ed", "JD"). Read only by HumanName.parse_nicknames() |
| 34 | + # when deciding whether parenthesized/quoted content is a nickname or a |
| 35 | + # suffix -- content matching one of these stays a nickname rather than |
| 36 | + # being reclassified as a suffix, since that's the more common reading |
| 37 | + # in ambiguous, delimiter-only context. |
| 38 | + # |
| 39 | + # When adding a new entry to SUFFIX_ACRONYMS, also add it here only if |
| 40 | + # the exact letter sequence could plausibly be someone's given name or |
| 41 | + # common nickname on its own (e.g. 'jd', 'ed'). Unambiguous |
| 42 | + # certifications/degrees (e.g. 'mba', 'cpa', 'phd') don't need an entry. |
| 43 | + 'ed', |
| 44 | + 'jd', |
| 45 | +]) |
| 46 | +""" |
| 47 | +
|
| 48 | +Acronym suffixes from SUFFIX_ACRONYMS that also plausibly collide with a |
| 49 | +common given-name nickname. Not a partition of SUFFIX_ACRONYMS -- a small, |
| 50 | +standalone exception list consulted only by parse_nicknames(). |
| 51 | +
|
22 | 52 | """ |
23 | 53 | SUFFIX_ACRONYMS = set([ |
24 | | - '(ret)', |
25 | | - '(vet)', |
26 | 54 | '8-vsb', |
27 | 55 | 'aas', |
28 | 56 | 'aba', |
|
501 | 529 | 'mra', |
502 | 530 | 'ms', |
503 | 531 | 'msa', |
504 | | - 'msc' |
| 532 | + 'msc', |
505 | 533 | 'mscmsm', |
506 | 534 | 'msm', |
507 | 535 | 'mt', |
|
0 commit comments