Skip to content

Commit 8e77693

Browse files
derek73claude
andcommitted
docs: link the attaching-words rows to their vocabulary sets
Each word type now links to its full set on the API reference (the config-module sections render the whole {...}), so the few example words are no longer needed inline -- they move to a restored Example column showing a parse. Drops the Words/Field repetition the inline lists caused. Also tighten the conjunction row (Field "any"; "the words on both sides") and spell out in the lead-in why titles/suffixes say "adjacent" while the others say "the following word": the first attach only to same-kind neighbors, the rest reach forward to the next word of any kind. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7747cef commit 8e77693

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

docs/usage.rst

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,35 +63,44 @@ most of what decides a parse.
6363

6464
Most words stand alone. A few pull in a neighbor, and each kind pulls
6565
into one particular field — so this table is also a map of which fields
66-
get built by attachment rather than by position. Consecutive titles
67-
chain (``Asst. Vice Chancellor`` is one title), as do consecutive
68-
suffixes:
66+
get built by attachment rather than by position. Titles and suffixes
67+
attach only to *adjacent words of their own kind* (a run of titles
68+
chains into one, but a title never swallows a plain name); the rest
69+
reach forward to pull in the next word, whatever it is. Follow a row's
70+
name to its full vocabulary set:
6971

7072
.. list-table::
7173
:header-rows: 1
72-
:widths: 40 34 26
74+
:widths: 22 26 12 40
7375

7476
* - Words
7577
- Attach to
7678
- Field
77-
* - Titles — ``dr``, ``sir``, ``prof``, ``capt``
79+
- Example
80+
* - :mod:`Titles <nameparser.config.titles>`
7881
- adjacent titles
7982
- ``title``
80-
* - Suffixes — ``phd``, ``md``, ``jr``, ``esq``
83+
- ``Asst. Vice Chancellor John`` → ``Asst. Vice Chancellor``
84+
* - :mod:`Suffixes <nameparser.config.suffixes>`
8185
- adjacent suffixes
8286
- ``suffix``
83-
* - Bound given names — ``abdul``, ``abu``, ``umm``, ``عبد``
87+
- ``John Smith PhD MD`` → ``PhD, MD``
88+
* - :mod:`Bound given names <nameparser.config.bound_first_names>`
8489
- the following word
8590
- ``given``
86-
* - Particles — ``de``, ``van``, ``von``, ``bin``
91+
- ``abdul salam ahmed`` → ``abdul salam``
92+
* - :mod:`Particles <nameparser.config.prefixes>`
8793
- the following surname
8894
- ``family``
89-
* - Maiden markers — ``née``, ``geb.``
95+
- ``Juan de la Vega`` → ``de la Vega``
96+
* - :mod:`Maiden markers <nameparser.config.maiden_markers>`
9097
- the following name
9198
- ``maiden``
92-
* - Conjunctions — ``and``, ``&``, ``y``, ``и``
93-
- both neighbors, whatever they are
94-
- whichever field they join
99+
- ``Jane Smith née Jones`` → ``Jones``
100+
* - :mod:`Conjunctions <nameparser.config.conjunctions>`
101+
- the words on both sides
102+
- any
103+
- ``John and Jane Smith`` → ``John and Jane``
95104

96105
Conjunctions are the exception the last row names: they take the field
97106
of whatever sits on both sides, so the same ``and`` pulls two given

0 commit comments

Comments
 (0)