Skip to content

Commit 7716e9b

Browse files
derek73claude
andcommitted
docs: Lexicon example lists read as examples, not full contents
Append ellipses to the field docs' example parentheticals and teach the inspection idiom once in the class docstring (Lexicon.default().<field> is the full list). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent d1f2749 commit 7716e9b

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

nameparser/_lexicon.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,37 +134,39 @@ class Lexicon:
134134
:meth:`empty`, derive variants with :meth:`add` / :meth:`remove` /
135135
``|`` (union), and pass the result to ``Parser(lexicon=...)``.
136136
Entries are normalized at construction -- lowercased, edge periods
137-
stripped -- so matching is case-insensitive."""
137+
stripped -- so matching is case-insensitive. Field docs below show
138+
examples, not full contents; inspect any field's shipped vocabulary
139+
directly, e.g. ``Lexicon.default().conjunctions``."""
138140

139-
#: Pre-nominal titles ("dr", "sir", "capt").
141+
#: Pre-nominal titles ("dr", "sir", "capt", ...).
140142
titles: frozenset[str] = frozenset()
141143
#: Titles whose single following name reads as a GIVEN name
142-
#: ("sheikh", "sister") rather than a family name.
144+
#: ("sheikh", "sister", ...) rather than a family name.
143145
given_name_titles: frozenset[str] = frozenset()
144146
#: Post-nominal acronym suffixes, matched with or without periods
145147
#: ("phd" matches "PhD" and "Ph.D.").
146148
suffix_acronyms: frozenset[str] = frozenset()
147-
#: Post-nominal word suffixes ("jr", "esquire", "iii").
149+
#: Post-nominal word suffixes ("jr", "esquire", "iii", ...).
148150
suffix_words: frozenset[str] = frozenset()
149151
#: Subset of suffix_acronyms counted as suffixes only when written
150152
#: WITH periods -- their bare forms are common surnames ("ma",
151153
#: "do": "Jack Ma" keeps his family name).
152154
suffix_acronyms_ambiguous: frozenset[str] = frozenset()
153155
#: Family-name particles that chain onto the following piece
154-
#: ("van", "de", "bin").
156+
#: ("van", "de", "bin", ...).
155157
particles: frozenset[str] = frozenset()
156158
#: Subset of particles that can also BE a given name: a leading
157159
#: one reads as given and records a particle-or-given ambiguity
158160
#: ("Van Johnson").
159161
particles_ambiguous: frozenset[str] = frozenset()
160162
#: Words or characters that join surrounding pieces into one
161-
#: ("and", "&", "y", "и").
163+
#: ("and", "&", "y", "и", ...).
162164
conjunctions: frozenset[str] = frozenset()
163165
#: Given-name prefixes that bind to the following word to form one
164166
#: given name ("abdul" -> "Abdul Salam"); never standalone names.
165167
bound_given_names: frozenset[str] = frozenset()
166168
#: Marker words introducing a birth surname, routed to the maiden
167-
#: field ("née", "geb.", "roz.").
169+
#: field ("née", "geb.", "roz.", ...).
168170
maiden_markers: frozenset[str] = frozenset()
169171
#: Lowercase word -> exact-cased replacement used by capitalized()
170172
#: ("phd" -> "Ph.D."). Pair-valued: change it with

0 commit comments

Comments
 (0)