@finbheara/names 0.16.0 → 0.17.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.
- package/README.md +33 -0
- package/dist/chunks/index-n6fpj92s.js +1418 -0
- package/dist/chunks/{index-74fyytnh.js.map → index-n6fpj92s.js.map} +3 -5
- package/dist/chunks/{index-74fyytnh.js → index-qmn87bdh.js} +21 -1411
- package/dist/chunks/index-qmn87bdh.js.map +11 -0
- package/dist/cli/bin.js +109 -0
- package/dist/cli/bin.js.map +11 -0
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/normalize/index.js +8 -6
- package/dist/normalize/index.js.map +1 -1
- package/dist/types/cli/bin.d.ts +10 -0
- package/dist/types/cli/tables.d.ts +13 -0
- package/dist/types/normalize/given-diminutives.d.ts +15 -6
- package/dist/types/normalize/given-families.d.ts +5 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -180,6 +180,39 @@ index.related(personName("Mary Larson")); // [{ name: Conley-Larson<<Mary
|
|
|
180
180
|
tolerance the pair used, and `gateSafe` is false when any of them is one a gate must not
|
|
181
181
|
admit on its own.
|
|
182
182
|
|
|
183
|
+
### The given-name tables, for another language
|
|
184
|
+
|
|
185
|
+
The tables behind `givenFamilyTable` and `givenFamilyList` print as JSON, for a consumer
|
|
186
|
+
that is not JavaScript:
|
|
187
|
+
|
|
188
|
+
```sh
|
|
189
|
+
npx @finbheara/names tables given-name > given-name-tables.json # or bunx
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
`--output json` and `--schema 1` are the defaults. The PRINTED form is the contract: a
|
|
193
|
+
schema keeps its shape for as long as the package offers it, and a new shape is a new
|
|
194
|
+
schema, so a command written today keeps working. The files the tables are stored in are
|
|
195
|
+
not part of it. Schema 1 is
|
|
196
|
+
|
|
197
|
+
```jsonc
|
|
198
|
+
{
|
|
199
|
+
"$comment": [ /* how to read it */ ],
|
|
200
|
+
"table": "given-name", "schema": 1,
|
|
201
|
+
"variants": { "CONNOR": ["CONOR"], … }, // canonical -> its other spellings
|
|
202
|
+
"families": { "CATHERINE": ["KATE", …], … }, // the curated gate tier: root -> forms
|
|
203
|
+
"notAtGate": ["MEGAN", …], // forms a gate must not admit as forms
|
|
204
|
+
"extended": { "BETHANY": { "BETH": 1 }, … } // root -> form -> tier (1 common .. 3 rare)
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Read it as the library does, and as `$comment` says: read each name as its canonical
|
|
209
|
+
spelling first; two names relate only when they share a root, a form meets EVERY root it
|
|
210
|
+
sits under, and nothing is transitive (`EVIE` meets `EVE` and `EVA`, which do not meet each
|
|
211
|
+
other). A shared root is `given-family` unless one name reaches it only as a `notAtGate`
|
|
212
|
+
form; a name that is the root itself always passes. An `extended` pair's tier is its rarer
|
|
213
|
+
member's, the root counting as 1. To avoid comparing every pair, index each name under
|
|
214
|
+
every root it has and compare within a root, never on one root per name.
|
|
215
|
+
|
|
183
216
|
## Phonetic and blocking keys
|
|
184
217
|
|
|
185
218
|
```ts
|