@mailwoman/entity-resolution 11.2.0 → 11.3.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.
Files changed (66) hide show
  1. package/README.md +8 -13
  2. package/lib/ingest.ts +1 -1
  3. package/lib/map-html.ts +1 -1
  4. package/lib/types.ts +2 -1
  5. package/out/ingest.js +1 -1
  6. package/out/ingest.js.map +1 -1
  7. package/out/map-html.js +1 -1
  8. package/out/map-html.js.map +1 -1
  9. package/out/tools/address-pairs/sample.js +1 -1
  10. package/out/tools/address-pairs/sample.js.map +1 -1
  11. package/out/tools/cross/dataset-correlation.js +1 -1
  12. package/out/tools/cross/dataset-correlation.js.map +1 -1
  13. package/out/tools/cross/source-threshold-sweep.js +1 -1
  14. package/out/tools/cross/source-threshold-sweep.js.map +1 -1
  15. package/out/tools/dedup-ceiling.js +1 -1
  16. package/out/tools/dedup-ceiling.js.map +1 -1
  17. package/out/tools/geocoder/vs-provided-coords.js +2 -2
  18. package/out/tools/geocoder/vs-provided-coords.js.map +1 -1
  19. package/out/tools/gold-set-sample.js +1 -1
  20. package/out/tools/gold-set-sample.js.map +1 -1
  21. package/out/tools/learned/scorer/clustering-eval.js +1 -1
  22. package/out/tools/learned/scorer/clustering-eval.js.map +1 -1
  23. package/out/tools/learned/scorer/eval.js +1 -1
  24. package/out/tools/learned/scorer/eval.js.map +1 -1
  25. package/out/tools/matcher-scale.js +1 -1
  26. package/out/tools/matcher-scale.js.map +1 -1
  27. package/out/tools/nppes/sample.js +1 -1
  28. package/out/tools/nppes/sample.js.map +1 -1
  29. package/out/tools/shared.js +4 -4
  30. package/out/tools/shared.js.map +1 -1
  31. package/out/tools/train/cross-gbt.d.ts.map +1 -1
  32. package/out/tools/train/cross-gbt.js +3 -0
  33. package/out/tools/train/cross-gbt.js.map +1 -1
  34. package/out/tools/train/gbt.d.ts.map +1 -1
  35. package/out/tools/train/gbt.js +6 -3
  36. package/out/tools/train/gbt.js.map +1 -1
  37. package/out/tools/train/org-cross-gbt.d.ts.map +1 -1
  38. package/out/tools/train/org-cross-gbt.js +3 -0
  39. package/out/tools/train/org-cross-gbt.js.map +1 -1
  40. package/out/tools/txhhsc-to-oarow.js +1 -1
  41. package/out/tools/txhhsc-to-oarow.js.map +1 -1
  42. package/out/tools/viz/geocode-first-surface.js +1 -1
  43. package/out/tools/viz/geocode-first-surface.js.map +1 -1
  44. package/out/tools/viz/source-provenance-map.js +1 -1
  45. package/out/tools/viz/source-provenance-map.js.map +1 -1
  46. package/out/types.d.ts +2 -1
  47. package/out/types.d.ts.map +1 -1
  48. package/out/types.js.map +1 -1
  49. package/package.json +10 -10
  50. package/tools/address-pairs/sample.ts +1 -1
  51. package/tools/cross/dataset-correlation.ts +1 -1
  52. package/tools/cross/source-threshold-sweep.ts +1 -1
  53. package/tools/dedup-ceiling.ts +1 -1
  54. package/tools/geocoder/vs-provided-coords.ts +2 -2
  55. package/tools/gold-set-sample.ts +1 -1
  56. package/tools/learned/scorer/clustering-eval.ts +1 -1
  57. package/tools/learned/scorer/eval.ts +1 -1
  58. package/tools/matcher-scale.ts +1 -1
  59. package/tools/nppes/sample.ts +1 -1
  60. package/tools/shared.ts +4 -4
  61. package/tools/train/cross-gbt.ts +3 -0
  62. package/tools/train/gbt.ts +6 -3
  63. package/tools/train/org-cross-gbt.ts +3 -0
  64. package/tools/txhhsc-to-oarow.ts +1 -1
  65. package/tools/viz/geocode-first-surface.ts +1 -1
  66. 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 { stringifyJSON } from "@mailwoman/core/json"
10
- import { isPresent } from "@mailwoman/core/objects"
11
- import { makeLcg } from "@mailwoman/core/random"
12
- import { SourceHeaderSyntax, spdxHeaderText } from "@mailwoman/core/spdx-header"
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
 
@@ -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
@@ -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 { prettyJSON, stringifyJSON } from "@mailwoman/core/json"
26
- import { makeLcg } from "@mailwoman/core/random"
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
@@ -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"