@finbheara/names 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,8 @@
2
2
  import"../chunks/index-7vvt5hhy.js";
3
3
  import {
4
4
  createNameCensus2
5
- } from "../chunks/index-ztpxgcs1.js";
6
- import"../chunks/index-yf904dam.js";
5
+ } from "../chunks/index-a15g2gp6.js";
6
+ import"../chunks/index-ka8nzreg.js";
7
7
  import { createRequire } from "node:module";
8
8
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
9
9
 
package/dist/index.js CHANGED
@@ -90,7 +90,7 @@ import {
90
90
  readNameCell2,
91
91
  DEFAULT_NAME_FORMAT_THRESHOLD2,
92
92
  deriveNameFormat2
93
- } from "./chunks/index-wq6kn9jq.js";
93
+ } from "./chunks/index-kw69ry3j.js";
94
94
  import"./chunks/index-qsznkk4s.js";
95
95
  import {
96
96
  composeEvalSet2,
@@ -102,7 +102,7 @@ import {
102
102
  } from "./chunks/index-ebebeamh.js";
103
103
  import {
104
104
  createNameCensus2
105
- } from "./chunks/index-ztpxgcs1.js";
105
+ } from "./chunks/index-a15g2gp6.js";
106
106
  import {
107
107
  NAME_REFUSED2,
108
108
  stripEveryAside2,
@@ -147,7 +147,7 @@ import {
147
147
  defaultPersonNameFactory2,
148
148
  personName2,
149
149
  personNameFromIcao2
150
- } from "./chunks/index-yf904dam.js";
150
+ } from "./chunks/index-ka8nzreg.js";
151
151
  import {
152
152
  TEAM_WORD2,
153
153
  TEAM_DESIGNATION_WORDS2,
@@ -4,8 +4,8 @@ import {
4
4
  } from "../chunks/index-pncn9y2r.js";
5
5
  import {
6
6
  createNameCensus2
7
- } from "../chunks/index-ztpxgcs1.js";
8
- import"../chunks/index-yf904dam.js";
7
+ } from "../chunks/index-a15g2gp6.js";
8
+ import"../chunks/index-ka8nzreg.js";
9
9
  import"../chunks/index-7vvt5hhy.js";
10
10
  export {
11
11
  composeEvalSet2 as composeEvalSet,
@@ -49,7 +49,7 @@ import {
49
49
  readNameCell2,
50
50
  DEFAULT_NAME_FORMAT_THRESHOLD2,
51
51
  deriveNameFormat2
52
- } from "../chunks/index-wq6kn9jq.js";
52
+ } from "../chunks/index-kw69ry3j.js";
53
53
  import"../chunks/index-kw6gbrnq.js";
54
54
  import {
55
55
  NAME_REFUSED2,
@@ -95,7 +95,7 @@ import {
95
95
  defaultPersonNameFactory2,
96
96
  personName2,
97
97
  personNameFromIcao2
98
- } from "../chunks/index-yf904dam.js";
98
+ } from "../chunks/index-ka8nzreg.js";
99
99
  import {
100
100
  TEAM_WORD2,
101
101
  TEAM_DESIGNATION_WORDS2,
@@ -14,31 +14,42 @@
14
14
  * root never leaves this module: `sameGivenFamily` and `givenFamilyTable` answer about a
15
15
  * pair and neither returns a root, for that reason.
16
16
  *
17
- * THE GATE READS LESS THAN THE LANE. `families` is the Python lane's table, first root
18
- * wins, and the lane reads every form in it as evidence below an exact match. A GATE that
19
- * admits a pair is a stronger claim than a comparison level, so `sameGivenFamily` refuses
20
- * any pair through a form in `notAtGate`: a name in its own right (`Megan`, `Grace`), a
21
- * translation (`Sean`, `Padraig`) or another gender's name (`Michelle`, `Patricia`).
22
- * `Tom` and `Thomas`, `Jenny` and `Jennifer`, `Annie` and `Ann` meet; `Sean` and `John` do
23
- * not.
17
+ * SPELLINGS, FAMILIES AND THE GATE. Two different given names are related in one of three
18
+ * ways, and the answer says which:
19
+ *
20
+ * - `given-variant`: two spellings of one name (`Connor` / `Conor`, `Sara` / `Sarah`). A
21
+ * spelling is not a familiar form, so `variants` is its own table, and a gate admits it.
22
+ * - `given-family`: after each spelling is read as its canonical, the two share a ROOT of
23
+ * `families` (`Tom` / `Thomas`, `Kate` / `Katherine`), and a gate admits it.
24
+ * - `given-family-not-gate`: they share a root, but only through a `notAtGate` form: a name in
25
+ * its own right (`Megan`, `Grace`), a translation (`Sean`, `Padraig`), another gender's
26
+ * name (`Michelle`, `Sam`) or a form of more than one root (`Ellie`, `Evie`). The lane
27
+ * reads it as evidence below an exact match; a gate refuses it.
28
+ *
29
+ * EVERY ROOT, NEVER THE FIRST. A form under several roots meets each of them (`Evie` is
30
+ * Evelyn's, Genevieve's, Eve's and Eva's), and every such form is `notAtGate`, because the
31
+ * form alone cannot say which root its bearer carries. Sharing a root is not transitive:
32
+ * `Eve` and `Eva` share none, though `Evie` meets both. A `notAtGate` form is refused AS A
33
+ * FORM: where it is the root itself (`Caitlin` / `Cait`), its own forms meet it at a gate.
24
34
  */
25
35
  /**
26
36
  * Do two DIFFERENT given names (NN3, letters only) stand for one another at a gate?
27
37
  *
28
- * True exactly when both are in the table, share a root, and neither is a `notAtGate`
29
- * form. Two equal names answer `false`: equality is the caller's own test and this is the
30
- * tolerance past it, so a caller can tell which one admitted a pair.
38
+ * True exactly when `givenFamilyTable` relates them by a gate-safe answer: two spellings of
39
+ * one name, or one family through no `notAtGate` form. Two equal names answer `false`:
40
+ * equality is the caller's own test and this is the tolerance past it, so a caller can tell
41
+ * which one admitted a pair.
31
42
  */
32
43
  export declare function sameGivenFamily(a: string, b: string): boolean;
33
44
  /**
34
45
  * What the table says about two DIFFERENT given names (NN3, letters only), as a kinship
35
- * `via`: `given-family` where `sameGivenFamily` admits the pair, `given-family-not-gate`
36
- * where the two share a root but either is a `notAtGate` form, and `null` where the table
37
- * does not relate them. Two equal names answer `null`, for `sameGivenFamily`'s reason.
46
+ * `via`: `given-variant` for two spellings of one name, `given-family` where the two share a
47
+ * root and a gate admits the pair, `given-family-not-gate` where every root they share is
48
+ * reached through a `notAtGate` form, and `null` where the table does not relate them. Two
49
+ * equal names answer `null`, for `sameGivenFamily`'s reason.
38
50
  *
39
- * THE DEFAULT GIVEN-NAME PROVIDER of `createNameKinship` (`./name-kinship.ts`). It reads the
40
- * `ROOT` and `NOT_AT_GATE` that `sameGivenFamily` reads, and `sameGivenFamily` is defined as
41
- * its `given-family` answer, so the gate and the tolerant relation cannot disagree about a
42
- * pair.
51
+ * THE DEFAULT GIVEN-NAME PROVIDER of `createNameKinship` (`./name-kinship.ts`).
52
+ * `sameGivenFamily` is defined as its gate-safe answers, so the gate and the tolerant relation
53
+ * cannot disagree about a pair.
43
54
  */
44
- export declare function givenFamilyTable(a: string, b: string): "given-family" | "given-family-not-gate" | null;
55
+ export declare function givenFamilyTable(a: string, b: string): "given-variant" | "given-family" | "given-family-not-gate" | null;
@@ -14,6 +14,7 @@
14
14
  * caller decides how much to accept:
15
15
  *
16
16
  * Kate Smith / Katherine Smith candidate via [given-family]
17
+ * Connor Smith / Conor Smith candidate via [given-variant]
17
18
  * Mary Larson / Mary Conley-Larson candidate via [surname-part]
18
19
  * Kate M Smith / Katherine Conley-Smith
19
20
  * candidate via [surname-part, given-family, middle-absent]
@@ -63,6 +64,11 @@ export declare const KINSHIP_VIAS: Readonly<{
63
64
  field: "surname";
64
65
  gateSafe: true;
65
66
  }>;
67
+ /** the two first given names are two spellings of one name (`Connor` / `Conor`) */
68
+ readonly "given-variant": Readonly<{
69
+ field: "given";
70
+ gateSafe: true;
71
+ }>;
66
72
  /** the given-name table relates the two first given names, and the gate admits them */
67
73
  readonly "given-family": Readonly<{
68
74
  field: "given";
@@ -468,8 +468,9 @@ interface NameKinship {
468
468
  | via | field | gate-safe | when |
469
469
  |---|---|---|---|
470
470
  | `surname-part` | surname | yes | one surname is a whole hyphen- or space-joined part of the other's compound |
471
+ | `given-variant` | given | yes | the two first given names are two spellings of one name (`Connor` / `Conor`) |
471
472
  | `given-family` | given | yes | a provider says the two first given names are one family, and a gate admits them |
472
- | `given-family-not-gate` | given | no | the table relates them through a `notAtGate` form |
473
+ | `given-family-not-gate` | given | no | the table relates them only through a `notAtGate` form |
473
474
  | `given-maybe` | given | no | a probabilistic source says they MAY be one family |
474
475
  | `middle-absent` | middle | yes | NN5's: one side carries no middle |
475
476
  | `initial-agrees` | middle | yes | NN5's: an initial against a full middle that starts with it |
@@ -486,8 +487,8 @@ interface NameKinship {
486
487
  each `GivenProvider` in order and the first non-null answer wins. A provider is asked
487
488
  once per pair, with the two NN3 first given names in code-unit order, and never with two
488
489
  equal names. The default is `[givenFamilyTable]`, which answers from
489
- `given-diminutives.json`; `sameGivenFamily(a, b)` is exactly
490
- `givenFamilyTable(a, b) === "given-family"`. `[]` tolerates no given name.
490
+ `given-diminutives.json`; `sameGivenFamily(a, b)` is exactly "`givenFamilyTable(a, b)` is
491
+ `given-variant` or `given-family`". `[]` tolerates no given name.
491
492
  - A new kind of `via` is one entry in `KINSHIP_VIAS`, which carries its field and its
492
493
  gate-safety. The relation's rules do not change.
493
494
  - With no tolerance used, the answer is `nameRelation`'s. `head-differs` is split into
@@ -495,9 +496,33 @@ interface NameKinship {
495
496
  suffix and middle rows are NN5's (`tailRelation`) and still veto.
496
497
  - A print that names no person is `different` from everything, itself included.
497
498
 
498
- Over the 261 forms of the current table (33,930 distinct pairs), `givenFamilyTable` answers
499
- `given-family` for 354 pairs, `given-family-not-gate` for 302, and `null` for the rest.
500
- `sameGivenFamily` answers as it did before the provider existed on every one of them.
499
+ ### The given-name table
500
+
501
+ `given-diminutives.json` holds three things, each in NN3 upper case:
502
+
503
+ - `variants`: one name's SPELLINGS, canonical first (`CONNOR` / `CONOR`, `SARAH` / `SARA`,
504
+ `MEGAN` / `MEGHAN` / `MEAGAN` / `MEAGHAN`). Two spellings are `given-variant`, and a gate
505
+ admits them. A spelling is read as its canonical before `families` is consulted, so
506
+ `Cate` meets `Katherine` as `Kate` does. A transposition or a typo (`Oliva`, `Cailtin`,
507
+ `Naimh`) is NOT a variant: a misprint tolerance is a separate provider.
508
+ - `families`: root -> its familiar forms. Two names are one family when they SHARE A ROOT,
509
+ a root belonging to itself. A form may sit under several roots and meets EVERY one of
510
+ them: `Evie` is Evelyn's, Genevieve's, Eve's, Eva's and Evangeline's. Sharing a root is
511
+ not transitive, so `Eve` and `Eva` stay apart though `Evie` meets both.
512
+ - `notAtGate`: forms a gate refuses — a name in its own right (`Josie`, `Gracie`, `Lily`),
513
+ a translation (`Sean`), another gender's name (`Sam`, `Charlie`, `Frankie`), and every
514
+ form under more than one root (`Ellie`, `Maddie`, `Ally`, `Kit`), because the form alone
515
+ cannot say which root its bearer carries. A pair through such a form is
516
+ `given-family-not-gate`. The flag refuses a name AS A FORM: where it is the root itself,
517
+ its own forms still meet it at a gate (`Caitlin` is Catherine's Irish form, refused
518
+ against `Katherine`, and still meets `Cait`).
519
+
520
+ `Kate` and `Katie` are Catherine's, and `Katelyn` is a spelling of Caitlin. They meet below
521
+ the gate through Caitlin as a form of Catherine, so `Kate` / `Katherine` keeps its gate.
522
+
523
+ Over the 421 forms and spellings of the table (88,410 distinct pairs), `givenFamilyTable`
524
+ answers `given-variant` for 90 pairs, `given-family` for 371, `given-family-not-gate` for 553,
525
+ and `null` for the rest; `sameGivenFamily` admits 461.
501
526
 
502
527
  ### The tolerant lookup
503
528
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finbheara/names",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "A curated lexicon of personal, school and place names, the surname-particle vocabulary, a phrase classifier and a person-name normalizer",
5
5
  "keywords": [
6
6
  "names",