Skip to content

Commit 8c87959

Browse files
derek73claude
andcommitted
docs: explain lenient_comma_suffixes by its observable behavior
'Lenient initial-shaped test' was internal jargon. The flag decides 'John Smith, V': suffix (the fifth) by default, or given-initial V when False; multi-letter suffixes are unaffected. Verified live both ways before wording. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent f37cc48 commit 8c87959

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

docs/customize.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ listed below.
9595
splits suffix groups and cannot be replaced.
9696
* - ``lenient_comma_suffixes``
9797
- ``bool``
98-
- Allows a segment after a comma to be read as a suffix using
99-
the lenient, initial-shaped test. Set ``False`` to require the
100-
strict acronym form.
98+
- Reads an initial-shaped suffix word after a comma as a suffix:
99+
``"John Smith, V"`` is John Smith the fifth when ``True``
100+
(default); ``False`` reads ``V`` as a given-name initial
101+
instead. Multi-letter suffixes (``III``, ``MD``) are
102+
unaffected.
101103
* - ``strip_emoji``
102104
- ``bool``
103105
- Excludes emoji from tokenization — they appear in no field or

nameparser/_policy.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ class Policy:
101101
#: is structural (the same comma reading that parses
102102
#: "Family, Given" input), not a configurable delimiter.
103103
extra_suffix_delimiters: frozenset[str] = frozenset()
104-
#: Allows a post-comma segment to read as a suffix via the lenient
105-
#: initial-shaped test; False requires the strict acronym form.
104+
#: Governs "Family, Suffix"-shaped input where the suffix word is
105+
#: also initial-shaped: "John Smith, V" reads as John Smith the
106+
#: fifth when True (the default, v1 behavior); False reads "V" as
107+
#: a given-name initial instead (family "John Smith", given "V").
108+
#: Multi-letter suffixes ("III", "MD") parse the same either way.
106109
lenient_comma_suffixes: bool = True
107110
#: Excludes emoji from tokenization: they appear in no token,
108111
#: field, or rendered view. The original string keeps them (input

0 commit comments

Comments
 (0)