Skip to content

Commit d2cc767

Browse files
derek73claude
andcommitted
docs: every Lexicon field links to its full default list
Each field doc now ends with a same-page link to the config data constant it sources from (the constants render their complete contents in the reference's compat section). The renamed pairs (suffix_words -> SUFFIX_NOT_ACRONYMS, bound_given_names -> BOUND_FIRST_NAMES) double as visible v1<->v2 mapping documentation, and particles_ambiguous -- which has no constant -- documents its derivation from NON_FIRST_NAME_PREFIXES instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 7716e9b commit d2cc767

1 file changed

Lines changed: 25 additions & 10 deletions

File tree

nameparser/_lexicon.py

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,40 +138,55 @@ class Lexicon:
138138
examples, not full contents; inspect any field's shipped vocabulary
139139
directly, e.g. ``Lexicon.default().conjunctions``."""
140140

141-
#: Pre-nominal titles ("dr", "sir", "capt", ...).
141+
#: Pre-nominal titles ("dr", "sir", "capt", ...). Full default
142+
#: list: :data:`~nameparser.config.titles.TITLES`.
142143
titles: frozenset[str] = frozenset()
143144
#: Titles whose single following name reads as a GIVEN name
144-
#: ("sheikh", "sister", ...) rather than a family name.
145+
#: ("sheikh", "sister", ...) rather than a family name. Full
146+
#: default list: :data:`~nameparser.config.titles.FIRST_NAME_TITLES`.
145147
given_name_titles: frozenset[str] = frozenset()
146148
#: Post-nominal acronym suffixes, matched with or without periods
147-
#: ("phd" matches "PhD" and "Ph.D.").
149+
#: ("phd" matches "PhD" and "Ph.D."). Full default list:
150+
#: :data:`~nameparser.config.suffixes.SUFFIX_ACRONYMS`.
148151
suffix_acronyms: frozenset[str] = frozenset()
149-
#: Post-nominal word suffixes ("jr", "esquire", "iii", ...).
152+
#: Post-nominal word suffixes ("jr", "esquire", "iii", ...). Full
153+
#: default list:
154+
#: :data:`~nameparser.config.suffixes.SUFFIX_NOT_ACRONYMS`.
150155
suffix_words: frozenset[str] = frozenset()
151156
#: Subset of suffix_acronyms counted as suffixes only when written
152157
#: WITH periods -- their bare forms are common surnames ("ma",
153-
#: "do": "Jack Ma" keeps his family name).
158+
#: "do": "Jack Ma" keeps his family name). Full default list:
159+
#: :data:`~nameparser.config.suffixes.SUFFIX_ACRONYMS_AMBIGUOUS`.
154160
suffix_acronyms_ambiguous: frozenset[str] = frozenset()
155161
#: Family-name particles that chain onto the following piece
156-
#: ("van", "de", "bin", ...).
162+
#: ("van", "de", "bin", ...). Full default list:
163+
#: :data:`~nameparser.config.prefixes.PREFIXES`.
157164
particles: frozenset[str] = frozenset()
158165
#: Subset of particles that can also BE a given name: a leading
159166
#: one reads as given and records a particle-or-given ambiguity
160-
#: ("Van Johnson").
167+
#: ("Van Johnson"). No constant of its own -- the default derives
168+
#: as particles minus
169+
#: :data:`~nameparser.config.prefixes.NON_FIRST_NAME_PREFIXES`
170+
#: (which marks the opposite, never-given subset).
161171
particles_ambiguous: frozenset[str] = frozenset()
162172
#: Words or characters that join surrounding pieces into one
163-
#: ("and", "&", "y", "и", ...).
173+
#: ("and", "&", "y", "и", ...). Full default list:
174+
#: :data:`~nameparser.config.conjunctions.CONJUNCTIONS`.
164175
conjunctions: frozenset[str] = frozenset()
165176
#: Given-name prefixes that bind to the following word to form one
166177
#: given name ("abdul" -> "Abdul Salam"); never standalone names.
178+
#: Full default list:
179+
#: :data:`~nameparser.config.bound_first_names.BOUND_FIRST_NAMES`.
167180
bound_given_names: frozenset[str] = frozenset()
168181
#: Marker words introducing a birth surname, routed to the maiden
169-
#: field ("née", "geb.", "roz.", ...).
182+
#: field ("née", "geb.", "roz.", ...). Full default list:
183+
#: :data:`~nameparser.config.maiden_markers.MAIDEN_MARKERS`.
170184
maiden_markers: frozenset[str] = frozenset()
171185
#: Lowercase word -> exact-cased replacement used by capitalized()
172186
#: ("phd" -> "Ph.D."). Pair-valued: change it with
173187
#: dataclasses.replace(), not add()/remove(); read it as a mapping
174-
#: via capitalization_exceptions_map.
188+
#: via capitalization_exceptions_map. Full default mapping:
189+
#: :data:`~nameparser.config.capitalization.CAPITALIZATION_EXCEPTIONS`.
175190
# Canonical storage: sorted tuple of (key, value) pairs. The
176191
# constructor tolerates any Mapping (or pair iterable) at runtime and
177192
# canonicalizes here; this closes the caller-aliasing hole and keeps

0 commit comments

Comments
 (0)