@mailwoman/kind-classifier 9.1.0 → 9.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.
- package/README.md +2 -2
- package/{classify.ts → lib/classify.ts} +5 -5
- package/{index.ts → lib/index.ts} +10 -10
- package/{intent-markers.ts → lib/intent-markers.ts} +9 -7
- package/{intent-rules.ts → lib/intent-rules.ts} +7 -14
- package/{poi.ts → lib/poi.ts} +126 -15
- package/{rules.ts → lib/rules.ts} +28 -31
- package/lib/types.ts +17 -0
- package/out/classify.d.ts +2 -2
- package/out/classify.d.ts.map +1 -1
- package/out/classify.js +4 -4
- package/out/classify.js.map +1 -1
- package/out/index.d.ts +10 -10
- package/out/index.d.ts.map +1 -1
- package/out/index.js +6 -6
- package/out/index.js.map +1 -1
- package/out/intent-markers.d.ts +3 -3
- package/out/intent-markers.d.ts.map +1 -1
- package/out/intent-markers.js +8 -6
- package/out/intent-markers.js.map +1 -1
- package/out/intent-rules.d.ts +1 -1
- package/out/intent-rules.d.ts.map +1 -1
- package/out/intent-rules.js +6 -12
- package/out/intent-rules.js.map +1 -1
- package/out/poi.d.ts +65 -7
- package/out/poi.d.ts.map +1 -1
- package/out/poi.js +61 -10
- package/out/poi.js.map +1 -1
- package/out/rules.d.ts +12 -4
- package/out/rules.d.ts.map +1 -1
- package/out/rules.js +24 -30
- package/out/rules.js.map +1 -1
- package/out/types.d.ts +3 -25
- package/out/types.d.ts.map +1 -1
- package/out/types.js.map +1 -1
- package/package.json +74 -7
- package/types.ts +0 -34
package/out/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AACzG,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../lib/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AACzG,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D;;;GAGG;AACH,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAA"}
|
package/out/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../lib/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/kind-classifier",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"description": "Stage 2.5 of the runtime pipeline — categorize inputs by query shape (postcode_only / locality_only / structured_address / intersection / po_box / landmark / vague). Rule-based for v1.",
|
|
5
5
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/sister-software/mailwoman.git",
|
|
9
|
-
"directory": "kind-classifier"
|
|
9
|
+
"directory": "packages/kind-classifier"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"out/**/*.js",
|
|
@@ -20,14 +20,49 @@
|
|
|
20
20
|
"!*.test.ts",
|
|
21
21
|
"!*.test.tsx",
|
|
22
22
|
"!**/*.test.ts",
|
|
23
|
-
"!**/*.test.tsx"
|
|
23
|
+
"!**/*.test.tsx",
|
|
24
|
+
"!test/**"
|
|
24
25
|
],
|
|
25
26
|
"type": "module",
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"imports": {
|
|
29
|
+
"#*": {
|
|
30
|
+
"types": "./out/*.d.ts",
|
|
31
|
+
"node": "./out/*.js",
|
|
32
|
+
"default": "./out/*.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
26
35
|
"exports": {
|
|
27
36
|
"./package.json": "./package.json",
|
|
28
37
|
".": {
|
|
29
38
|
"types": "./out/index.d.ts",
|
|
39
|
+
"node": "./out/index.js",
|
|
30
40
|
"default": "./out/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./classify": {
|
|
43
|
+
"types": "./out/classify.d.ts",
|
|
44
|
+
"node": "./out/classify.js",
|
|
45
|
+
"default": "./out/classify.js"
|
|
46
|
+
},
|
|
47
|
+
"./types": {
|
|
48
|
+
"types": "./out/types.d.ts",
|
|
49
|
+
"node": "./out/types.js",
|
|
50
|
+
"default": "./out/types.js"
|
|
51
|
+
},
|
|
52
|
+
"./intent-rules": {
|
|
53
|
+
"types": "./out/intent-rules.d.ts",
|
|
54
|
+
"node": "./out/intent-rules.js",
|
|
55
|
+
"default": "./out/intent-rules.js"
|
|
56
|
+
},
|
|
57
|
+
"./rules": {
|
|
58
|
+
"types": "./out/rules.d.ts",
|
|
59
|
+
"node": "./out/rules.js",
|
|
60
|
+
"default": "./out/rules.js"
|
|
61
|
+
},
|
|
62
|
+
"./poi": {
|
|
63
|
+
"types": "./out/poi.d.ts",
|
|
64
|
+
"node": "./out/poi.js",
|
|
65
|
+
"default": "./out/poi.js"
|
|
31
66
|
}
|
|
32
67
|
},
|
|
33
68
|
"publishConfig": {
|
|
@@ -36,14 +71,46 @@
|
|
|
36
71
|
"./package.json": "./package.json",
|
|
37
72
|
".": {
|
|
38
73
|
"types": "./out/index.d.ts",
|
|
74
|
+
"node": "./out/index.js",
|
|
39
75
|
"default": "./out/index.js"
|
|
76
|
+
},
|
|
77
|
+
"./classify": {
|
|
78
|
+
"types": "./out/classify.d.ts",
|
|
79
|
+
"node": "./out/classify.js",
|
|
80
|
+
"default": "./out/classify.js"
|
|
81
|
+
},
|
|
82
|
+
"./types": {
|
|
83
|
+
"types": "./out/types.d.ts",
|
|
84
|
+
"node": "./out/types.js",
|
|
85
|
+
"default": "./out/types.js"
|
|
86
|
+
},
|
|
87
|
+
"./intent-rules": {
|
|
88
|
+
"types": "./out/intent-rules.d.ts",
|
|
89
|
+
"node": "./out/intent-rules.js",
|
|
90
|
+
"default": "./out/intent-rules.js"
|
|
91
|
+
},
|
|
92
|
+
"./rules": {
|
|
93
|
+
"types": "./out/rules.d.ts",
|
|
94
|
+
"node": "./out/rules.js",
|
|
95
|
+
"default": "./out/rules.js"
|
|
96
|
+
},
|
|
97
|
+
"./poi": {
|
|
98
|
+
"types": "./out/poi.d.ts",
|
|
99
|
+
"node": "./out/poi.js",
|
|
100
|
+
"default": "./out/poi.js"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"imports": {
|
|
104
|
+
"#*": {
|
|
105
|
+
"types": "./out/*.d.ts",
|
|
106
|
+
"node": "./out/*.js",
|
|
107
|
+
"default": "./out/*.js"
|
|
40
108
|
}
|
|
41
109
|
}
|
|
42
110
|
},
|
|
43
111
|
"dependencies": {
|
|
44
|
-
"@mailwoman/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"@mailwoman/query-shape": "9.1.0"
|
|
112
|
+
"@mailwoman/codex": "9.3.0",
|
|
113
|
+
"@mailwoman/core": "9.3.0",
|
|
114
|
+
"@mailwoman/query-shape": "9.3.0"
|
|
48
115
|
}
|
|
49
116
|
}
|
package/types.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Re-exports of the canonical types from `@mailwoman/core/pipeline`.
|
|
9
|
-
*/
|
|
10
|
-
export type { LocaleHint, QueryIntentMarker, QueryKind, QueryKindResult } from "@mailwoman/core/pipeline"
|
|
11
|
-
export { QueryIntentCode } from "@mailwoman/core/pipeline"
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Minimal `NormalizedInput` shape consumed by `classifyKind`. Compatible with `@mailwoman/normalize`'s output.
|
|
15
|
-
*/
|
|
16
|
-
export interface NormalizedInputLite {
|
|
17
|
-
raw: string
|
|
18
|
-
normalized: string
|
|
19
|
-
appliedLocale?: string
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Minimal `QueryShape` shape consumed by `classifyKind`. Compatible with `@mailwoman/query-shape`'s output.
|
|
24
|
-
*/
|
|
25
|
-
export interface QueryShapeLike {
|
|
26
|
-
knownFormats: ReadonlyArray<{
|
|
27
|
-
format: string
|
|
28
|
-
span: { start: number; end: number }
|
|
29
|
-
confidence: number
|
|
30
|
-
}>
|
|
31
|
-
segments?: ReadonlyArray<{ body: string; index: number }>
|
|
32
|
-
characterClass?: string
|
|
33
|
-
totalLength?: number
|
|
34
|
-
}
|