You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/design/rules.md
+54-14Lines changed: 54 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,20 +134,23 @@ P1. Rationale: a particle OPENING a name has the whole rest of the
134
134
How MANY name words it attaches to depends on the order. Under a
135
135
family-first order it takes exactly ONE — declaring that order
136
136
asserts that what follows the family is not more surname. Under
137
-
the default order it takes the rest of the name: nothing there
138
-
marks where the surname ends. Whether the default order should
139
-
narrow the same way is #471 — today `de Mesnil Jean` reports the
140
-
whole string as the family, and that reach is 1.4.0's. One name
141
-
word means one UNIT — a particle chain (P2), a conjunction join
142
-
(P3) or a bound given-name pair (P5) is taken whole or not at
143
-
all. A title does not move the opening position (P4), but a
144
-
family comma does end the question: the comma has already fixed
145
-
the surname, so there is no positional read left for an order to
146
-
narrow, and a particle opening the part AFTER it takes the rest
147
-
of that part whatever order is declared. What is left over is not read by O4's rule for a whole name,
148
-
which would make the first leftover a second family name; it is
149
-
laid out as the positions AFTER the family in the declared order,
150
-
the family slot being already filled.
137
+
the default order it takes the rest of the name, and that is a
138
+
reading rather than a gap in one: a never-given particle marks
139
+
where a surname BEGINS, surnames are routinely several words,
140
+
and no declaration has said this one ends before the string
141
+
does. So `de Mesnil Jean` reports the whole string as the
142
+
family, which is 1.4.0's reach as well (#471, declined by
143
+
design). One name word means one UNIT — a particle chain (P2),
144
+
a conjunction join (P3) or a bound given-name pair (P5) is
145
+
taken whole or not at all. A title does not move the opening
146
+
position (P4), but a family comma does end the question: the
147
+
comma has already fixed the surname, so there is no positional
148
+
read left for an order to narrow, and a particle opening the
149
+
part AFTER it takes the rest of that part whatever order is
150
+
declared. What is left over is not read by O4's rule for a
151
+
whole name, which would make the first leftover a second family
152
+
name; it is laid out as the positions AFTER the family in the
153
+
declared order, the family slot being already filled.
151
154
"de la Vega" → family="de la Vega"
152
155
"Sir de Mesnil" → family="de Mesnil"
153
156
"Mesnil de" family-first → given="de"
@@ -161,6 +164,18 @@ P1. Rationale: a particle OPENING a name has the whole rest of the
161
164
"Mc Donald" → family="Mc Donald"
162
165
"de los Santos" → family="de los Santos"
163
166
"van Gogh" → given="van" · boundary
167
+
Accepted: the default-order reach has two faces, and the second
168
+
is a real cost. A surname-only string is read right, which is
169
+
what the reach is for; a family-first listing read under the
170
+
default order is read wrong, all of it landing in the family.
171
+
The remedy is the declaration or the comma — declare a
172
+
family-first order, which gives family `de la Cruz`, given
173
+
`Juan`, middle `Carlos`, or write the family comma. What
174
+
NEITHER order settles is the comma's alone: `de la Family
175
+
Family Given` and `de la Family Given Given` are the same
176
+
string shape, and no reading of the words tells them apart.
177
+
"de la Torre Vega" → family="de la Torre Vega"
178
+
"de la Cruz Juan Carlos" → family="de la Cruz Juan Carlos"
164
179
Accepted: a bare "de" stays the given name — there is nothing to
165
180
fold into, and inventing a surname would be worse.
166
181
"de" → given="de"
@@ -951,6 +966,7 @@ C2. Rationale: text beyond the recognized comma parts should be
951
966
## Name order (O)
952
967
953
968
Background: written name order varies by convention: given-first (the library's default reading), family-first, and family-first with the given name last (Vietnamese, where the person is called by the last element, given names are frequently two syllables — the given_names view stays correct wherever the internal boundary falls — and quốc ngữ is Latin script, so no native-script signal exists at all). The order is declared by the caller or a locale pack, never detected — but a few conventions leave a recognizable trace in the name itself. Patronymics are one: East Slavic names carry a father's-name derivative with distinctive endings between given and family, and Turkic names use a standalone marker word ("oglu" son-of, "qizi" daughter-of) after the father's name. Where such a trace is present and unambiguous, an opted-in parser can restore the intended reading from a family-first listing.
969
+
A declared order is a property of the DATA SOURCE rather than of any one string: the caller sets it to match how their records are written, and it governs what no vocabulary and no script license has already claimed (O4). A declared FAMILY-FIRST order outranks what the parser could infer from the shape of a particular name; the given-first reading is the parser's DEFAULT rather than a declaration it can tell apart from one, and the traces above are what refine it (O1, O2). And the declaration yields where a name's own script settles the order instead (W4, where a name written wholly in an East Asian script reads family-first whatever order the caller declared). Two consequences run through this document. Under the default given-first order a string opening with a never-given particle is a surname whose given name is simply absent, so the fold takes the rest of it (P1). Under a declared family-first order the caller has already said that what follows the family is not more surname — so the fold stops there, and the rotations below, whose whole job is to RESTORE the default reading from a family-first listing, have nothing left to restore. A shape neither order settles is the family comma's job, and the parser does not guess at it.
954
970
955
971
O1. Rationale: an East Slavic name written family-first still shows
956
972
its patronymic — the distinctive ending identifies which word is
@@ -962,9 +978,26 @@ O1. Rationale: an East Slavic name written family-first still shows
962
978
the words are restored to given, patronymic, family. A middle
963
979
word that also carries the ending blocks the reading, because
964
980
the surname itself may be patronymic-derived.
981
+
The restoration is the default order's work: it recovers the
982
+
given-first reading a family-first listing hides, so where the
983
+
caller has DECLARED a family-first order there is nothing left
984
+
to restore and position decides.
965
985
"Сидоров Иван Петрович" [ru] → family="Сидоров"
966
986
"Sidorov Ivan Petrovich Jr." [ru] → family="Sidorov"
967
987
"Иван Петрович Абрамович" [ru] → family="Абрамович" · boundary
988
+
Accepted: under a declared family-first order the readings part
989
+
on natural-order input, and the declaration wins. A family-first
990
+
listing reads the same either way under FAMILY_FIRST — the first
991
+
example above is that same parse with FAMILY_FIRST declared,
992
+
and under FAMILY_FIRST_GIVEN_LAST the listing's given and middle
993
+
swap, so only the family is invariant — while with East Slavic
994
+
handling active and FAMILY_FIRST declared the natural-order
995
+
Иван Петрович Сидоров reads family Иван, given Петрович, middle
996
+
Сидоров. That is the caller's declaration being honored on input
997
+
they said was written family-first, not a defect (#384). No
998
+
registered example annotation combines a pack with an order, so
999
+
the parse is pinned in tests/v2/test_locales.py instead, and
1000
+
decisions.md#O1 records why options 2 and 3 were declined.
Copy file name to clipboardExpand all lines: docs/release_log.rst
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ Release Log
18
18
19
19
- **Mark ba as an acronym that is also an ordinary name, so a bare trailing Ba keeps the family name.** ``HumanName("Anna Ba")`` gives last ``Ba`` and reports a suffix-or-name ambiguity, where 2.0.0 through 2.2.0 gave suffix ``Ba`` and no last name. The SPACED full-name form keeps the credential reading: ``John Smith BA`` still gives suffix ``BA``, now flagged, and the dotted ``John Smith B.A.`` is an unflagged suffix, the periods settling it. The COMMA forms move, and this is the marking's real cost: ``Smith, BA`` gives first ``BA``, and ``John Smith, BA`` gives first ``BA``, last ``John Smith``, where 2.0.0 through 2.2.0 gave suffix ``BA`` for both -- what ``Smith, Ed`` costs, which S2 already accepted for the other ambiguous acronyms. A bracketed or quoted ``John Smith (BA)`` falls through to nickname parsing, as the 2.0 note for ``ma``/``do`` below recorded for that pair. Write ``B.A.`` to keep the credential reading. BA is a common credential and Ba a real surname in Vietnamese and Senegalese Fula, which is the ``ma``/``Ma`` shape exactly. No corpus name moves (#342)
20
20
21
+
- **Fix the East Slavic and Turkic patronymic rotations overriding a declared family-first name order.** With ``patronymic_rules`` opted in and ``Policy(name_order=FAMILY_FIRST)``, ``Мицкевич Адам Юзеф`` gave last ``Адам`` through 2.2.0 and now gives last ``Мицкевич`` -- the reading the declaration asks for -- and ``oglu Ahmad Vali Ali`` with Turkic handling gave last ``Ahmad`` and now ``oglu``. The rotations exist to restore the given-first reading a family-first listing hides, so under a declared family-first order the declaration decides. No corpus name moves. See the ``O1`` entry of ``docs/design/decisions.md`` (closes #384)
22
+
21
23
**Additions**
22
24
23
25
- **Add the renunciate titles to the given-name title list, so a renunciate's one name is a given name.** ``HumanName("Swami Vivekananda")`` gives first ``Vivekananda`` with an empty last name, where every release since 1.4.0 gave last ``Vivekananda``; ``Guru Nanak``, ``Baba Ramdev`` and ``Lama Zopa`` move the same way, and so do the Devanagari and Bengali spellings added below. Two name words behind the title are unchanged -- ``Swami Vivekananda Saraswati`` keeps last ``Saraswati`` -- and a surname-retaining title is untouched: ``Rabbi Cohen`` still gives last ``Cohen``. ``venerable`` is deliberately not in the list, the traditions using it splitting on whether the family name survives. See the ``indic-honorifics`` entry of ``docs/design/decisions.md`` (closes #346)
0 commit comments