Skip to content

Commit 7747cef

Browse files
derek73claude
andcommitted
docs: reorganize the attaching-words table by word type
The table was keyed by destination field, which forced conjunctions into the `family` row as "conjunctions inside a surname" -- misleading, since the very next doctest shows `and` joining two GIVEN names. Keying by word type gives conjunctions one honest row ("both neighbors, whichever field they join") and lets the field column read as a map: the five field-specific attachers cover title/suffix/given/family/ maiden, and the two fields you can't get by attachment (middle, nickname) are exactly the ones absent. Example words for titles and suffixes are drawn from the shipped constants (dr/sir/prof/capt, phd/md/jr/esq). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6e53b56 commit 7747cef

1 file changed

Lines changed: 32 additions & 26 deletions

File tree

docs/usage.rst

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -61,35 +61,41 @@ Input shapes tell you where the fields sit. This tells you which words
6161
merge into one field instead of standing alone — between them, that is
6262
most of what decides a parse.
6363

64-
Most words stand alone. A few pull a neighbor in, and the thing worth
65-
knowing is which field they pull into:
64+
Most words stand alone. A few pull in a neighbor, and each kind pulls
65+
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:
6669

6770
.. list-table::
6871
:header-rows: 1
69-
:widths: 14 42 44
70-
71-
* - Pulls into
72-
- Example
73-
- Words
74-
* - ``family``
75-
- ``Juan de la Vega`` → ``de la Vega``
76-
- Particles (``de``, ``van``, ``von``, ``bin``), and conjunctions
77-
inside a surname (``y``)
78-
* - ``given``
79-
- ``abdul salam ahmed`` → ``abdul salam``
80-
- Bound given names (``abdul``, ``abu``, ``umm``, ``عبد``)
81-
* - ``title``
82-
- ``Asst. Vice Chancellor John Smith`` → ``Asst. Vice Chancellor``
83-
- Consecutive titles chain
84-
* - ``suffix``
85-
- ``John Smith PhD MD`` → ``PhD, MD``
86-
- Consecutive suffixes
87-
* - ``maiden``
88-
- ``Jane Smith née Jones`` → ``Jones``
89-
- Maiden markers (``née``, ``geb.``)
90-
91-
A conjunction joins whatever sits on both sides of it, so it can pull
92-
two given names together as easily as two surnames:
72+
:widths: 40 34 26
73+
74+
* - Words
75+
- Attach to
76+
- Field
77+
* - Titles — ``dr``, ``sir``, ``prof``, ``capt``
78+
- adjacent titles
79+
- ``title``
80+
* - Suffixes — ``phd``, ``md``, ``jr``, ``esq``
81+
- adjacent suffixes
82+
- ``suffix``
83+
* - Bound given names — ``abdul``, ``abu``, ``umm``, ``عبد``
84+
- the following word
85+
- ``given``
86+
* - Particles — ``de``, ``van``, ``von``, ``bin``
87+
- the following surname
88+
- ``family``
89+
* - Maiden markers — ``née``, ``geb.``
90+
- the following name
91+
- ``maiden``
92+
* - Conjunctions — ``and``, ``&``, ``y``, ``и``
93+
- both neighbors, whatever they are
94+
- whichever field they join
95+
96+
Conjunctions are the exception the last row names: they take the field
97+
of whatever sits on both sides, so the same ``and`` pulls two given
98+
names together as easily as two surnames:
9399

94100
.. doctest::
95101

0 commit comments

Comments
 (0)