@mailwoman/kind-classifier 10.0.0 → 10.2.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 +13 -12
- package/lib/classify.ts +34 -34
- package/lib/index.ts +2 -9
- package/lib/intent/markers.ts +29 -26
- package/lib/intent/rules.ts +82 -83
- package/lib/poi.ts +131 -121
- package/lib/rules.ts +141 -79
- package/out/classify.d.ts +18 -20
- package/out/classify.d.ts.map +1 -1
- package/out/classify.js +29 -31
- package/out/classify.js.map +1 -1
- package/out/index.d.ts +2 -9
- package/out/index.d.ts.map +1 -1
- package/out/index.js +1 -8
- package/out/index.js.map +1 -1
- package/out/intent/markers.d.ts +17 -18
- package/out/intent/markers.d.ts.map +1 -1
- package/out/intent/markers.js +25 -24
- package/out/intent/markers.js.map +1 -1
- package/out/intent/rules.d.ts +31 -35
- package/out/intent/rules.d.ts.map +1 -1
- package/out/intent/rules.js +82 -83
- package/out/intent/rules.js.map +1 -1
- package/out/poi.d.ts +88 -77
- package/out/poi.d.ts.map +1 -1
- package/out/poi.js +70 -57
- package/out/poi.js.map +1 -1
- package/out/rules.d.ts +23 -40
- package/out/rules.d.ts.map +1 -1
- package/out/rules.js +117 -80
- package/out/rules.js.map +1 -1
- package/package.json +15 -50
package/out/poi.d.ts
CHANGED
|
@@ -3,137 +3,148 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* POI subject detection for the `poi_query` kind. The lexicon is injected (`POIPhraseLookup`) so this
|
|
7
|
+
* package keeps its bitter-lesson invariant (no dictionaries in-tree); the phrase table lives in
|
|
8
|
+
* `@mailwoman/poi-taxonomy` and is wired in by `createRuntimePipeline` behind the `poiQueryKind` flag.
|
|
9
|
+
* Spec §3.1.
|
|
10
10
|
*/
|
|
11
|
-
import type {
|
|
11
|
+
import type { POISpatialRelation } from "@mailwoman/core/pipeline";
|
|
12
|
+
import type { NormalizedInputLite, QueryShapeSegmentsView as QueryShapeLike, TextSpan } from "@mailwoman/query-shape";
|
|
12
13
|
/**
|
|
13
14
|
* One lexicon hit for a candidate subject phrase.
|
|
14
15
|
*/
|
|
15
16
|
export interface POIPhraseMatch {
|
|
16
17
|
/**
|
|
17
|
-
* The matched subject's identifier
|
|
18
|
-
* `kind: "
|
|
19
|
-
*
|
|
18
|
+
* The matched subject's identifier: a `@mailwoman/poi-taxonomy` category id for
|
|
19
|
+
* `kind: "category"`, otherwise the canonical display name; `matchPOISubject`
|
|
20
|
+
* treats it opaquely and the caller interprets it per `kind`.
|
|
20
21
|
*/
|
|
21
22
|
categoryID: string;
|
|
22
23
|
matchedPhrase: string;
|
|
23
24
|
confidence: number;
|
|
24
|
-
mechanism?: "exact" | "locale_normalized" | "typo";
|
|
25
|
-
inputPhrase?: string;
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
28
|
-
* source-compatible.
|
|
26
|
+
* How the phrase matched, or `null` when the lookup does not report it.
|
|
29
27
|
*/
|
|
30
|
-
|
|
28
|
+
mechanism: "exact" | "locale_normalized" | "typo" | null;
|
|
31
29
|
/**
|
|
32
|
-
*
|
|
30
|
+
* The phrase the lookup received, or `null` when the lookup does not report it.
|
|
33
31
|
*/
|
|
34
|
-
|
|
32
|
+
inputPhrase: string | null;
|
|
35
33
|
/**
|
|
36
|
-
*
|
|
37
|
-
|
|
34
|
+
* What `categoryID` identifies.
|
|
35
|
+
*/
|
|
36
|
+
kind: "category" | "brand" | "name";
|
|
37
|
+
/**
|
|
38
|
+
* Wikidata QID when known, `kind: "brand"` only.
|
|
39
|
+
*
|
|
40
|
+
* It is `null` when a brand resolved using its name only, and for other kinds.
|
|
41
|
+
*/
|
|
42
|
+
wikidata: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* How the caller reads several hits for one phrase.
|
|
38
45
|
*
|
|
39
|
-
* A lookup returning several hits means two different things
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* authored.
|
|
46
|
+
* A lookup returning several hits means two different things: a phrase index
|
|
47
|
+
* returns the categories one typed phrase could name, the curated reading first
|
|
48
|
+
* (`credit union` → the `bank` rollup its synonym redirects to), while an affordance
|
|
49
|
+
* rung returns every entity kind that affords one activity in a stable enumeration.
|
|
50
|
+
* The enumeration does not express a preference.
|
|
45
51
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
52
|
+
* - `"preference"`: the hits are a preference list; {@link matchPOISubject} keeps the first.
|
|
53
|
+
* The committed lexicon's shape.
|
|
54
|
+
* - `"set"`: this hit is one member of a set the caller must search together,
|
|
55
|
+
* so {@link matchPOISubject} returns them all and the POI branch searches their union.
|
|
49
56
|
*/
|
|
50
|
-
|
|
57
|
+
reading: POIPhraseReading;
|
|
51
58
|
/**
|
|
52
|
-
* ISO 3166-1 alpha-2 countries the authority behind this hit scopes its claim to.
|
|
53
|
-
*
|
|
59
|
+
* ISO 3166-1 alpha-2 countries the authority behind this hit scopes its claim to.
|
|
60
|
+
* `null` means the claim is true in every country.
|
|
54
61
|
*
|
|
55
|
-
* A scope is a statement about
|
|
56
|
-
* the caller's locale: the locale is the lens the
|
|
57
|
-
*
|
|
62
|
+
* A scope is a statement about establishments, so it is judged against the country of
|
|
63
|
+
* the place being searched rather than the caller's locale: the locale is the lens the
|
|
64
|
+
* phrase is read through and makes no statement about where the condition is true.
|
|
65
|
+
* `matchPOISubject` returns the value unchanged.
|
|
66
|
+
* The POI intent stage binds it once the anchor has resolved.
|
|
58
67
|
*/
|
|
59
|
-
countryScope
|
|
68
|
+
countryScope: readonly string[] | null;
|
|
60
69
|
}
|
|
61
70
|
/**
|
|
62
|
-
*
|
|
71
|
+
* How several hits for one phrase are read, as {@link POIPhraseMatch.reading} describes.
|
|
72
|
+
*/
|
|
73
|
+
export type POIPhraseReading = "preference" | "set";
|
|
74
|
+
/**
|
|
75
|
+
* Injected phrase→category lookup, exact-phrase and locale-aware, returning `[]` on miss.
|
|
63
76
|
*/
|
|
64
77
|
export type POIPhraseLookup = (phrase: string, locale?: string) => ReadonlyArray<POIPhraseMatch>;
|
|
65
|
-
export type POISpatialRelation = "comma" | "near" | "in" | "at" | "around" | "to";
|
|
66
|
-
export interface POIQuerySpan {
|
|
67
|
-
text: string;
|
|
68
|
-
/**
|
|
69
|
-
* Half-open character offsets into the normalized input.
|
|
70
|
-
*/
|
|
71
|
-
start: number;
|
|
72
|
-
end: number;
|
|
73
|
-
}
|
|
74
78
|
/**
|
|
75
|
-
*
|
|
79
|
+
* A span of the normalized input, with half-open character offsets.
|
|
80
|
+
*/
|
|
81
|
+
export type POIQuerySpan = TextSpan;
|
|
82
|
+
/**
|
|
83
|
+
* The subject phrase {@link matchPOISubject} chose and the lexicon hits for it.
|
|
76
84
|
*/
|
|
77
85
|
export interface POISubjectMatch {
|
|
78
86
|
/**
|
|
79
|
-
* The hit the subject
|
|
80
|
-
*
|
|
87
|
+
* The hit the subject scores under.
|
|
88
|
+
*
|
|
89
|
+
* Always `matches[0]`, built together in one place so they cannot disagree.
|
|
81
90
|
*/
|
|
82
91
|
match: POIPhraseMatch;
|
|
83
92
|
/**
|
|
84
|
-
* Every category the subject reaches, `match` first
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* nothing downstream may read position as rank.
|
|
93
|
+
* Every category the subject reaches, `match` first: one entry unless the lookup
|
|
94
|
+
* returned a `"set"` {@link POIPhraseMatch.reading}, in which case it holds the
|
|
95
|
+
* whole set and the POI branch searches their union.
|
|
96
|
+
* The order is the lookup's and states no preference.
|
|
89
97
|
*/
|
|
90
98
|
matches: POIPhraseMatch[];
|
|
91
|
-
/**
|
|
92
|
-
* The matched subject text as it appeared in the query.
|
|
93
|
-
*/
|
|
94
99
|
subject: string;
|
|
95
100
|
subjectSpan: POIQuerySpan;
|
|
96
101
|
/**
|
|
97
102
|
* The relation crossing from the subject span to the anchor span.
|
|
98
103
|
*/
|
|
99
|
-
relation
|
|
100
|
-
relationSpan
|
|
104
|
+
relation: POISpatialRelation | null;
|
|
105
|
+
relationSpan: POIQuerySpan | null;
|
|
101
106
|
/**
|
|
102
107
|
* The anchor remainder after the separator; `""` when the whole input matched.
|
|
103
108
|
*/
|
|
104
109
|
remainder: string;
|
|
105
|
-
anchorSpan
|
|
110
|
+
anchorSpan: POIQuerySpan | null;
|
|
106
111
|
}
|
|
107
112
|
/**
|
|
108
|
-
* Match a POI subject: the whole input, or the text before the
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
113
|
+
* Match a POI subject: the whole input, or the text before the first anchor
|
|
114
|
+
* separator whose prefix hits the lexicon (≤ 8 tokens).
|
|
115
|
+
*
|
|
116
|
+
* Scans separators left-to-right, because a lexicon phrase may itself contain a bare separator
|
|
117
|
+
* word ("walk in clinic") and the first separator is not necessarily the right split point.
|
|
118
|
+
* Returns null when the lexicon never fires, including comma-ridden full addresses
|
|
119
|
+
* whose leading segment is not a phrase.
|
|
112
120
|
*
|
|
113
|
-
* The winning candidate's hits are
|
|
114
|
-
* declared one.
|
|
121
|
+
* The winning candidate's hits are listed per {@link reachedMatches}.
|
|
115
122
|
*/
|
|
116
|
-
export declare function matchPOISubject(text: string, locale: string |
|
|
123
|
+
export declare function matchPOISubject(text: string, locale: string | null, lookup: POIPhraseLookup): POISubjectMatch | null;
|
|
117
124
|
/**
|
|
118
|
-
* `poi_query` scorer over an injected lexicon
|
|
119
|
-
* 0.88 ceiling
|
|
120
|
-
*
|
|
121
|
-
*
|
|
125
|
+
* `poi_query` scorer over an injected lexicon, with confidence bands: a whole-input lexicon hit
|
|
126
|
+
* scores 0.92 (above venue-landmark's 0.88 ceiling, because an exact phrase beats a shape heuristic)
|
|
127
|
+
* and a subject plus anchor 0.9.
|
|
128
|
+
*
|
|
129
|
+
* The guards keep venue-led full addresses (class 2) on the structured-address path:
|
|
130
|
+
* a remainder leading with a house number, or a 4+-segment input, scores 0.
|
|
122
131
|
*/
|
|
123
132
|
export declare function createScorePOIQuery(lookup: POIPhraseLookup, locale?: string): (input: NormalizedInputLite, shape: QueryShapeLike) => number;
|
|
124
133
|
/**
|
|
125
|
-
* `poi_category` scorer (ROAD_TO_V9 §4.4) — a bare taxonomy category with nowhere
|
|
126
|
-
* "drinking fountain".
|
|
134
|
+
* `poi_category` scorer (ROAD_TO_V9 §4.4) — a bare taxonomy category with nowhere
|
|
135
|
+
* to search: "tacos", "grocery store", "drinking fountain".
|
|
136
|
+
*
|
|
137
|
+
* Fires only on a whole-input lexicon hit (`remainder === ""`) whose subject is a category.
|
|
138
|
+
* A brand (`kind: "brand"`) is excluded because `POIPhraseMatch.categoryID`
|
|
139
|
+
* then holds the brand's display name.
|
|
127
140
|
*
|
|
128
|
-
*
|
|
129
|
-
* is excluded: a bare "Starbucks" is a name lookup, not a category, and the taxonomy id a category marker promises to
|
|
130
|
-
* carry does not exist for it — `POIPhraseMatch.categoryID` holds the brand's display name in that case, which would
|
|
131
|
-
* make the marker's `categoryID` evidence a lie.
|
|
141
|
+
* That value would misrepresent the marker's `categoryID` evidence.
|
|
132
142
|
*/
|
|
133
143
|
export declare function createScorePOICategory(lookup: POIPhraseLookup, locale?: string): (input: NormalizedInputLite, shape: QueryShapeLike) => number;
|
|
134
144
|
/**
|
|
135
|
-
* The whole-input category hit behind a `poi_category` verdict, for the marker's evidence
|
|
136
|
-
*
|
|
145
|
+
* The whole-input category hit behind a `poi_category` verdict, for the marker's evidence;
|
|
146
|
+
* `null` when the input is not a bare category, under the same conditions as
|
|
147
|
+
* {@link createScorePOICategory} so the two cannot disagree.
|
|
137
148
|
*/
|
|
138
|
-
export declare function matchPOICategory(text: string, locale: string |
|
|
149
|
+
export declare function matchPOICategory(text: string, locale: string | null, lookup: POIPhraseLookup): POIPhraseMatch | null;
|
|
139
150
|
//# sourceMappingURL=poi.d.ts.map
|
package/out/poi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poi.d.ts","sourceRoot":"","sources":["../lib/poi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"poi.d.ts","sourceRoot":"","sources":["../lib/poi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,IAAI,cAAc,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AASrH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,SAAS,EAAE,OAAO,GAAG,mBAAmB,GAAG,MAAM,GAAG,IAAI,CAAA;IACxD;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B;;OAEG;IACH,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,CAAA;IACnC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB;;;;;;;;;;;;;OAaG;IACH,OAAO,EAAE,gBAAgB,CAAA;IACzB;;;;;;;;;OASG;IACH,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,KAAK,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC,cAAc,CAAC,CAAA;AAEhG;;GAEG;AACH,MAAM,MAAM,Y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
-
*
|
|
6
|
+
* POI subject detection for the `poi_query` kind. The lexicon is injected (`POIPhraseLookup`) so this
|
|
7
|
+
* package keeps its bitter-lesson invariant (no dictionaries in-tree); the phrase table lives in
|
|
8
|
+
* `@mailwoman/poi-taxonomy` and is wired in by `createRuntimePipeline` behind the `poiQueryKind` flag.
|
|
9
|
+
* Spec §3.1.
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
|
-
* Comma-segment ceiling for a POI-led query.
|
|
13
|
-
*
|
|
12
|
+
* Comma-segment ceiling for a POI-led query.
|
|
13
|
+
*
|
|
14
|
+
* Past it the input is a venue plus a full address (`X, 350 5th Ave, New York, NY`),
|
|
15
|
+
* which the structured-address scorer should claim instead.
|
|
14
16
|
*/
|
|
15
17
|
const MAX_POI_SEGMENTS = 3;
|
|
16
18
|
/**
|
|
17
|
-
* Anchor separator between subject and place: comma, or near/in/at/around/to —
|
|
18
|
-
* hits the lexicon.
|
|
19
|
+
* Anchor separator between subject and place: comma, or near/in/at/around/to —
|
|
20
|
+
* scanned left-to-right until a prefix hits the lexicon.
|
|
21
|
+
*
|
|
22
|
+
* Linear by construction (no polynomial ReDoS): neither alternative places an unbounded
|
|
23
|
+
* whitespace quantifier before its required literal, the classic `js/polynomial-redos` shape.
|
|
24
|
+
* The comma alternative starts at the literal `,`.
|
|
19
25
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* before a fixed anchor word. Every remaining quantifier (`,\s*`, `…\s+`) is _trailing_ — it runs only after the
|
|
24
|
-
* required literal has already matched and nothing follows it, so it never backtracks. Each start offset does O(1)
|
|
25
|
-
* work, making `matchAll` O(n).
|
|
26
|
+
* The anchor alternative starts at one `\s` before a fixed anchor word.
|
|
27
|
+
* Every remaining quantifier is trailing and runs only after the required literal matches.
|
|
28
|
+
* Each start offset does O(1) work, so `matchAll` is O(n).
|
|
26
29
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* lastIndex) identical, preserving the exact subsequent-match sequence. Verified: 0 divergences across 22.7k inputs
|
|
32
|
-
* (systematic + fuzzed adversarial whitespace + shared-whitespace anchor/comma chains).
|
|
30
|
+
* Behavior is byte-identical to the previous `\s*,\s*|\s+(?:…)\s+`, because `matchPOISubject`
|
|
31
|
+
* trims both the subject and the remainder, so surrounding whitespace is redundant.
|
|
32
|
+
* The leading quantifier only shifted the match start within a whitespace run, while the retained
|
|
33
|
+
* trailing greedy quantifier keeps the match end and thus `matchAll`'s lastIndex identical.
|
|
33
34
|
*/
|
|
34
35
|
const ANCHOR_SEPARATOR = /,\s*|\s(near|in|at|around|to)\s+/gi;
|
|
35
36
|
/**
|
|
36
|
-
* Longest subject
|
|
37
|
+
* Longest subject accepted, in tokens: eight covers compound taxonomy phrases
|
|
38
|
+
* while bounding lexicon probes.
|
|
37
39
|
*/
|
|
38
40
|
const MAX_SUBJECT_TOKENS = 8;
|
|
39
41
|
/**
|
|
40
|
-
* The categories one candidate subject reaches
|
|
42
|
+
* The categories one candidate subject reaches: the whole array when the first hit reads
|
|
43
|
+
* as a `"set"` ({@link POIPhraseMatch.reading}), preserved as the lookup returned it
|
|
44
|
+
* and never filtered, so a rung that flagged only some members keeps every member.
|
|
41
45
|
*
|
|
42
|
-
* The
|
|
43
|
-
*
|
|
44
|
-
* visible to whoever reads the set. Otherwise the first hit alone, which is the preference-list reading the committed
|
|
45
|
-
* phrase index has always had.
|
|
46
|
+
* The inconsistency stays visible.
|
|
47
|
+
* Otherwise, use only the first hit.
|
|
46
48
|
*/
|
|
47
49
|
function reachedMatches(hits) {
|
|
48
|
-
return hits[0].
|
|
50
|
+
return hits[0].reading === "set" ? [...hits] : [hits[0]];
|
|
49
51
|
}
|
|
50
52
|
/**
|
|
51
|
-
* Match a POI subject: the whole input, or the text before the
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
53
|
+
* Match a POI subject: the whole input, or the text before the first anchor
|
|
54
|
+
* separator whose prefix hits the lexicon (≤ 8 tokens).
|
|
55
|
+
*
|
|
56
|
+
* Scans separators left-to-right, because a lexicon phrase may itself contain a bare separator
|
|
57
|
+
* word ("walk in clinic") and the first separator is not necessarily the right split point.
|
|
58
|
+
* Returns null when the lexicon never fires, including comma-ridden full addresses
|
|
59
|
+
* whose leading segment is not a phrase.
|
|
55
60
|
*
|
|
56
|
-
* The winning candidate's hits are
|
|
57
|
-
* declared one.
|
|
61
|
+
* The winning candidate's hits are listed per {@link reachedMatches}.
|
|
58
62
|
*/
|
|
59
63
|
export function matchPOISubject(text, locale, lookup) {
|
|
60
64
|
const trimmed = text.trim();
|
|
61
65
|
const inputStart = text.indexOf(trimmed);
|
|
62
66
|
if (!trimmed)
|
|
63
67
|
return null;
|
|
64
|
-
const whole = lookup(trimmed, locale);
|
|
68
|
+
const whole = lookup(trimmed, locale ?? undefined);
|
|
65
69
|
if (whole.length) {
|
|
66
70
|
const matches = reachedMatches(whole);
|
|
67
71
|
return {
|
|
@@ -69,18 +73,21 @@ export function matchPOISubject(text, locale, lookup) {
|
|
|
69
73
|
matches,
|
|
70
74
|
subject: trimmed,
|
|
71
75
|
subjectSpan: { text: trimmed, start: inputStart, end: inputStart + trimmed.length },
|
|
76
|
+
relation: null,
|
|
77
|
+
relationSpan: null,
|
|
72
78
|
remainder: "",
|
|
79
|
+
anchorSpan: null,
|
|
73
80
|
};
|
|
74
81
|
}
|
|
75
82
|
for (const separator of trimmed.matchAll(ANCHOR_SEPARATOR)) {
|
|
76
83
|
if (separator.index === 0)
|
|
77
84
|
continue;
|
|
78
85
|
const subject = trimmed.slice(0, separator.index).trim();
|
|
79
|
-
// Subjects only grow as the scan moves right
|
|
80
|
-
// split
|
|
86
|
+
// Subjects only grow as the scan moves right, so once over budget later splits are too.
|
|
87
|
+
// Whitespace-only split rather than `wordsOf`, because a comma inside a subject is real content.
|
|
81
88
|
if (subject.split(/\s+/).length > MAX_SUBJECT_TOKENS)
|
|
82
89
|
break;
|
|
83
|
-
const hits = lookup(subject, locale);
|
|
90
|
+
const hits = lookup(subject, locale ?? undefined);
|
|
84
91
|
if (!hits.length)
|
|
85
92
|
continue;
|
|
86
93
|
const remainder = trimmed.slice(separator.index + separator[0].length).trim();
|
|
@@ -117,14 +124,16 @@ export function matchPOISubject(text, locale, lookup) {
|
|
|
117
124
|
return null;
|
|
118
125
|
}
|
|
119
126
|
/**
|
|
120
|
-
* `poi_query` scorer over an injected lexicon
|
|
121
|
-
* 0.88 ceiling
|
|
122
|
-
*
|
|
123
|
-
*
|
|
127
|
+
* `poi_query` scorer over an injected lexicon, with confidence bands: a whole-input lexicon hit
|
|
128
|
+
* scores 0.92 (above venue-landmark's 0.88 ceiling, because an exact phrase beats a shape heuristic)
|
|
129
|
+
* and a subject plus anchor 0.9.
|
|
130
|
+
*
|
|
131
|
+
* The guards keep venue-led full addresses (class 2) on the structured-address path:
|
|
132
|
+
* a remainder leading with a house number, or a 4+-segment input, scores 0.
|
|
124
133
|
*/
|
|
125
134
|
export function createScorePOIQuery(lookup, locale) {
|
|
126
135
|
return (input, shape) => {
|
|
127
|
-
const matched = matchPOISubject(input.normalized, locale ?? input.appliedLocale, lookup);
|
|
136
|
+
const matched = matchPOISubject(input.normalized, locale ?? input.appliedLocale ?? null, lookup);
|
|
128
137
|
if (!matched)
|
|
129
138
|
return 0;
|
|
130
139
|
if (matched.remainder === "")
|
|
@@ -139,40 +148,44 @@ export function createScorePOIQuery(lookup, locale) {
|
|
|
139
148
|
};
|
|
140
149
|
}
|
|
141
150
|
/**
|
|
142
|
-
* Confidence band for a bare category
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
151
|
+
* Confidence band for a bare category, one notch above `poi_query`'s whole-input
|
|
152
|
+
* band (0.92) so only the anchorless subset takes the top slot and every anchored
|
|
153
|
+
* POI query keeps scoring `poi_query` as before.
|
|
154
|
+
*
|
|
155
|
+
* The coordinator's POI branch accepts both kinds, so the routing is identical either way.
|
|
156
|
+
* The split exists so the marker can say "you supplied a category and no place".
|
|
146
157
|
*/
|
|
147
158
|
const POI_CATEGORY_CONFIDENCE = 0.93;
|
|
148
159
|
/**
|
|
149
|
-
* `poi_category` scorer (ROAD_TO_V9 §4.4) — a bare taxonomy category with nowhere
|
|
150
|
-
* "drinking fountain".
|
|
160
|
+
* `poi_category` scorer (ROAD_TO_V9 §4.4) — a bare taxonomy category with nowhere
|
|
161
|
+
* to search: "tacos", "grocery store", "drinking fountain".
|
|
162
|
+
*
|
|
163
|
+
* Fires only on a whole-input lexicon hit (`remainder === ""`) whose subject is a category.
|
|
164
|
+
* A brand (`kind: "brand"`) is excluded because `POIPhraseMatch.categoryID`
|
|
165
|
+
* then holds the brand's display name.
|
|
151
166
|
*
|
|
152
|
-
*
|
|
153
|
-
* is excluded: a bare "Starbucks" is a name lookup, not a category, and the taxonomy id a category marker promises to
|
|
154
|
-
* carry does not exist for it — `POIPhraseMatch.categoryID` holds the brand's display name in that case, which would
|
|
155
|
-
* make the marker's `categoryID` evidence a lie.
|
|
167
|
+
* That value would misrepresent the marker's `categoryID` evidence.
|
|
156
168
|
*/
|
|
157
169
|
export function createScorePOICategory(lookup, locale) {
|
|
158
170
|
return (input, _shape) => {
|
|
159
|
-
const matched = matchPOISubject(input.normalized, locale ?? input.appliedLocale, lookup);
|
|
171
|
+
const matched = matchPOISubject(input.normalized, locale ?? input.appliedLocale ?? null, lookup);
|
|
160
172
|
if (!matched || matched.remainder !== "")
|
|
161
173
|
return 0;
|
|
162
|
-
if (
|
|
174
|
+
if (matched.match.kind !== "category")
|
|
163
175
|
return 0;
|
|
164
176
|
return POI_CATEGORY_CONFIDENCE * matched.match.confidence;
|
|
165
177
|
};
|
|
166
178
|
}
|
|
167
179
|
/**
|
|
168
|
-
* The whole-input category hit behind a `poi_category` verdict, for the marker's evidence
|
|
169
|
-
*
|
|
180
|
+
* The whole-input category hit behind a `poi_category` verdict, for the marker's evidence;
|
|
181
|
+
* `null` when the input is not a bare category, under the same conditions as
|
|
182
|
+
* {@link createScorePOICategory} so the two cannot disagree.
|
|
170
183
|
*/
|
|
171
184
|
export function matchPOICategory(text, locale, lookup) {
|
|
172
185
|
const matched = matchPOISubject(text, locale, lookup);
|
|
173
186
|
if (!matched || matched.remainder !== "")
|
|
174
187
|
return null;
|
|
175
|
-
if (
|
|
188
|
+
if (matched.match.kind !== "category")
|
|
176
189
|
return null;
|
|
177
190
|
return matched.match;
|
|
178
191
|
}
|
package/out/poi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poi.js","sourceRoot":"","sources":["../lib/poi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"poi.js","sourceRoot":"","sources":["../lib/poi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;;;GAKG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAA;AA0G1B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,gBAAgB,GAAG,oCAAoC,CAAA;AAE7D;;;GAGG;AACH,MAAM,kBAAkB,GAAG,CAAC,CAAA;AAE5B;;;;;;;GAOG;AACH,SAAS,cAAc,CAAC,IAAmC;IAC1D,OAAO,IAAI,CAAC,CAAC,CAAE,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,CAAA;AAC3D,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,MAAqB,EAAE,MAAuB;IAC3F,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;IAC3B,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAExC,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IAEzB,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,EAAE,MAAM,IAAI,SAAS,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IAAY,EAAE,MAAqB,EAAE,MAAuB;IAC5F,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAErD,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,SAAS,KAAK,EAAE;QAAE,OAAO,IAAI,CAAA;IAErD,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,IAAI,CAAA;IAElD,OAAO,OAAO,CAAC,KAAK,CAAA;AACrB,CAAC"}
|
package/out/rules.d.ts
CHANGED
|
@@ -3,80 +3,63 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* Rule-based
|
|
7
|
-
* and returns a confidence
|
|
8
|
-
*
|
|
9
|
-
* Bitter-lesson-safe: only universal structural patterns — no place-name dictionaries. ~1 small
|
|
10
|
-
* regex set per new locale, not 50K dictionary entries.
|
|
6
|
+
* Rule-based `QueryKind` scorers. Each scorer reads structural patterns in the normalized input and
|
|
7
|
+
* its QueryShape and returns a confidence from 0 to 1.
|
|
11
8
|
*/
|
|
12
9
|
import type { NormalizedInputLite, QueryShapeSegmentsView as QueryShapeLike } from "@mailwoman/query-shape";
|
|
13
10
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* Exported so `intent-rules.ts`'s `bare_toponym` can share the exact same ceiling. Sharing it is what makes
|
|
17
|
-
* "bare_toponym is a strict refinement of locality_only" a structural property rather than two numbers that happen to
|
|
18
|
-
* agree today.
|
|
11
|
+
* Maximum length for a bare locality.
|
|
12
|
+
* The `bare_toponym` intent rule uses the same limit.
|
|
19
13
|
*/
|
|
20
14
|
export declare const MAX_LOCALITY_ONLY_LENGTH = 30;
|
|
21
15
|
/**
|
|
22
|
-
*
|
|
23
|
-
* covers all locale variants (US "PO Box 123", FR "BP 42", etc.).
|
|
16
|
+
* Scores input in which QueryShape detected a PO Box format.
|
|
24
17
|
*/
|
|
25
18
|
export declare function scorePoBox(_input: NormalizedInputLite, shape: QueryShapeLike): number;
|
|
26
19
|
/**
|
|
27
|
-
*
|
|
20
|
+
* Scores street-intersection phrasing.
|
|
28
21
|
*/
|
|
29
22
|
export declare function scoreIntersection(input: NormalizedInputLite, _shape: QueryShapeLike): number;
|
|
30
23
|
/**
|
|
31
|
-
*
|
|
32
|
-
* location relative to another place.
|
|
24
|
+
* Scores input that begins with a relative-landmark phrase.
|
|
33
25
|
*/
|
|
34
26
|
export declare function scoreLandmark(input: NormalizedInputLite, _shape: QueryShapeLike): number;
|
|
35
27
|
/**
|
|
36
|
-
*
|
|
37
|
-
* matters: a trailing comma or doubled separator otherwise yields an empty string that inflates the word count and
|
|
38
|
-
* falsifies every-word predicates like the proper-case check below.
|
|
28
|
+
* Splits text on whitespace and commas and drops empty tokens.
|
|
39
29
|
*/
|
|
40
30
|
export declare function wordsOf(text: string): string[];
|
|
41
31
|
/**
|
|
42
|
-
*
|
|
43
|
-
* `@mailwoman/codex`, minus its curated name-prone canonicals (PARK, FIELD, HILL, LAKE, …). Those double as ordinary
|
|
44
|
-
* proper-name heads ("Wrigley Field", "Menlo Park"), and disqualifying on them would reject the very venue and place
|
|
45
|
-
* names the rules below exist to capture. Shared with `intent-rules.ts` so both rule sets read one definition.
|
|
32
|
+
* Reports whether a word is a USPS street suffix that rarely appears in place names.
|
|
46
33
|
*/
|
|
47
34
|
export declare function isDisqualifyingStreetSuffix(word: string): boolean;
|
|
48
35
|
/**
|
|
49
|
-
*
|
|
50
|
-
|
|
36
|
+
* Removes postcode spans in the final segment and collapses the remaining separators.
|
|
37
|
+
*/
|
|
38
|
+
export declare function withoutPostcodeSpans(text: string, shape: QueryShapeLike): string;
|
|
39
|
+
/**
|
|
40
|
+
* Reports whether text contains a Unicode letter.
|
|
51
41
|
*
|
|
52
|
-
*
|
|
53
|
-
|
|
42
|
+
* By itself, the `alpha` character class can match punctuation-only input.
|
|
43
|
+
*/
|
|
44
|
+
export declare function carriesLetter(text: string): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Scores short capitalized venue names that have no street suffix or recognized format.
|
|
54
47
|
*/
|
|
55
48
|
export declare function scoreVenueLandmark(input: NormalizedInputLite, shape: QueryShapeLike): number;
|
|
56
49
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* The "covering most of it" check is what distinguishes `"10118"` (postcode-only) from `"350 5th Ave 10118"`
|
|
60
|
-
* (structured-address with a postcode in it).
|
|
50
|
+
* Scores short input in which a postcode covers most of the text.
|
|
61
51
|
*/
|
|
62
52
|
export declare function scorePostcodeOnly(input: NormalizedInputLite, shape: QueryShapeLike): number;
|
|
63
53
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* Examples: `"Paris"`, `"NYC NY"`, `"Tokyo"`. Distinguishes from `structured_address` (multiple segments) and `vague`
|
|
67
|
-
* (long or mixed-class).
|
|
54
|
+
* Scores a place name with at most an administrative tail and an optional postcode.
|
|
68
55
|
*/
|
|
69
56
|
export declare function scoreLocalityOnly(input: NormalizedInputLite, shape: QueryShapeLike): number;
|
|
70
57
|
/**
|
|
71
|
-
*
|
|
72
|
-
* mixed-class.
|
|
58
|
+
* Scores multi-component address shapes.
|
|
73
59
|
*/
|
|
74
60
|
export declare function scoreStructuredAddress(input: NormalizedInputLite, shape: QueryShapeLike): number;
|
|
75
61
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* Returns a moderate baseline so `vague` always shows up as an alternative, even when other rules dominate. The
|
|
79
|
-
* coordinator decides whether to trust vague as the primary kind.
|
|
62
|
+
* Returns a low constant fallback score for ambiguous input.
|
|
80
63
|
*/
|
|
81
64
|
export declare function scoreVague(_input: NormalizedInputLite, _shape: QueryShapeLike): number;
|
|
82
65
|
//# sourceMappingURL=rules.d.ts.map
|
package/out/rules.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../l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