@mailwoman/entity-resolution 11.2.0 → 11.4.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 +8 -13
- package/lib/ingest.ts +1 -1
- package/lib/map-html.ts +1 -1
- package/lib/types.ts +2 -1
- package/out/ingest.js +1 -1
- package/out/ingest.js.map +1 -1
- package/out/map-html.js +1 -1
- package/out/map-html.js.map +1 -1
- package/out/tools/address-pairs/sample.js +1 -1
- package/out/tools/address-pairs/sample.js.map +1 -1
- package/out/tools/cross/dataset-correlation.js +1 -1
- package/out/tools/cross/dataset-correlation.js.map +1 -1
- package/out/tools/cross/source-threshold-sweep.js +1 -1
- package/out/tools/cross/source-threshold-sweep.js.map +1 -1
- package/out/tools/dedup-ceiling.js +1 -1
- package/out/tools/dedup-ceiling.js.map +1 -1
- package/out/tools/geocoder/vs-provided-coords.js +2 -2
- package/out/tools/geocoder/vs-provided-coords.js.map +1 -1
- package/out/tools/gold-set-sample.js +1 -1
- package/out/tools/gold-set-sample.js.map +1 -1
- package/out/tools/learned/scorer/clustering-eval.js +1 -1
- package/out/tools/learned/scorer/clustering-eval.js.map +1 -1
- package/out/tools/learned/scorer/eval.js +1 -1
- package/out/tools/learned/scorer/eval.js.map +1 -1
- package/out/tools/matcher-scale.js +1 -1
- package/out/tools/matcher-scale.js.map +1 -1
- package/out/tools/nppes/sample.js +1 -1
- package/out/tools/nppes/sample.js.map +1 -1
- package/out/tools/shared.js +4 -4
- package/out/tools/shared.js.map +1 -1
- package/out/tools/train/cross-gbt.d.ts.map +1 -1
- package/out/tools/train/cross-gbt.js +3 -0
- package/out/tools/train/cross-gbt.js.map +1 -1
- package/out/tools/train/gbt.d.ts.map +1 -1
- package/out/tools/train/gbt.js +6 -3
- package/out/tools/train/gbt.js.map +1 -1
- package/out/tools/train/org-cross-gbt.d.ts.map +1 -1
- package/out/tools/train/org-cross-gbt.js +3 -0
- package/out/tools/train/org-cross-gbt.js.map +1 -1
- package/out/tools/txhhsc-to-oarow.js +1 -1
- package/out/tools/txhhsc-to-oarow.js.map +1 -1
- package/out/tools/viz/geocode-first-surface.js +1 -1
- package/out/tools/viz/geocode-first-surface.js.map +1 -1
- package/out/tools/viz/source-provenance-map.js +1 -1
- package/out/tools/viz/source-provenance-map.js.map +1 -1
- package/out/types.d.ts +2 -1
- package/out/types.d.ts.map +1 -1
- package/out/types.js.map +1 -1
- package/package.json +10 -10
- package/tools/address-pairs/sample.ts +1 -1
- package/tools/cross/dataset-correlation.ts +1 -1
- package/tools/cross/source-threshold-sweep.ts +1 -1
- package/tools/dedup-ceiling.ts +1 -1
- package/tools/geocoder/vs-provided-coords.ts +2 -2
- package/tools/gold-set-sample.ts +1 -1
- package/tools/learned/scorer/clustering-eval.ts +1 -1
- package/tools/learned/scorer/eval.ts +1 -1
- package/tools/matcher-scale.ts +1 -1
- package/tools/nppes/sample.ts +1 -1
- package/tools/shared.ts +4 -4
- package/tools/train/cross-gbt.ts +3 -0
- package/tools/train/gbt.ts +6 -3
- package/tools/train/org-cross-gbt.ts +3 -0
- package/tools/txhhsc-to-oarow.ts +1 -1
- package/tools/viz/geocode-first-surface.ts +1 -1
- package/tools/viz/source-provenance-map.ts +1 -1
package/tools/shared.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { makeDirectories, writeLocalFile } from "@mailwoman/core/fs/writers"
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import { makeLcg } from "@mailwoman/core/math/random"
|
|
10
|
+
import { SourceHeaderSyntax, spdxHeaderText } from "@mailwoman/core/repo/spdx-header"
|
|
11
|
+
import { stringifyJSON } from "@mailwoman/core/values/json"
|
|
12
|
+
import { isPresent } from "@mailwoman/core/values/objects"
|
|
13
13
|
import { block, gbtScore, trainGBT, type GBTOpts, type TermFrequencyTable } from "@mailwoman/match"
|
|
14
14
|
import { dirname } from "path-ts"
|
|
15
15
|
|
package/tools/train/cross-gbt.ts
CHANGED
|
@@ -101,6 +101,9 @@ export async function trainCrossSourceGBT(
|
|
|
101
101
|
const STATE = stateOption(options)
|
|
102
102
|
const NPIS = options.npis ?? 2000
|
|
103
103
|
const OUT = options.out || "packages/entity-resolution/lib/models/crosssource-gbt-en-us.ts"
|
|
104
|
+
// country-branch: the training sources are US provider registers,
|
|
105
|
+
// so the model is stamped en-US by default.
|
|
106
|
+
// A locale recorded in the sources' manifest would replace the literal.
|
|
104
107
|
const LOCALE = options.locale || "en-US"
|
|
105
108
|
// Max cross-source recall subject to this held-out pairwise precision.
|
|
106
109
|
const PRECISION_BAR = options.precisionBar ?? 0.95
|
package/tools/train/gbt.ts
CHANGED
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
import { dataRootPath } from "@mailwoman/core/data-root"
|
|
24
24
|
import { makeDirectories, writeLocalFile } from "@mailwoman/core/fs/writers"
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { SourceHeaderSyntax, spdxHeaderText } from "@mailwoman/core/spdx-header"
|
|
25
|
+
import { makeLcg } from "@mailwoman/core/math/random"
|
|
26
|
+
import { SourceHeaderSyntax, spdxHeaderText } from "@mailwoman/core/repo/spdx-header"
|
|
28
27
|
import { isoDate } from "@mailwoman/core/utils"
|
|
28
|
+
import { prettyJSON, stringifyJSON } from "@mailwoman/core/values/json"
|
|
29
29
|
import { block, gbtScore, trainGBT } from "@mailwoman/match"
|
|
30
30
|
import { dirname } from "path-ts"
|
|
31
31
|
|
|
@@ -118,6 +118,9 @@ export async function trainDedupGBT(
|
|
|
118
118
|
const STATE = stateOption(options)
|
|
119
119
|
const NPIS = options.npis ?? 3000
|
|
120
120
|
const OUT = options.out || "packages/entity-resolution/lib/models/dedup-gbt-en-us.ts"
|
|
121
|
+
// country-branch: the training sources are US provider registers,
|
|
122
|
+
// so the model is stamped en-US by default.
|
|
123
|
+
// A locale recorded in the sources' manifest would replace the literal.
|
|
121
124
|
const LOCALE = options.locale || "en-US"
|
|
122
125
|
const COST = options.cost ?? 1
|
|
123
126
|
const TRAIN_DATE = options.date || isoDate()
|
|
@@ -98,6 +98,9 @@ export async function trainOrgCrossSourceGBT(
|
|
|
98
98
|
const SOURCES = resolvePath(options.sources ?? dataRootPath("record-matcher", "sources"))
|
|
99
99
|
const CAP = options.cap ?? 6000
|
|
100
100
|
const OUT = options.out || "packages/entity-resolution/lib/models/org-crosssource-gbt-en-us.ts"
|
|
101
|
+
// country-branch: the training sources are US organization registers,
|
|
102
|
+
// so the model is stamped en-US by default.
|
|
103
|
+
// A locale recorded in the sources' manifest would replace the literal.
|
|
101
104
|
const LOCALE = options.locale || "en-US"
|
|
102
105
|
// Max cross-source recall subject to this held-out pairwise precision.
|
|
103
106
|
const PRECISION_BAR = options.precisionBar ?? 0.95
|
package/tools/txhhsc-to-oarow.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { dataRootPath, tempRootPath } from "@mailwoman/core/data-root"
|
|
17
17
|
import { readLocalTextFile } from "@mailwoman/core/fs/readers"
|
|
18
18
|
import { writeLocalTextFile } from "@mailwoman/core/fs/writers"
|
|
19
|
-
import { stringifyJSON } from "@mailwoman/core/json"
|
|
19
|
+
import { stringifyJSON } from "@mailwoman/core/values/json"
|
|
20
20
|
import type { PathBuilderLike } from "path-ts"
|
|
21
21
|
import { TSVSpliterator } from "spliterator"
|
|
22
22
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { tempRootPath } from "@mailwoman/core/data-root"
|
|
12
12
|
import { writeLocalFile } from "@mailwoman/core/fs/writers"
|
|
13
|
-
import { stringifyJSON } from "@mailwoman/core/json"
|
|
13
|
+
import { stringifyJSON } from "@mailwoman/core/values/json"
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Options for {@linkcode geocodeFirstSurface}.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import { tempRootPath } from "@mailwoman/core/data-root"
|
|
11
11
|
import { writeLocalFile } from "@mailwoman/core/fs/writers"
|
|
12
|
-
import { isPresent } from "@mailwoman/core/objects"
|
|
12
|
+
import { isPresent } from "@mailwoman/core/values/objects"
|
|
13
13
|
import type { AddressPointDatabase } from "@mailwoman/resolver-wof-sqlite/address"
|
|
14
14
|
import { addressPointDatabasePath } from "@mailwoman/resolver-wof-sqlite/paths"
|
|
15
15
|
import type { GeoFeature, GeoFeatureCollection, PointLiteral } from "@mailwoman/spatial"
|