@wirecat/zoom-cli 0.55.0 → 0.57.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 +4 -4
- package/dist/bin/zm.js +35 -5
- package/dist/bundle/all-profiles-EKHWTGOY.js +25 -0
- package/dist/bundle/answer-policy-KH2IFXPN.js +96 -0
- package/dist/bundle/anthropic-VL54IUGF.js +70 -0
- package/dist/bundle/bun-ADJVI4HY.js +169 -0
- package/dist/bundle/bun-sqlite-2SDA3YOT.js +69 -0
- package/dist/bundle/chunk-2IKY7VBH.js +9 -0
- package/dist/bundle/chunk-2WOGZDZG.js +431 -0
- package/dist/bundle/chunk-4R7HYNZS.js +73 -0
- package/dist/bundle/chunk-4VCA7QU3.js +538 -0
- package/dist/bundle/chunk-4YLS4YLS.js +29 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-5F7IOESV.js +281 -0
- package/dist/bundle/chunk-5QESMCQK.js +122 -0
- package/dist/bundle/chunk-6M6FJV5D.js +138 -0
- package/dist/bundle/chunk-6MX5T6AQ.js +17 -0
- package/dist/bundle/chunk-6P3YHT54.js +385 -0
- package/dist/bundle/chunk-7A6PZUDR.js +938 -0
- package/dist/bundle/chunk-7GUG6UZS.js +884 -0
- package/dist/bundle/chunk-7JZJMHQY.js +487 -0
- package/dist/bundle/chunk-A4ETXPMZ.js +98 -0
- package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
- package/dist/bundle/chunk-AE4BOXH7.js +5292 -0
- package/dist/bundle/chunk-AN3GVZTU.js +76 -0
- package/dist/bundle/chunk-BAYNCCNM.js +215 -0
- package/dist/bundle/chunk-BW2WPOXP.js +166 -0
- package/dist/bundle/chunk-BW52AJ4R.js +3387 -0
- package/dist/bundle/chunk-CB5UTASG.js +18 -0
- package/dist/bundle/chunk-CLMXBW53.js +1028 -0
- package/dist/bundle/chunk-DCTXOMOR.js +35 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-EOQFWJJD.js +1095 -0
- package/dist/bundle/chunk-G4R4ZIGD.js +3569 -0
- package/dist/bundle/chunk-G4VZDINN.js +161 -0
- package/dist/bundle/chunk-GARCOIB6.js +409 -0
- package/dist/bundle/chunk-GKMGS7G5.js +1938 -0
- package/dist/bundle/chunk-HCNMFFG3.js +82 -0
- package/dist/bundle/chunk-HG5KRV55.js +1970 -0
- package/dist/bundle/chunk-HKYLSIZ2.js +82 -0
- package/dist/bundle/chunk-HTQTIKWP.js +928 -0
- package/dist/bundle/chunk-I4VQDXFR.js +100 -0
- package/dist/bundle/chunk-ICSKEDPI.js +36139 -0
- package/dist/bundle/chunk-IP4OK7RQ.js +24 -0
- package/dist/bundle/chunk-IVQ6342B.js +2 -0
- package/dist/bundle/chunk-K72SEMYI.js +160 -0
- package/dist/bundle/chunk-LHRCJYFC.js +19 -0
- package/dist/bundle/chunk-LPTIQLDW.js +192 -0
- package/dist/bundle/chunk-LQ3T2ZIX.js +124 -0
- package/dist/bundle/chunk-LSVI3A5X.js +836 -0
- package/dist/bundle/chunk-LW2G4U6W.js +570 -0
- package/dist/bundle/chunk-LXB6ONWC.js +3517 -0
- package/dist/bundle/chunk-LY26NW3I.js +6848 -0
- package/dist/bundle/chunk-MAEFLDHG.js +6092 -0
- package/dist/bundle/chunk-MZH4GDR4.js +45 -0
- package/dist/bundle/chunk-NN5B24KP.js +1109 -0
- package/dist/bundle/chunk-NO7CJEYV.js +22 -0
- package/dist/bundle/chunk-NTDWAAGL.js +18435 -0
- package/dist/bundle/chunk-NW3X3G5X.js +264 -0
- package/dist/bundle/chunk-O66V2WHK.js +48 -0
- package/dist/bundle/chunk-OCGPZHXW.js +25 -0
- package/dist/bundle/chunk-OIHDCGV4.js +151 -0
- package/dist/bundle/chunk-OVSWVPXL.js +8190 -0
- package/dist/bundle/chunk-PIN5RZ3D.js +63 -0
- package/dist/bundle/chunk-QLIB3PEC.js +1146 -0
- package/dist/bundle/chunk-QTR6D5HT.js +58 -0
- package/dist/bundle/chunk-QUJPQMHJ.js +2315 -0
- package/dist/bundle/chunk-R3HPOCZD.js +188 -0
- package/dist/bundle/chunk-RMV4C2YL.js +482 -0
- package/dist/bundle/chunk-RRRBMQ2E.js +844 -0
- package/dist/bundle/chunk-S4S7E54J.js +60 -0
- package/dist/bundle/chunk-SB6WOSHG.js +1109 -0
- package/dist/bundle/chunk-SE75DPBY.js +31 -0
- package/dist/bundle/chunk-SQJ7EH2D.js +97 -0
- package/dist/bundle/chunk-TKCHUT2H.js +422 -0
- package/dist/bundle/chunk-TLQUKHEM.js +193 -0
- package/dist/bundle/chunk-TZ2MKETI.js +100 -0
- package/dist/bundle/chunk-UC44ZMQV.js +78 -0
- package/dist/bundle/chunk-UI5UTMSZ.js +275 -0
- package/dist/bundle/chunk-VPPYYWOH.js +630 -0
- package/dist/bundle/chunk-WJHK5D7Z.js +35612 -0
- package/dist/bundle/chunk-WQ24UC44.js +239 -0
- package/dist/bundle/chunk-X5DFDGWS.js +2 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YB4DMKYX.js +119 -0
- package/dist/bundle/chunk-Z4TZ6TAF.js +288 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/cli-72EQATJF.js +825 -0
- package/dist/bundle/command-contract-4MHSZUN3.js +38 -0
- package/dist/bundle/config-GFIJK6G2.js +79 -0
- package/dist/bundle/dist-IBNHCQXT.js +136 -0
- package/dist/bundle/dist-XUFQCJXW.js +7577 -0
- package/dist/bundle/echarts-RFTK737T.js +42501 -0
- package/dist/bundle/embed-7QYA2ZZE.js +35 -0
- package/dist/bundle/embedder-YNN6PCHG.js +108 -0
- package/dist/bundle/first-run-EVSRQKZJ.js +23 -0
- package/dist/bundle/first-screen-RG4GUKW7.js +36 -0
- package/dist/bundle/folders-JEPOMYM4.js +13 -0
- package/dist/bundle/instructions-FHNL7CMW.js +9 -0
- package/dist/bundle/main-NYGJXPH7.js +130 -0
- package/dist/bundle/mcp-IXFC2VVR.js +165 -0
- package/dist/bundle/mcp-VGSZDCKK.js +189 -0
- package/dist/bundle/mcp-XKP2PXLS.js +92 -0
- package/dist/bundle/meetings-IBPI4MM4.js +215 -0
- package/dist/bundle/node-P4E63KXA.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-ZMCACJVS.js +176 -0
- package/dist/bundle/node-sqlite-ZNGOBA5Q.js +45 -0
- package/dist/bundle/oauth-Q6LKF7DB.js +17 -0
- package/dist/bundle/open-LJ332Y5O.js +19 -0
- package/dist/bundle/output-file-RYQZ3RTE.js +63 -0
- package/dist/bundle/process-ZPTLNVQS.js +91 -0
- package/dist/bundle/program-IBRQBQ6W.js +5845 -0
- package/dist/bundle/prompt-RT7GUUXH.js +12 -0
- package/dist/bundle/recognize-QXGE7YJH.js +190 -0
- package/dist/bundle/remote-FD4MZQV3.js +26 -0
- package/dist/bundle/rerank-V6AVV755.js +49 -0
- package/dist/bundle/run-log-RE2EI3UU.js +111 -0
- package/dist/bundle/serve-HIJTFAW7.js +19 -0
- package/dist/bundle/server-3QOXOYYL.js +53 -0
- package/dist/bundle/server-WLJCU7KK.js +812 -0
- package/dist/bundle/services-KC5KQFBS.js +330 -0
- package/dist/bundle/speech-5JOXLYDA.js +44 -0
- package/dist/bundle/state-PPGRB3T6.js +33 -0
- package/dist/bundle/store-LODVDPK3.js +141 -0
- package/dist/bundle/store-WB5BICTG.js +124 -0
- package/dist/bundle/store-connection-EG6Z5ITP.js +76 -0
- package/dist/bundle/store-maintenance-command-Q5WMFUZ2.js +54 -0
- package/dist/bundle/streaming-UGFFNOXL.js +15 -0
- package/dist/bundle/tokens-AF5CPY2F.js +17 -0
- package/dist/bundle/zm.js +8 -0
- package/dist/commands.js +2 -2
- package/dist/commands.js.map +1 -1
- package/dist/config-issues.d.ts.map +1 -1
- package/dist/config-issues.js +3 -0
- package/dist/config-issues.js.map +1 -1
- package/dist/config.d.ts +3 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +23 -0
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +34 -45
- package/dist/contract-overrides.js.map +1 -1
- package/dist/first-screen.js +1 -1
- package/dist/first-screen.js.map +1 -1
- package/dist/mcp-command.d.ts +5 -3
- package/dist/mcp-command.d.ts.map +1 -1
- package/dist/mcp-command.js +73 -15
- package/dist/mcp-command.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +1 -0
- package/dist/program-bindings.js.map +1 -1
- package/dist/recording-archive.d.ts.map +1 -1
- package/dist/recording-archive.js +9 -4
- package/dist/recording-archive.js.map +1 -1
- package/dist/remote-http.d.ts +2 -0
- package/dist/remote-http.d.ts.map +1 -1
- package/dist/remote-http.js +21 -11
- package/dist/remote-http.js.map +1 -1
- package/dist/request-events.d.ts +12 -0
- package/dist/request-events.d.ts.map +1 -1
- package/dist/request-events.js +56 -4
- package/dist/request-events.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +4 -1
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -5
- package/skills/zoom-cli/SKILL.md +3 -1
|
@@ -0,0 +1,2315 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
CliError
|
|
5
|
+
} from "./chunk-AE4BOXH7.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
+
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/search/languages.js
|
|
11
|
+
var LANGUAGES = [
|
|
12
|
+
{ name: "russian", code: "ru", label: "Russian", script: "cyrillic", dictionary: "dictionary-ru" },
|
|
13
|
+
{ name: "english", code: "en", label: "English", script: "latin", dictionary: "dictionary-en" },
|
|
14
|
+
{ name: "spanish", code: "es", label: "Spanish", script: "latin", dictionary: "dictionary-es" }
|
|
15
|
+
];
|
|
16
|
+
var languagesOf = /* @__PURE__ */ __name((script) => LANGUAGES.filter((one) => one.script === script).map(({ name }) => name), "languagesOf");
|
|
17
|
+
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/store/normalize.js
|
|
19
|
+
var NORMALIZER_VERSION = 1;
|
|
20
|
+
var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
|
|
21
|
+
var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
|
|
22
|
+
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
|
|
24
|
+
var BaseStemmer = class {
|
|
25
|
+
static {
|
|
26
|
+
__name(this, "BaseStemmer");
|
|
27
|
+
}
|
|
28
|
+
constructor() {
|
|
29
|
+
this.current = "";
|
|
30
|
+
this.c = 0;
|
|
31
|
+
this.limit = 0;
|
|
32
|
+
this.limit_backward = 0;
|
|
33
|
+
this.bra = 0;
|
|
34
|
+
this.ket = 0;
|
|
35
|
+
this.af = 0;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @param {string} value
|
|
39
|
+
*/
|
|
40
|
+
setCurrent(value) {
|
|
41
|
+
this.current = value;
|
|
42
|
+
this.c = 0;
|
|
43
|
+
this.limit = this.current.length;
|
|
44
|
+
this.limit_backward = 0;
|
|
45
|
+
this.bra = this.c;
|
|
46
|
+
this.ket = this.limit;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @return {string}
|
|
50
|
+
*/
|
|
51
|
+
getCurrent() {
|
|
52
|
+
return this.current;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {BaseStemmer} other
|
|
56
|
+
*/
|
|
57
|
+
copy_from(other) {
|
|
58
|
+
this.current = other.current;
|
|
59
|
+
this.c = other.c;
|
|
60
|
+
this.limit = other.limit;
|
|
61
|
+
this.limit_backward = other.limit_backward;
|
|
62
|
+
this.bra = other.bra;
|
|
63
|
+
this.ket = other.ket;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @param {Array<number>} s
|
|
67
|
+
* @param {number} min
|
|
68
|
+
* @param {number} max
|
|
69
|
+
* @return {boolean}
|
|
70
|
+
*/
|
|
71
|
+
in_grouping(s, min, max) {
|
|
72
|
+
if (this.c >= this.limit) return false;
|
|
73
|
+
let ch = this.current.charCodeAt(this.c);
|
|
74
|
+
if (ch > max || ch < min) return false;
|
|
75
|
+
ch -= min;
|
|
76
|
+
if ((s[ch >>> 3] & 1 << (ch & 7)) === 0) return false;
|
|
77
|
+
this.c++;
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @param {Array<number>} s
|
|
82
|
+
* @param {number} min
|
|
83
|
+
* @param {number} max
|
|
84
|
+
* @return {boolean}
|
|
85
|
+
*/
|
|
86
|
+
go_in_grouping(s, min, max) {
|
|
87
|
+
while (this.c < this.limit) {
|
|
88
|
+
let ch = this.current.charCodeAt(this.c);
|
|
89
|
+
if (ch > max || ch < min)
|
|
90
|
+
return true;
|
|
91
|
+
ch -= min;
|
|
92
|
+
if ((s[ch >>> 3] & 1 << (ch & 7)) === 0)
|
|
93
|
+
return true;
|
|
94
|
+
this.c++;
|
|
95
|
+
}
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @param {Array<number>} s
|
|
100
|
+
* @param {number} min
|
|
101
|
+
* @param {number} max
|
|
102
|
+
* @return {boolean}
|
|
103
|
+
*/
|
|
104
|
+
in_grouping_b(s, min, max) {
|
|
105
|
+
if (this.c <= this.limit_backward) return false;
|
|
106
|
+
let ch = this.current.charCodeAt(this.c - 1);
|
|
107
|
+
if (ch > max || ch < min) return false;
|
|
108
|
+
ch -= min;
|
|
109
|
+
if ((s[ch >>> 3] & 1 << (ch & 7)) === 0) return false;
|
|
110
|
+
this.c--;
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* @param {Array<number>} s
|
|
115
|
+
* @param {number} min
|
|
116
|
+
* @param {number} max
|
|
117
|
+
* @return {boolean}
|
|
118
|
+
*/
|
|
119
|
+
go_in_grouping_b(s, min, max) {
|
|
120
|
+
while (this.c > this.limit_backward) {
|
|
121
|
+
let ch = this.current.charCodeAt(this.c - 1);
|
|
122
|
+
if (ch > max || ch < min) return true;
|
|
123
|
+
ch -= min;
|
|
124
|
+
if ((s[ch >>> 3] & 1 << (ch & 7)) === 0) return true;
|
|
125
|
+
this.c--;
|
|
126
|
+
}
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @param {Array<number>} s
|
|
131
|
+
* @param {number} min
|
|
132
|
+
* @param {number} max
|
|
133
|
+
* @return {boolean}
|
|
134
|
+
*/
|
|
135
|
+
out_grouping(s, min, max) {
|
|
136
|
+
if (this.c >= this.limit) return false;
|
|
137
|
+
let ch = this.current.charCodeAt(this.c);
|
|
138
|
+
if (ch > max || ch < min) {
|
|
139
|
+
this.c++;
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
ch -= min;
|
|
143
|
+
if ((s[ch >>> 3] & 1 << (ch & 7)) === 0) {
|
|
144
|
+
this.c++;
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @param {Array<number>} s
|
|
151
|
+
* @param {number} min
|
|
152
|
+
* @param {number} max
|
|
153
|
+
* @return {boolean}
|
|
154
|
+
*/
|
|
155
|
+
go_out_grouping(s, min, max) {
|
|
156
|
+
while (this.c < this.limit) {
|
|
157
|
+
let ch = this.current.charCodeAt(this.c);
|
|
158
|
+
if (ch <= max && ch >= min) {
|
|
159
|
+
ch -= min;
|
|
160
|
+
if ((s[ch >>> 3] & 1 << (ch & 7)) !== 0) {
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
this.c++;
|
|
165
|
+
}
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* @param {Array<number>} s
|
|
170
|
+
* @param {number} min
|
|
171
|
+
* @param {number} max
|
|
172
|
+
* @return {boolean}
|
|
173
|
+
*/
|
|
174
|
+
out_grouping_b(s, min, max) {
|
|
175
|
+
if (this.c <= this.limit_backward) return false;
|
|
176
|
+
let ch = this.current.charCodeAt(this.c - 1);
|
|
177
|
+
if (ch > max || ch < min) {
|
|
178
|
+
this.c--;
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
ch -= min;
|
|
182
|
+
if ((s[ch >>> 3] & 1 << (ch & 7)) === 0) {
|
|
183
|
+
this.c--;
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
return false;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* @param {Array<number>} s
|
|
190
|
+
* @param {number} min
|
|
191
|
+
* @param {number} max
|
|
192
|
+
* @return {boolean}
|
|
193
|
+
*/
|
|
194
|
+
go_out_grouping_b(s, min, max) {
|
|
195
|
+
while (this.c > this.limit_backward) {
|
|
196
|
+
let ch = this.current.charCodeAt(this.c - 1);
|
|
197
|
+
if (ch <= max && ch >= min) {
|
|
198
|
+
ch -= min;
|
|
199
|
+
if ((s[ch >>> 3] & 1 << (ch & 7)) !== 0) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
this.c--;
|
|
204
|
+
}
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* @param {string} s
|
|
209
|
+
* @return {boolean}
|
|
210
|
+
*/
|
|
211
|
+
eq_s(s) {
|
|
212
|
+
if (this.limit - this.c < s.length) return false;
|
|
213
|
+
if (!this.current.startsWith(s, this.c)) return false;
|
|
214
|
+
this.c += s.length;
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* @param {string} s
|
|
219
|
+
* @return {boolean}
|
|
220
|
+
*/
|
|
221
|
+
eq_s_b(s) {
|
|
222
|
+
if (this.c - this.limit_backward < s.length) return false;
|
|
223
|
+
if (!this.current.endsWith(s, this.c)) return false;
|
|
224
|
+
this.c -= s.length;
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* @param {Array<Array<string|number>>} v
|
|
229
|
+
* @param {?function(): boolean} call_among_func
|
|
230
|
+
* @return {number}
|
|
231
|
+
*/
|
|
232
|
+
find_among(v, call_among_func) {
|
|
233
|
+
let i = 0;
|
|
234
|
+
let j = v.length;
|
|
235
|
+
const c = this.c;
|
|
236
|
+
const l = this.limit;
|
|
237
|
+
let common_i = 0;
|
|
238
|
+
let common_j = 0;
|
|
239
|
+
let first_key_inspected = false;
|
|
240
|
+
while (true) {
|
|
241
|
+
const k = i + (j - i >>> 1);
|
|
242
|
+
let diff = 0;
|
|
243
|
+
let common = common_i < common_j ? common_i : common_j;
|
|
244
|
+
const w = v[k];
|
|
245
|
+
let i2;
|
|
246
|
+
for (i2 = common; i2 < w[0].length; i2++) {
|
|
247
|
+
if (c + common === l) {
|
|
248
|
+
diff = -1;
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
diff = this.current.charCodeAt(c + common) - w[0].charCodeAt(i2);
|
|
252
|
+
if (diff !== 0) break;
|
|
253
|
+
common++;
|
|
254
|
+
}
|
|
255
|
+
if (diff < 0) {
|
|
256
|
+
j = k;
|
|
257
|
+
common_j = common;
|
|
258
|
+
} else {
|
|
259
|
+
i = k;
|
|
260
|
+
common_i = common;
|
|
261
|
+
}
|
|
262
|
+
if (j - i <= 1) {
|
|
263
|
+
if (i > 0) break;
|
|
264
|
+
if (j === i) break;
|
|
265
|
+
if (first_key_inspected) break;
|
|
266
|
+
first_key_inspected = true;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
while (true) {
|
|
270
|
+
const w = v[i];
|
|
271
|
+
if (common_i >= w[0].length) {
|
|
272
|
+
this.c = c + w[0].length;
|
|
273
|
+
if (w.length < 4) return w[1];
|
|
274
|
+
this.af = w[3];
|
|
275
|
+
if (call_among_func.call(this)) {
|
|
276
|
+
this.c = c + w[0].length;
|
|
277
|
+
return w[1];
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
if (!w[2]) return 0;
|
|
281
|
+
i -= w[2];
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
// find_among_b is for backwards processing. Same comments apply
|
|
285
|
+
/**
|
|
286
|
+
* @param {Array<Array<string|number>>} v
|
|
287
|
+
* @param {?function(): boolean} call_among_func
|
|
288
|
+
*/
|
|
289
|
+
find_among_b(v, call_among_func) {
|
|
290
|
+
let i = 0;
|
|
291
|
+
let j = v.length;
|
|
292
|
+
const c = this.c;
|
|
293
|
+
const lb = this.limit_backward;
|
|
294
|
+
let common_i = 0;
|
|
295
|
+
let common_j = 0;
|
|
296
|
+
let first_key_inspected = false;
|
|
297
|
+
while (true) {
|
|
298
|
+
const k = i + (j - i >> 1);
|
|
299
|
+
let diff = 0;
|
|
300
|
+
let common = common_i < common_j ? common_i : common_j;
|
|
301
|
+
const w = v[k];
|
|
302
|
+
let i2;
|
|
303
|
+
for (i2 = w[0].length - 1 - common; i2 >= 0; i2--) {
|
|
304
|
+
if (c - common === lb) {
|
|
305
|
+
diff = -1;
|
|
306
|
+
break;
|
|
307
|
+
}
|
|
308
|
+
diff = this.current.charCodeAt(c - 1 - common) - w[0].charCodeAt(i2);
|
|
309
|
+
if (diff !== 0) break;
|
|
310
|
+
common++;
|
|
311
|
+
}
|
|
312
|
+
if (diff < 0) {
|
|
313
|
+
j = k;
|
|
314
|
+
common_j = common;
|
|
315
|
+
} else {
|
|
316
|
+
i = k;
|
|
317
|
+
common_i = common;
|
|
318
|
+
}
|
|
319
|
+
if (j - i <= 1) {
|
|
320
|
+
if (i > 0) break;
|
|
321
|
+
if (j === i) break;
|
|
322
|
+
if (first_key_inspected) break;
|
|
323
|
+
first_key_inspected = true;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
while (true) {
|
|
327
|
+
const w = v[i];
|
|
328
|
+
if (common_i >= w[0].length) {
|
|
329
|
+
this.c = c - w[0].length;
|
|
330
|
+
if (w.length < 4) return w[1];
|
|
331
|
+
this.af = w[3];
|
|
332
|
+
if (call_among_func.call(this)) {
|
|
333
|
+
this.c = c - w[0].length;
|
|
334
|
+
return w[1];
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (!w[2]) return 0;
|
|
338
|
+
i -= w[2];
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/* to replace chars between c_bra and c_ket in this.current by the
|
|
342
|
+
* chars in s.
|
|
343
|
+
*/
|
|
344
|
+
/**
|
|
345
|
+
* @param {number} c_bra
|
|
346
|
+
* @param {number} c_ket
|
|
347
|
+
* @param {string} s
|
|
348
|
+
* @return {number}
|
|
349
|
+
*/
|
|
350
|
+
#replace_s(c_bra, c_ket, s) {
|
|
351
|
+
const adjustment = s.length - (c_ket - c_bra);
|
|
352
|
+
this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket);
|
|
353
|
+
this.limit += adjustment;
|
|
354
|
+
if (this.c >= c_ket) this.c += adjustment;
|
|
355
|
+
else if (this.c > c_bra) this.c = c_bra;
|
|
356
|
+
return adjustment;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
*/
|
|
360
|
+
#slice_check() {
|
|
361
|
+
console.assert(this.bra >= 0);
|
|
362
|
+
console.assert(this.bra <= this.ket);
|
|
363
|
+
console.assert(this.ket <= this.limit);
|
|
364
|
+
console.assert(this.limit <= this.current.length);
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* @param {string} s
|
|
368
|
+
*/
|
|
369
|
+
slice_from(s) {
|
|
370
|
+
this.#slice_check();
|
|
371
|
+
this.#replace_s(this.bra, this.ket, s);
|
|
372
|
+
this.ket = this.bra + s.length;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
*/
|
|
376
|
+
slice_del() {
|
|
377
|
+
this.slice_from("");
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* @param {number} c_bra
|
|
381
|
+
* @param {number} c_ket
|
|
382
|
+
* @param {string} s
|
|
383
|
+
*/
|
|
384
|
+
insert(c_bra, c_ket, s) {
|
|
385
|
+
const adjustment = this.#replace_s(c_bra, c_ket, s);
|
|
386
|
+
if (c_bra <= this.bra) this.bra += adjustment;
|
|
387
|
+
if (c_bra <= this.ket) this.ket += adjustment;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* @return {string}
|
|
391
|
+
*/
|
|
392
|
+
slice_to() {
|
|
393
|
+
this.#slice_check();
|
|
394
|
+
return this.current.slice(this.bra, this.ket);
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
|
|
399
|
+
var a_0 = [
|
|
400
|
+
["arsen", -1],
|
|
401
|
+
["commun", -1],
|
|
402
|
+
["emerg", -1],
|
|
403
|
+
["gener", -1],
|
|
404
|
+
["inter", -1],
|
|
405
|
+
["later", -1],
|
|
406
|
+
["organ", -1],
|
|
407
|
+
["past", -1],
|
|
408
|
+
["univers", -1]
|
|
409
|
+
];
|
|
410
|
+
var a_1 = [
|
|
411
|
+
["'", 1],
|
|
412
|
+
["'s'", 1, 1],
|
|
413
|
+
["'s", 1]
|
|
414
|
+
];
|
|
415
|
+
var a_2 = [
|
|
416
|
+
["ied", 2],
|
|
417
|
+
["s", 3],
|
|
418
|
+
["ies", 2, 1],
|
|
419
|
+
["sses", 1, 2],
|
|
420
|
+
["ss", -1, 3],
|
|
421
|
+
["us", -1, 4]
|
|
422
|
+
];
|
|
423
|
+
var a_3 = [
|
|
424
|
+
["succ", 1],
|
|
425
|
+
["proc", 1],
|
|
426
|
+
["exc", 1]
|
|
427
|
+
];
|
|
428
|
+
var a_4 = [
|
|
429
|
+
["even", 2],
|
|
430
|
+
["cann", 2],
|
|
431
|
+
["inn", 2],
|
|
432
|
+
["earr", 2],
|
|
433
|
+
["herr", 2],
|
|
434
|
+
["out", 2],
|
|
435
|
+
["y", 1]
|
|
436
|
+
];
|
|
437
|
+
var a_5 = [
|
|
438
|
+
["", -1],
|
|
439
|
+
["ed", 2, 1],
|
|
440
|
+
["eed", 1, 1],
|
|
441
|
+
["ing", 3, 3],
|
|
442
|
+
["edly", 2, 4],
|
|
443
|
+
["eedly", 1, 1],
|
|
444
|
+
["ingly", 2, 6]
|
|
445
|
+
];
|
|
446
|
+
var a_6 = [
|
|
447
|
+
["", 3],
|
|
448
|
+
["bb", 2, 1],
|
|
449
|
+
["dd", 2, 2],
|
|
450
|
+
["ff", 2, 3],
|
|
451
|
+
["gg", 2, 4],
|
|
452
|
+
["bl", 1, 5],
|
|
453
|
+
["mm", 2, 6],
|
|
454
|
+
["nn", 2, 7],
|
|
455
|
+
["pp", 2, 8],
|
|
456
|
+
["rr", 2, 9],
|
|
457
|
+
["at", 1, 10],
|
|
458
|
+
["tt", 2, 11],
|
|
459
|
+
["iz", 1, 12]
|
|
460
|
+
];
|
|
461
|
+
var a_7 = [
|
|
462
|
+
["anci", 3],
|
|
463
|
+
["enci", 2],
|
|
464
|
+
["ogi", 14],
|
|
465
|
+
["li", 16],
|
|
466
|
+
["bli", 12, 1],
|
|
467
|
+
["abli", 4, 1],
|
|
468
|
+
["alli", 8, 3],
|
|
469
|
+
["fulli", 9, 4],
|
|
470
|
+
["lessli", 15, 5],
|
|
471
|
+
["ousli", 10, 6],
|
|
472
|
+
["entli", 5, 7],
|
|
473
|
+
["aliti", 8],
|
|
474
|
+
["biliti", 12],
|
|
475
|
+
["iviti", 11],
|
|
476
|
+
["tional", 1],
|
|
477
|
+
["ational", 7, 1],
|
|
478
|
+
["alism", 8],
|
|
479
|
+
["ation", 7],
|
|
480
|
+
["ization", 6, 1],
|
|
481
|
+
["izer", 6],
|
|
482
|
+
["ator", 7],
|
|
483
|
+
["iveness", 11],
|
|
484
|
+
["fulness", 9],
|
|
485
|
+
["ousness", 10],
|
|
486
|
+
["ogist", 13]
|
|
487
|
+
];
|
|
488
|
+
var a_8 = [
|
|
489
|
+
["icate", 4],
|
|
490
|
+
["ative", 6],
|
|
491
|
+
["alize", 3],
|
|
492
|
+
["iciti", 4],
|
|
493
|
+
["ical", 4],
|
|
494
|
+
["tional", 1],
|
|
495
|
+
["ational", 2, 1],
|
|
496
|
+
["ful", 5],
|
|
497
|
+
["ness", 5]
|
|
498
|
+
];
|
|
499
|
+
var a_9 = [
|
|
500
|
+
["ic", 1],
|
|
501
|
+
["ance", 1],
|
|
502
|
+
["ence", 1],
|
|
503
|
+
["able", 1],
|
|
504
|
+
["ible", 1],
|
|
505
|
+
["ate", 1],
|
|
506
|
+
["ive", 1],
|
|
507
|
+
["ize", 1],
|
|
508
|
+
["iti", 1],
|
|
509
|
+
["al", 1],
|
|
510
|
+
["ism", 1],
|
|
511
|
+
["ion", 2],
|
|
512
|
+
["er", 1],
|
|
513
|
+
["ous", 1],
|
|
514
|
+
["ant", 1],
|
|
515
|
+
["ent", 1],
|
|
516
|
+
["ment", 1, 1],
|
|
517
|
+
["ement", 1, 1]
|
|
518
|
+
];
|
|
519
|
+
var a_10 = [
|
|
520
|
+
["e", 1],
|
|
521
|
+
["l", 2]
|
|
522
|
+
];
|
|
523
|
+
var a_11 = [
|
|
524
|
+
["andes", -1],
|
|
525
|
+
["atlas", -1],
|
|
526
|
+
["bias", -1],
|
|
527
|
+
["cosmos", -1],
|
|
528
|
+
["early", 6],
|
|
529
|
+
["gently", 4],
|
|
530
|
+
["howe", -1],
|
|
531
|
+
["idly", 3],
|
|
532
|
+
["news", -1],
|
|
533
|
+
["only", 7],
|
|
534
|
+
["singly", 8],
|
|
535
|
+
["skies", 2],
|
|
536
|
+
["skis", 1],
|
|
537
|
+
["sky", -1],
|
|
538
|
+
["ugly", 5]
|
|
539
|
+
];
|
|
540
|
+
var as_11 = ["ski", "sky", "idl", "gentl", "ugli", "earli", "onli", "singl"];
|
|
541
|
+
var g_aeo = [17, 64];
|
|
542
|
+
var g_v = [17, 65, 16, 1];
|
|
543
|
+
var g_v_WXY = [1, 17, 65, 208, 1];
|
|
544
|
+
var g_valid_LI = [55, 141, 2];
|
|
545
|
+
var english_stemmer_default = class extends BaseStemmer {
|
|
546
|
+
static {
|
|
547
|
+
__name(this, "default");
|
|
548
|
+
}
|
|
549
|
+
#B_Y_found = false;
|
|
550
|
+
#I_p2 = 0;
|
|
551
|
+
#I_p1 = 0;
|
|
552
|
+
/** @return {boolean} */
|
|
553
|
+
#r_prelude() {
|
|
554
|
+
this.#B_Y_found = false;
|
|
555
|
+
const v_1 = this.c;
|
|
556
|
+
lab0: {
|
|
557
|
+
this.bra = this.c;
|
|
558
|
+
if (!this.eq_s("'")) break lab0;
|
|
559
|
+
this.ket = this.c;
|
|
560
|
+
this.slice_del();
|
|
561
|
+
}
|
|
562
|
+
this.c = v_1;
|
|
563
|
+
const v_2 = this.c;
|
|
564
|
+
lab1: {
|
|
565
|
+
this.bra = this.c;
|
|
566
|
+
if (!this.eq_s("y")) break lab1;
|
|
567
|
+
this.ket = this.c;
|
|
568
|
+
this.slice_from("Y");
|
|
569
|
+
this.#B_Y_found = true;
|
|
570
|
+
}
|
|
571
|
+
this.c = v_2;
|
|
572
|
+
const v_3 = this.c;
|
|
573
|
+
lab2: {
|
|
574
|
+
while (true) {
|
|
575
|
+
const v_4 = this.c;
|
|
576
|
+
lab3: {
|
|
577
|
+
golab4: while (true) {
|
|
578
|
+
const v_5 = this.c;
|
|
579
|
+
lab5: {
|
|
580
|
+
if (!this.in_grouping(g_v, 97, 121)) break lab5;
|
|
581
|
+
this.bra = this.c;
|
|
582
|
+
if (!this.eq_s("y")) break lab5;
|
|
583
|
+
this.ket = this.c;
|
|
584
|
+
this.c = v_5;
|
|
585
|
+
break golab4;
|
|
586
|
+
}
|
|
587
|
+
this.c = v_5;
|
|
588
|
+
if (this.c >= this.limit) break lab3;
|
|
589
|
+
this.c++;
|
|
590
|
+
}
|
|
591
|
+
this.slice_from("Y");
|
|
592
|
+
this.#B_Y_found = true;
|
|
593
|
+
continue;
|
|
594
|
+
}
|
|
595
|
+
this.c = v_4;
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
this.c = v_3;
|
|
600
|
+
return true;
|
|
601
|
+
}
|
|
602
|
+
/** @return {boolean} */
|
|
603
|
+
#r_mark_regions() {
|
|
604
|
+
this.#I_p1 = this.limit;
|
|
605
|
+
this.#I_p2 = this.limit;
|
|
606
|
+
const v_1 = this.c;
|
|
607
|
+
lab0: {
|
|
608
|
+
lab1: {
|
|
609
|
+
const v_2 = this.c;
|
|
610
|
+
lab2: {
|
|
611
|
+
if (this.find_among(a_0) === 0) break lab2;
|
|
612
|
+
break lab1;
|
|
613
|
+
}
|
|
614
|
+
this.c = v_2;
|
|
615
|
+
if (!this.go_out_grouping(g_v, 97, 121)) break lab0;
|
|
616
|
+
this.c++;
|
|
617
|
+
if (!this.go_in_grouping(g_v, 97, 121)) break lab0;
|
|
618
|
+
this.c++;
|
|
619
|
+
}
|
|
620
|
+
this.#I_p1 = this.c;
|
|
621
|
+
if (!this.go_out_grouping(g_v, 97, 121)) break lab0;
|
|
622
|
+
this.c++;
|
|
623
|
+
if (!this.go_in_grouping(g_v, 97, 121)) break lab0;
|
|
624
|
+
this.c++;
|
|
625
|
+
this.#I_p2 = this.c;
|
|
626
|
+
}
|
|
627
|
+
this.c = v_1;
|
|
628
|
+
return true;
|
|
629
|
+
}
|
|
630
|
+
/** @return {boolean} */
|
|
631
|
+
#r_shortv() {
|
|
632
|
+
lab0: {
|
|
633
|
+
const v_1 = this.limit - this.c;
|
|
634
|
+
lab1: {
|
|
635
|
+
if (!this.out_grouping_b(g_v_WXY, 89, 121)) break lab1;
|
|
636
|
+
if (!this.in_grouping_b(g_v, 97, 121)) break lab1;
|
|
637
|
+
if (!this.out_grouping_b(g_v, 97, 121)) break lab1;
|
|
638
|
+
break lab0;
|
|
639
|
+
}
|
|
640
|
+
this.c = this.limit - v_1;
|
|
641
|
+
lab2: {
|
|
642
|
+
if (!this.out_grouping_b(g_v, 97, 121)) break lab2;
|
|
643
|
+
if (!this.in_grouping_b(g_v, 97, 121)) break lab2;
|
|
644
|
+
if (this.c > this.limit_backward) break lab2;
|
|
645
|
+
break lab0;
|
|
646
|
+
}
|
|
647
|
+
this.c = this.limit - v_1;
|
|
648
|
+
if (!this.eq_s_b("past")) return false;
|
|
649
|
+
}
|
|
650
|
+
return true;
|
|
651
|
+
}
|
|
652
|
+
/** @return {boolean} */
|
|
653
|
+
#r_R1() {
|
|
654
|
+
return this.#I_p1 <= this.c;
|
|
655
|
+
}
|
|
656
|
+
/** @return {boolean} */
|
|
657
|
+
#r_R2() {
|
|
658
|
+
return this.#I_p2 <= this.c;
|
|
659
|
+
}
|
|
660
|
+
/** @return {boolean} */
|
|
661
|
+
#r_Step_1a() {
|
|
662
|
+
let a;
|
|
663
|
+
const v_1 = this.limit - this.c;
|
|
664
|
+
lab0: {
|
|
665
|
+
this.ket = this.c;
|
|
666
|
+
if (this.find_among_b(a_1) === 0) {
|
|
667
|
+
this.c = this.limit - v_1;
|
|
668
|
+
break lab0;
|
|
669
|
+
}
|
|
670
|
+
this.bra = this.c;
|
|
671
|
+
this.slice_del();
|
|
672
|
+
}
|
|
673
|
+
this.ket = this.c;
|
|
674
|
+
a = this.find_among_b(a_2);
|
|
675
|
+
if (a === 0) return false;
|
|
676
|
+
this.bra = this.c;
|
|
677
|
+
switch (a) {
|
|
678
|
+
case 1: {
|
|
679
|
+
this.slice_from("ss");
|
|
680
|
+
break;
|
|
681
|
+
}
|
|
682
|
+
case 2: {
|
|
683
|
+
lab1: {
|
|
684
|
+
const v_2 = this.limit - this.c;
|
|
685
|
+
lab2: {
|
|
686
|
+
if (this.c - 2 < this.limit_backward) break lab2;
|
|
687
|
+
this.c -= 2;
|
|
688
|
+
this.slice_from("i");
|
|
689
|
+
break lab1;
|
|
690
|
+
}
|
|
691
|
+
this.c = this.limit - v_2;
|
|
692
|
+
this.slice_from("ie");
|
|
693
|
+
}
|
|
694
|
+
break;
|
|
695
|
+
}
|
|
696
|
+
case 3: {
|
|
697
|
+
if (this.c <= this.limit_backward) return false;
|
|
698
|
+
this.c--;
|
|
699
|
+
if (!this.go_out_grouping_b(g_v, 97, 121)) return false;
|
|
700
|
+
this.c--;
|
|
701
|
+
this.slice_del();
|
|
702
|
+
break;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
return true;
|
|
706
|
+
}
|
|
707
|
+
/** @return {boolean} */
|
|
708
|
+
#r_Step_1b() {
|
|
709
|
+
let a;
|
|
710
|
+
this.ket = this.c;
|
|
711
|
+
a = this.find_among_b(a_5);
|
|
712
|
+
this.bra = this.c;
|
|
713
|
+
lab0: {
|
|
714
|
+
const v_1 = this.limit - this.c;
|
|
715
|
+
lab1: {
|
|
716
|
+
switch (a) {
|
|
717
|
+
case 1: {
|
|
718
|
+
const v_2 = this.limit - this.c;
|
|
719
|
+
lab2: {
|
|
720
|
+
if (!this.#r_R1()) break lab2;
|
|
721
|
+
lab3: {
|
|
722
|
+
const v_3 = this.limit - this.c;
|
|
723
|
+
lab4: {
|
|
724
|
+
if (this.find_among_b(a_3) === 0) break lab4;
|
|
725
|
+
if (this.c > this.limit_backward) break lab4;
|
|
726
|
+
break lab3;
|
|
727
|
+
}
|
|
728
|
+
this.c = this.limit - v_3;
|
|
729
|
+
this.slice_from("ee");
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
this.c = this.limit - v_2;
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
case 2: {
|
|
736
|
+
break lab1;
|
|
737
|
+
}
|
|
738
|
+
case 3: {
|
|
739
|
+
a = this.find_among_b(a_4);
|
|
740
|
+
if (a === 0) break lab1;
|
|
741
|
+
switch (a) {
|
|
742
|
+
case 1: {
|
|
743
|
+
const v_4 = this.limit - this.c;
|
|
744
|
+
if (!this.out_grouping_b(g_v, 97, 121)) break lab1;
|
|
745
|
+
if (this.c > this.limit_backward) break lab1;
|
|
746
|
+
this.c = this.limit - v_4;
|
|
747
|
+
this.bra = this.c;
|
|
748
|
+
this.slice_from("ie");
|
|
749
|
+
break;
|
|
750
|
+
}
|
|
751
|
+
case 2: {
|
|
752
|
+
if (this.c > this.limit_backward) break lab1;
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
break;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
break lab0;
|
|
760
|
+
}
|
|
761
|
+
this.c = this.limit - v_1;
|
|
762
|
+
const v_5 = this.limit - this.c;
|
|
763
|
+
if (!this.go_out_grouping_b(g_v, 97, 121)) return false;
|
|
764
|
+
this.c--;
|
|
765
|
+
this.c = this.limit - v_5;
|
|
766
|
+
this.slice_del();
|
|
767
|
+
this.ket = this.c;
|
|
768
|
+
this.bra = this.c;
|
|
769
|
+
const v_6 = this.limit - this.c;
|
|
770
|
+
a = this.find_among_b(a_6);
|
|
771
|
+
switch (a) {
|
|
772
|
+
case 1: {
|
|
773
|
+
this.slice_from("e");
|
|
774
|
+
return false;
|
|
775
|
+
}
|
|
776
|
+
case 2: {
|
|
777
|
+
{
|
|
778
|
+
const v_7 = this.limit - this.c;
|
|
779
|
+
lab5: {
|
|
780
|
+
if (!this.in_grouping_b(g_aeo, 97, 111)) break lab5;
|
|
781
|
+
if (this.c > this.limit_backward) break lab5;
|
|
782
|
+
return false;
|
|
783
|
+
}
|
|
784
|
+
this.c = this.limit - v_7;
|
|
785
|
+
}
|
|
786
|
+
break;
|
|
787
|
+
}
|
|
788
|
+
case 3: {
|
|
789
|
+
if (this.c !== this.#I_p1) return false;
|
|
790
|
+
const v_8 = this.limit - this.c;
|
|
791
|
+
if (!this.#r_shortv()) return false;
|
|
792
|
+
this.c = this.limit - v_8;
|
|
793
|
+
this.slice_from("e");
|
|
794
|
+
return false;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
this.c = this.limit - v_6;
|
|
798
|
+
this.ket = this.c;
|
|
799
|
+
if (this.c <= this.limit_backward) return false;
|
|
800
|
+
this.c--;
|
|
801
|
+
this.bra = this.c;
|
|
802
|
+
this.slice_del();
|
|
803
|
+
}
|
|
804
|
+
return true;
|
|
805
|
+
}
|
|
806
|
+
/** @return {boolean} */
|
|
807
|
+
#r_Step_1c() {
|
|
808
|
+
this.ket = this.c;
|
|
809
|
+
lab0: {
|
|
810
|
+
lab1: {
|
|
811
|
+
if (!this.eq_s_b("y")) break lab1;
|
|
812
|
+
break lab0;
|
|
813
|
+
}
|
|
814
|
+
if (!this.eq_s_b("Y")) return false;
|
|
815
|
+
}
|
|
816
|
+
this.bra = this.c;
|
|
817
|
+
if (!this.out_grouping_b(g_v, 97, 121)) return false;
|
|
818
|
+
if (this.c <= this.limit_backward) return false;
|
|
819
|
+
this.slice_from("i");
|
|
820
|
+
return true;
|
|
821
|
+
}
|
|
822
|
+
/** @return {boolean} */
|
|
823
|
+
#r_Step_2() {
|
|
824
|
+
let a;
|
|
825
|
+
this.ket = this.c;
|
|
826
|
+
a = this.find_among_b(a_7);
|
|
827
|
+
if (a === 0) return false;
|
|
828
|
+
this.bra = this.c;
|
|
829
|
+
if (!this.#r_R1()) return false;
|
|
830
|
+
switch (a) {
|
|
831
|
+
case 1: {
|
|
832
|
+
this.slice_from("tion");
|
|
833
|
+
break;
|
|
834
|
+
}
|
|
835
|
+
case 2: {
|
|
836
|
+
this.slice_from("ence");
|
|
837
|
+
break;
|
|
838
|
+
}
|
|
839
|
+
case 3: {
|
|
840
|
+
this.slice_from("ance");
|
|
841
|
+
break;
|
|
842
|
+
}
|
|
843
|
+
case 4: {
|
|
844
|
+
this.slice_from("able");
|
|
845
|
+
break;
|
|
846
|
+
}
|
|
847
|
+
case 5: {
|
|
848
|
+
this.slice_from("ent");
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
851
|
+
case 6: {
|
|
852
|
+
this.slice_from("ize");
|
|
853
|
+
break;
|
|
854
|
+
}
|
|
855
|
+
case 7: {
|
|
856
|
+
this.slice_from("ate");
|
|
857
|
+
break;
|
|
858
|
+
}
|
|
859
|
+
case 8: {
|
|
860
|
+
this.slice_from("al");
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
case 9: {
|
|
864
|
+
this.slice_from("ful");
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
case 10: {
|
|
868
|
+
this.slice_from("ous");
|
|
869
|
+
break;
|
|
870
|
+
}
|
|
871
|
+
case 11: {
|
|
872
|
+
this.slice_from("ive");
|
|
873
|
+
break;
|
|
874
|
+
}
|
|
875
|
+
case 12: {
|
|
876
|
+
this.slice_from("ble");
|
|
877
|
+
break;
|
|
878
|
+
}
|
|
879
|
+
case 13: {
|
|
880
|
+
this.slice_from("og");
|
|
881
|
+
break;
|
|
882
|
+
}
|
|
883
|
+
case 14: {
|
|
884
|
+
if (!this.eq_s_b("l")) return false;
|
|
885
|
+
this.slice_from("og");
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
888
|
+
case 15: {
|
|
889
|
+
this.slice_from("less");
|
|
890
|
+
break;
|
|
891
|
+
}
|
|
892
|
+
case 16: {
|
|
893
|
+
if (!this.in_grouping_b(g_valid_LI, 99, 116)) return false;
|
|
894
|
+
this.slice_del();
|
|
895
|
+
break;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
return true;
|
|
899
|
+
}
|
|
900
|
+
/** @return {boolean} */
|
|
901
|
+
#r_Step_3() {
|
|
902
|
+
let a;
|
|
903
|
+
this.ket = this.c;
|
|
904
|
+
a = this.find_among_b(a_8);
|
|
905
|
+
if (a === 0) return false;
|
|
906
|
+
this.bra = this.c;
|
|
907
|
+
if (!this.#r_R1()) return false;
|
|
908
|
+
switch (a) {
|
|
909
|
+
case 1: {
|
|
910
|
+
this.slice_from("tion");
|
|
911
|
+
break;
|
|
912
|
+
}
|
|
913
|
+
case 2: {
|
|
914
|
+
this.slice_from("ate");
|
|
915
|
+
break;
|
|
916
|
+
}
|
|
917
|
+
case 3: {
|
|
918
|
+
this.slice_from("al");
|
|
919
|
+
break;
|
|
920
|
+
}
|
|
921
|
+
case 4: {
|
|
922
|
+
this.slice_from("ic");
|
|
923
|
+
break;
|
|
924
|
+
}
|
|
925
|
+
case 5: {
|
|
926
|
+
this.slice_del();
|
|
927
|
+
break;
|
|
928
|
+
}
|
|
929
|
+
case 6: {
|
|
930
|
+
if (!this.#r_R2()) return false;
|
|
931
|
+
this.slice_del();
|
|
932
|
+
break;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
return true;
|
|
936
|
+
}
|
|
937
|
+
/** @return {boolean} */
|
|
938
|
+
#r_Step_4() {
|
|
939
|
+
let a;
|
|
940
|
+
this.ket = this.c;
|
|
941
|
+
a = this.find_among_b(a_9);
|
|
942
|
+
if (a === 0) return false;
|
|
943
|
+
this.bra = this.c;
|
|
944
|
+
if (!this.#r_R2()) return false;
|
|
945
|
+
switch (a) {
|
|
946
|
+
case 1: {
|
|
947
|
+
this.slice_del();
|
|
948
|
+
break;
|
|
949
|
+
}
|
|
950
|
+
case 2: {
|
|
951
|
+
lab0: {
|
|
952
|
+
lab1: {
|
|
953
|
+
if (!this.eq_s_b("s")) break lab1;
|
|
954
|
+
break lab0;
|
|
955
|
+
}
|
|
956
|
+
if (!this.eq_s_b("t")) return false;
|
|
957
|
+
}
|
|
958
|
+
this.slice_del();
|
|
959
|
+
break;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
return true;
|
|
963
|
+
}
|
|
964
|
+
/** @return {boolean} */
|
|
965
|
+
#r_Step_5() {
|
|
966
|
+
let a;
|
|
967
|
+
this.ket = this.c;
|
|
968
|
+
a = this.find_among_b(a_10);
|
|
969
|
+
if (a === 0) return false;
|
|
970
|
+
this.bra = this.c;
|
|
971
|
+
switch (a) {
|
|
972
|
+
case 1: {
|
|
973
|
+
lab0: {
|
|
974
|
+
lab1: {
|
|
975
|
+
if (!this.#r_R2()) break lab1;
|
|
976
|
+
break lab0;
|
|
977
|
+
}
|
|
978
|
+
if (!this.#r_R1()) return false;
|
|
979
|
+
{
|
|
980
|
+
const v_1 = this.limit - this.c;
|
|
981
|
+
lab2: {
|
|
982
|
+
if (!this.#r_shortv()) break lab2;
|
|
983
|
+
return false;
|
|
984
|
+
}
|
|
985
|
+
this.c = this.limit - v_1;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
this.slice_del();
|
|
989
|
+
break;
|
|
990
|
+
}
|
|
991
|
+
case 2: {
|
|
992
|
+
if (!this.#r_R2()) return false;
|
|
993
|
+
if (!this.eq_s_b("l")) return false;
|
|
994
|
+
this.slice_del();
|
|
995
|
+
break;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
return true;
|
|
999
|
+
}
|
|
1000
|
+
/** @return {boolean} */
|
|
1001
|
+
#r_exception1() {
|
|
1002
|
+
let a;
|
|
1003
|
+
this.bra = this.c;
|
|
1004
|
+
a = this.find_among(a_11);
|
|
1005
|
+
if (a === 0) return false;
|
|
1006
|
+
this.ket = this.c;
|
|
1007
|
+
if (this.c < this.limit) return false;
|
|
1008
|
+
if (a > 0) {
|
|
1009
|
+
this.slice_from(as_11[a - 1]);
|
|
1010
|
+
}
|
|
1011
|
+
return true;
|
|
1012
|
+
}
|
|
1013
|
+
/** @return {boolean} */
|
|
1014
|
+
#r_postlude() {
|
|
1015
|
+
if (!this.#B_Y_found) return false;
|
|
1016
|
+
while (true) {
|
|
1017
|
+
const v_1 = this.c;
|
|
1018
|
+
lab0: {
|
|
1019
|
+
golab1: while (true) {
|
|
1020
|
+
const v_2 = this.c;
|
|
1021
|
+
lab2: {
|
|
1022
|
+
this.bra = this.c;
|
|
1023
|
+
if (!this.eq_s("Y")) break lab2;
|
|
1024
|
+
this.ket = this.c;
|
|
1025
|
+
this.c = v_2;
|
|
1026
|
+
break golab1;
|
|
1027
|
+
}
|
|
1028
|
+
this.c = v_2;
|
|
1029
|
+
if (this.c >= this.limit) break lab0;
|
|
1030
|
+
this.c++;
|
|
1031
|
+
}
|
|
1032
|
+
this.slice_from("y");
|
|
1033
|
+
continue;
|
|
1034
|
+
}
|
|
1035
|
+
this.c = v_1;
|
|
1036
|
+
break;
|
|
1037
|
+
}
|
|
1038
|
+
return true;
|
|
1039
|
+
}
|
|
1040
|
+
/** @return {boolean} */
|
|
1041
|
+
#stem() {
|
|
1042
|
+
lab0: {
|
|
1043
|
+
const v_1 = this.c;
|
|
1044
|
+
lab1: {
|
|
1045
|
+
if (!this.#r_exception1()) break lab1;
|
|
1046
|
+
break lab0;
|
|
1047
|
+
}
|
|
1048
|
+
this.c = v_1;
|
|
1049
|
+
lab2: {
|
|
1050
|
+
lab3: {
|
|
1051
|
+
if (this.c + 3 > this.limit) break lab3;
|
|
1052
|
+
this.c += 3;
|
|
1053
|
+
break lab2;
|
|
1054
|
+
}
|
|
1055
|
+
break lab0;
|
|
1056
|
+
}
|
|
1057
|
+
this.c = v_1;
|
|
1058
|
+
this.#r_prelude();
|
|
1059
|
+
this.#r_mark_regions();
|
|
1060
|
+
this.limit_backward = this.c;
|
|
1061
|
+
this.c = this.limit;
|
|
1062
|
+
const v_2 = this.limit - this.c;
|
|
1063
|
+
this.#r_Step_1a();
|
|
1064
|
+
this.c = this.limit - v_2;
|
|
1065
|
+
const v_3 = this.limit - this.c;
|
|
1066
|
+
this.#r_Step_1b();
|
|
1067
|
+
this.c = this.limit - v_3;
|
|
1068
|
+
const v_4 = this.limit - this.c;
|
|
1069
|
+
this.#r_Step_1c();
|
|
1070
|
+
this.c = this.limit - v_4;
|
|
1071
|
+
const v_5 = this.limit - this.c;
|
|
1072
|
+
this.#r_Step_2();
|
|
1073
|
+
this.c = this.limit - v_5;
|
|
1074
|
+
const v_6 = this.limit - this.c;
|
|
1075
|
+
this.#r_Step_3();
|
|
1076
|
+
this.c = this.limit - v_6;
|
|
1077
|
+
const v_7 = this.limit - this.c;
|
|
1078
|
+
this.#r_Step_4();
|
|
1079
|
+
this.c = this.limit - v_7;
|
|
1080
|
+
const v_8 = this.limit - this.c;
|
|
1081
|
+
this.#r_Step_5();
|
|
1082
|
+
this.c = this.limit - v_8;
|
|
1083
|
+
this.c = this.limit_backward;
|
|
1084
|
+
const v_9 = this.c;
|
|
1085
|
+
this.#r_postlude();
|
|
1086
|
+
this.c = v_9;
|
|
1087
|
+
}
|
|
1088
|
+
return true;
|
|
1089
|
+
}
|
|
1090
|
+
/**@return{string}*/
|
|
1091
|
+
stem(input) {
|
|
1092
|
+
this.setCurrent(input);
|
|
1093
|
+
this.#stem();
|
|
1094
|
+
return this.getCurrent();
|
|
1095
|
+
}
|
|
1096
|
+
stemWord = this.stem;
|
|
1097
|
+
};
|
|
1098
|
+
|
|
1099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
|
|
1100
|
+
var a_02 = [
|
|
1101
|
+
["\u0432", 1],
|
|
1102
|
+
["\u0438\u0432", 2, 1],
|
|
1103
|
+
["\u044B\u0432", 2, 2],
|
|
1104
|
+
["\u0432\u0448\u0438", 1],
|
|
1105
|
+
["\u0438\u0432\u0448\u0438", 2, 1],
|
|
1106
|
+
["\u044B\u0432\u0448\u0438", 2, 2],
|
|
1107
|
+
["\u0432\u0448\u0438\u0441\u044C", 1],
|
|
1108
|
+
["\u0438\u0432\u0448\u0438\u0441\u044C", 2, 1],
|
|
1109
|
+
["\u044B\u0432\u0448\u0438\u0441\u044C", 2, 2]
|
|
1110
|
+
];
|
|
1111
|
+
var a_12 = [
|
|
1112
|
+
["\u0435\u0435", 1],
|
|
1113
|
+
["\u0438\u0435", 1],
|
|
1114
|
+
["\u043E\u0435", 1],
|
|
1115
|
+
["\u044B\u0435", 1],
|
|
1116
|
+
["\u0438\u043C\u0438", 1],
|
|
1117
|
+
["\u044B\u043C\u0438", 1],
|
|
1118
|
+
["\u0435\u0439", 1],
|
|
1119
|
+
["\u0438\u0439", 1],
|
|
1120
|
+
["\u043E\u0439", 1],
|
|
1121
|
+
["\u044B\u0439", 1],
|
|
1122
|
+
["\u0435\u043C", 1],
|
|
1123
|
+
["\u0438\u043C", 1],
|
|
1124
|
+
["\u043E\u043C", 1],
|
|
1125
|
+
["\u044B\u043C", 1],
|
|
1126
|
+
["\u0435\u0433\u043E", 1],
|
|
1127
|
+
["\u043E\u0433\u043E", 1],
|
|
1128
|
+
["\u0435\u043C\u0443", 1],
|
|
1129
|
+
["\u043E\u043C\u0443", 1],
|
|
1130
|
+
["\u0438\u0445", 1],
|
|
1131
|
+
["\u044B\u0445", 1],
|
|
1132
|
+
["\u0435\u044E", 1],
|
|
1133
|
+
["\u043E\u044E", 1],
|
|
1134
|
+
["\u0443\u044E", 1],
|
|
1135
|
+
["\u044E\u044E", 1],
|
|
1136
|
+
["\u0430\u044F", 1],
|
|
1137
|
+
["\u044F\u044F", 1]
|
|
1138
|
+
];
|
|
1139
|
+
var a_22 = [
|
|
1140
|
+
["\u0435\u043C", 1],
|
|
1141
|
+
["\u043D\u043D", 1],
|
|
1142
|
+
["\u0432\u0448", 1],
|
|
1143
|
+
["\u0438\u0432\u0448", 2, 1],
|
|
1144
|
+
["\u044B\u0432\u0448", 2, 2],
|
|
1145
|
+
["\u0449", 1],
|
|
1146
|
+
["\u044E\u0449", 1, 1],
|
|
1147
|
+
["\u0443\u044E\u0449", 2, 1]
|
|
1148
|
+
];
|
|
1149
|
+
var a_32 = [
|
|
1150
|
+
["\u0441\u044C", 1],
|
|
1151
|
+
["\u0441\u044F", 1]
|
|
1152
|
+
];
|
|
1153
|
+
var a_42 = [
|
|
1154
|
+
["\u043B\u0430", 1],
|
|
1155
|
+
["\u0438\u043B\u0430", 2, 1],
|
|
1156
|
+
["\u044B\u043B\u0430", 2, 2],
|
|
1157
|
+
["\u043D\u0430", 1],
|
|
1158
|
+
["\u0435\u043D\u0430", 2, 1],
|
|
1159
|
+
["\u0435\u0442\u0435", 1],
|
|
1160
|
+
["\u0438\u0442\u0435", 2],
|
|
1161
|
+
["\u0439\u0442\u0435", 1],
|
|
1162
|
+
["\u0435\u0439\u0442\u0435", 2, 1],
|
|
1163
|
+
["\u0443\u0439\u0442\u0435", 2, 2],
|
|
1164
|
+
["\u043B\u0438", 1],
|
|
1165
|
+
["\u0438\u043B\u0438", 2, 1],
|
|
1166
|
+
["\u044B\u043B\u0438", 2, 2],
|
|
1167
|
+
["\u0439", 1],
|
|
1168
|
+
["\u0435\u0439", 2, 1],
|
|
1169
|
+
["\u0443\u0439", 2, 2],
|
|
1170
|
+
["\u043B", 1],
|
|
1171
|
+
["\u0438\u043B", 2, 1],
|
|
1172
|
+
["\u044B\u043B", 2, 2],
|
|
1173
|
+
["\u0435\u043C", 1],
|
|
1174
|
+
["\u0438\u043C", 2],
|
|
1175
|
+
["\u044B\u043C", 2],
|
|
1176
|
+
["\u043D", 1],
|
|
1177
|
+
["\u0435\u043D", 2, 1],
|
|
1178
|
+
["\u043B\u043E", 1],
|
|
1179
|
+
["\u0438\u043B\u043E", 2, 1],
|
|
1180
|
+
["\u044B\u043B\u043E", 2, 2],
|
|
1181
|
+
["\u043D\u043E", 1],
|
|
1182
|
+
["\u0435\u043D\u043E", 2, 1],
|
|
1183
|
+
["\u043D\u043D\u043E", 1, 2],
|
|
1184
|
+
["\u0435\u0442", 1],
|
|
1185
|
+
["\u0443\u0435\u0442", 2, 1],
|
|
1186
|
+
["\u0438\u0442", 2],
|
|
1187
|
+
["\u044B\u0442", 2],
|
|
1188
|
+
["\u044E\u0442", 1],
|
|
1189
|
+
["\u0443\u044E\u0442", 2, 1],
|
|
1190
|
+
["\u044F\u0442", 2],
|
|
1191
|
+
["\u043D\u044B", 1],
|
|
1192
|
+
["\u0435\u043D\u044B", 2, 1],
|
|
1193
|
+
["\u0442\u044C", 1],
|
|
1194
|
+
["\u0438\u0442\u044C", 2, 1],
|
|
1195
|
+
["\u044B\u0442\u044C", 2, 2],
|
|
1196
|
+
["\u0435\u0448\u044C", 1],
|
|
1197
|
+
["\u0438\u0448\u044C", 2],
|
|
1198
|
+
["\u044E", 2],
|
|
1199
|
+
["\u0443\u044E", 2, 1]
|
|
1200
|
+
];
|
|
1201
|
+
var a_52 = [
|
|
1202
|
+
["\u0430", 1],
|
|
1203
|
+
["\u0435\u0432", 1],
|
|
1204
|
+
["\u043E\u0432", 1],
|
|
1205
|
+
["\u0435", 1],
|
|
1206
|
+
["\u0438\u0435", 1, 1],
|
|
1207
|
+
["\u044C\u0435", 1, 2],
|
|
1208
|
+
["\u0438", 1],
|
|
1209
|
+
["\u0435\u0438", 1, 1],
|
|
1210
|
+
["\u0438\u0438", 1, 2],
|
|
1211
|
+
["\u0430\u043C\u0438", 1, 3],
|
|
1212
|
+
["\u044F\u043C\u0438", 1, 4],
|
|
1213
|
+
["\u0438\u044F\u043C\u0438", 1, 1],
|
|
1214
|
+
["\u0439", 1],
|
|
1215
|
+
["\u0435\u0439", 1, 1],
|
|
1216
|
+
["\u0438\u0435\u0439", 1, 1],
|
|
1217
|
+
["\u0438\u0439", 1, 3],
|
|
1218
|
+
["\u043E\u0439", 1, 4],
|
|
1219
|
+
["\u0430\u043C", 1],
|
|
1220
|
+
["\u0435\u043C", 1],
|
|
1221
|
+
["\u0438\u0435\u043C", 1, 1],
|
|
1222
|
+
["\u043E\u043C", 1],
|
|
1223
|
+
["\u044F\u043C", 1],
|
|
1224
|
+
["\u0438\u044F\u043C", 1, 1],
|
|
1225
|
+
["\u043E", 1],
|
|
1226
|
+
["\u0443", 1],
|
|
1227
|
+
["\u0430\u0445", 1],
|
|
1228
|
+
["\u044F\u0445", 1],
|
|
1229
|
+
["\u0438\u044F\u0445", 1, 1],
|
|
1230
|
+
["\u044B", 1],
|
|
1231
|
+
["\u044C", 1],
|
|
1232
|
+
["\u044E", 1],
|
|
1233
|
+
["\u0438\u044E", 1, 1],
|
|
1234
|
+
["\u044C\u044E", 1, 2],
|
|
1235
|
+
["\u044F", 1],
|
|
1236
|
+
["\u0438\u044F", 1, 1],
|
|
1237
|
+
["\u044C\u044F", 1, 2]
|
|
1238
|
+
];
|
|
1239
|
+
var a_62 = [
|
|
1240
|
+
["\u043E\u0441\u0442", 1],
|
|
1241
|
+
["\u043E\u0441\u0442\u044C", 1]
|
|
1242
|
+
];
|
|
1243
|
+
var a_72 = [
|
|
1244
|
+
["\u0435\u0439\u0448\u0435", 1],
|
|
1245
|
+
["\u043D", 2],
|
|
1246
|
+
["\u0435\u0439\u0448", 1],
|
|
1247
|
+
["\u044C", 3]
|
|
1248
|
+
];
|
|
1249
|
+
var g_v2 = [33, 65, 8, 232];
|
|
1250
|
+
var russian_stemmer_default = class extends BaseStemmer {
|
|
1251
|
+
static {
|
|
1252
|
+
__name(this, "default");
|
|
1253
|
+
}
|
|
1254
|
+
#I_p2 = 0;
|
|
1255
|
+
#I_pV = 0;
|
|
1256
|
+
/** @return {boolean} */
|
|
1257
|
+
#r_mark_regions() {
|
|
1258
|
+
this.#I_pV = this.limit;
|
|
1259
|
+
this.#I_p2 = this.limit;
|
|
1260
|
+
const v_1 = this.c;
|
|
1261
|
+
lab0: {
|
|
1262
|
+
if (!this.go_out_grouping(g_v2, 1072, 1103)) break lab0;
|
|
1263
|
+
this.c++;
|
|
1264
|
+
this.#I_pV = this.c;
|
|
1265
|
+
if (!this.go_in_grouping(g_v2, 1072, 1103)) break lab0;
|
|
1266
|
+
this.c++;
|
|
1267
|
+
if (!this.go_out_grouping(g_v2, 1072, 1103)) break lab0;
|
|
1268
|
+
this.c++;
|
|
1269
|
+
if (!this.go_in_grouping(g_v2, 1072, 1103)) break lab0;
|
|
1270
|
+
this.c++;
|
|
1271
|
+
this.#I_p2 = this.c;
|
|
1272
|
+
}
|
|
1273
|
+
this.c = v_1;
|
|
1274
|
+
return true;
|
|
1275
|
+
}
|
|
1276
|
+
/** @return {boolean} */
|
|
1277
|
+
#r_perfective_gerund() {
|
|
1278
|
+
let a;
|
|
1279
|
+
this.ket = this.c;
|
|
1280
|
+
a = this.find_among_b(a_02);
|
|
1281
|
+
if (a === 0) return false;
|
|
1282
|
+
this.bra = this.c;
|
|
1283
|
+
switch (a) {
|
|
1284
|
+
case 1: {
|
|
1285
|
+
lab0: {
|
|
1286
|
+
lab1: {
|
|
1287
|
+
if (!this.eq_s_b("\u0430")) break lab1;
|
|
1288
|
+
break lab0;
|
|
1289
|
+
}
|
|
1290
|
+
if (!this.eq_s_b("\u044F")) return false;
|
|
1291
|
+
}
|
|
1292
|
+
this.slice_del();
|
|
1293
|
+
break;
|
|
1294
|
+
}
|
|
1295
|
+
case 2: {
|
|
1296
|
+
this.slice_del();
|
|
1297
|
+
break;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
return true;
|
|
1301
|
+
}
|
|
1302
|
+
/** @return {boolean} */
|
|
1303
|
+
#r_adjective() {
|
|
1304
|
+
this.ket = this.c;
|
|
1305
|
+
if (this.find_among_b(a_12) === 0) return false;
|
|
1306
|
+
this.bra = this.c;
|
|
1307
|
+
this.slice_del();
|
|
1308
|
+
return true;
|
|
1309
|
+
}
|
|
1310
|
+
/** @return {boolean} */
|
|
1311
|
+
#r_adjectival() {
|
|
1312
|
+
let a;
|
|
1313
|
+
if (!this.#r_adjective()) return false;
|
|
1314
|
+
const v_1 = this.limit - this.c;
|
|
1315
|
+
lab0: {
|
|
1316
|
+
this.ket = this.c;
|
|
1317
|
+
a = this.find_among_b(a_22);
|
|
1318
|
+
if (a === 0) {
|
|
1319
|
+
this.c = this.limit - v_1;
|
|
1320
|
+
break lab0;
|
|
1321
|
+
}
|
|
1322
|
+
this.bra = this.c;
|
|
1323
|
+
switch (a) {
|
|
1324
|
+
case 1: {
|
|
1325
|
+
lab1: {
|
|
1326
|
+
lab2: {
|
|
1327
|
+
if (!this.eq_s_b("\u0430")) break lab2;
|
|
1328
|
+
break lab1;
|
|
1329
|
+
}
|
|
1330
|
+
if (!this.eq_s_b("\u044F")) {
|
|
1331
|
+
this.c = this.limit - v_1;
|
|
1332
|
+
break lab0;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
this.slice_del();
|
|
1336
|
+
break;
|
|
1337
|
+
}
|
|
1338
|
+
case 2: {
|
|
1339
|
+
this.slice_del();
|
|
1340
|
+
break;
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
return true;
|
|
1345
|
+
}
|
|
1346
|
+
/** @return {boolean} */
|
|
1347
|
+
#r_reflexive() {
|
|
1348
|
+
this.ket = this.c;
|
|
1349
|
+
if (this.find_among_b(a_32) === 0) return false;
|
|
1350
|
+
this.bra = this.c;
|
|
1351
|
+
this.slice_del();
|
|
1352
|
+
return true;
|
|
1353
|
+
}
|
|
1354
|
+
/** @return {boolean} */
|
|
1355
|
+
#r_verb() {
|
|
1356
|
+
let a;
|
|
1357
|
+
this.ket = this.c;
|
|
1358
|
+
a = this.find_among_b(a_42);
|
|
1359
|
+
if (a === 0) return false;
|
|
1360
|
+
this.bra = this.c;
|
|
1361
|
+
switch (a) {
|
|
1362
|
+
case 1: {
|
|
1363
|
+
lab0: {
|
|
1364
|
+
lab1: {
|
|
1365
|
+
if (!this.eq_s_b("\u0430")) break lab1;
|
|
1366
|
+
break lab0;
|
|
1367
|
+
}
|
|
1368
|
+
if (!this.eq_s_b("\u044F")) return false;
|
|
1369
|
+
}
|
|
1370
|
+
this.slice_del();
|
|
1371
|
+
break;
|
|
1372
|
+
}
|
|
1373
|
+
case 2: {
|
|
1374
|
+
this.slice_del();
|
|
1375
|
+
break;
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
return true;
|
|
1379
|
+
}
|
|
1380
|
+
/** @return {boolean} */
|
|
1381
|
+
#r_noun() {
|
|
1382
|
+
this.ket = this.c;
|
|
1383
|
+
if (this.find_among_b(a_52) === 0) return false;
|
|
1384
|
+
this.bra = this.c;
|
|
1385
|
+
this.slice_del();
|
|
1386
|
+
return true;
|
|
1387
|
+
}
|
|
1388
|
+
/** @return {boolean} */
|
|
1389
|
+
#r_derivational() {
|
|
1390
|
+
this.ket = this.c;
|
|
1391
|
+
if (this.find_among_b(a_62) === 0) return false;
|
|
1392
|
+
this.bra = this.c;
|
|
1393
|
+
if (this.#I_p2 > this.c) return false;
|
|
1394
|
+
this.slice_del();
|
|
1395
|
+
return true;
|
|
1396
|
+
}
|
|
1397
|
+
/** @return {boolean} */
|
|
1398
|
+
#r_tidy_up() {
|
|
1399
|
+
let a;
|
|
1400
|
+
this.ket = this.c;
|
|
1401
|
+
a = this.find_among_b(a_72);
|
|
1402
|
+
if (a === 0) return false;
|
|
1403
|
+
this.bra = this.c;
|
|
1404
|
+
switch (a) {
|
|
1405
|
+
case 1: {
|
|
1406
|
+
this.slice_del();
|
|
1407
|
+
this.ket = this.c;
|
|
1408
|
+
if (!this.eq_s_b("\u043D")) return false;
|
|
1409
|
+
this.bra = this.c;
|
|
1410
|
+
if (!this.eq_s_b("\u043D")) return false;
|
|
1411
|
+
this.slice_del();
|
|
1412
|
+
break;
|
|
1413
|
+
}
|
|
1414
|
+
case 2: {
|
|
1415
|
+
if (!this.eq_s_b("\u043D")) return false;
|
|
1416
|
+
this.slice_del();
|
|
1417
|
+
break;
|
|
1418
|
+
}
|
|
1419
|
+
case 3: {
|
|
1420
|
+
this.slice_del();
|
|
1421
|
+
break;
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
return true;
|
|
1425
|
+
}
|
|
1426
|
+
/** @return {boolean} */
|
|
1427
|
+
#stem() {
|
|
1428
|
+
const v_1 = this.c;
|
|
1429
|
+
lab0: {
|
|
1430
|
+
while (true) {
|
|
1431
|
+
const v_2 = this.c;
|
|
1432
|
+
lab1: {
|
|
1433
|
+
golab2: while (true) {
|
|
1434
|
+
const v_3 = this.c;
|
|
1435
|
+
lab3: {
|
|
1436
|
+
this.bra = this.c;
|
|
1437
|
+
if (!this.eq_s("\u0451")) break lab3;
|
|
1438
|
+
this.ket = this.c;
|
|
1439
|
+
this.c = v_3;
|
|
1440
|
+
break golab2;
|
|
1441
|
+
}
|
|
1442
|
+
this.c = v_3;
|
|
1443
|
+
if (this.c >= this.limit) break lab1;
|
|
1444
|
+
this.c++;
|
|
1445
|
+
}
|
|
1446
|
+
this.slice_from("\u0435");
|
|
1447
|
+
continue;
|
|
1448
|
+
}
|
|
1449
|
+
this.c = v_2;
|
|
1450
|
+
break;
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
this.c = v_1;
|
|
1454
|
+
this.#r_mark_regions();
|
|
1455
|
+
this.limit_backward = this.c;
|
|
1456
|
+
this.c = this.limit;
|
|
1457
|
+
if (this.c < this.#I_pV) return false;
|
|
1458
|
+
const v_4 = this.limit_backward;
|
|
1459
|
+
this.limit_backward = this.#I_pV;
|
|
1460
|
+
const v_5 = this.limit - this.c;
|
|
1461
|
+
lab4: {
|
|
1462
|
+
lab5: {
|
|
1463
|
+
const v_6 = this.limit - this.c;
|
|
1464
|
+
lab6: {
|
|
1465
|
+
if (!this.#r_perfective_gerund()) break lab6;
|
|
1466
|
+
break lab5;
|
|
1467
|
+
}
|
|
1468
|
+
this.c = this.limit - v_6;
|
|
1469
|
+
const v_7 = this.limit - this.c;
|
|
1470
|
+
lab7: {
|
|
1471
|
+
if (!this.#r_reflexive()) {
|
|
1472
|
+
this.c = this.limit - v_7;
|
|
1473
|
+
break lab7;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
lab8: {
|
|
1477
|
+
const v_8 = this.limit - this.c;
|
|
1478
|
+
lab9: {
|
|
1479
|
+
if (!this.#r_adjectival()) break lab9;
|
|
1480
|
+
break lab8;
|
|
1481
|
+
}
|
|
1482
|
+
this.c = this.limit - v_8;
|
|
1483
|
+
lab10: {
|
|
1484
|
+
if (!this.#r_verb()) break lab10;
|
|
1485
|
+
break lab8;
|
|
1486
|
+
}
|
|
1487
|
+
this.c = this.limit - v_8;
|
|
1488
|
+
if (!this.#r_noun()) break lab4;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
this.c = this.limit - v_5;
|
|
1493
|
+
const v_9 = this.limit - this.c;
|
|
1494
|
+
lab11: {
|
|
1495
|
+
this.ket = this.c;
|
|
1496
|
+
if (!this.eq_s_b("\u0438")) {
|
|
1497
|
+
this.c = this.limit - v_9;
|
|
1498
|
+
break lab11;
|
|
1499
|
+
}
|
|
1500
|
+
this.bra = this.c;
|
|
1501
|
+
this.slice_del();
|
|
1502
|
+
}
|
|
1503
|
+
const v_10 = this.limit - this.c;
|
|
1504
|
+
this.#r_derivational();
|
|
1505
|
+
this.c = this.limit - v_10;
|
|
1506
|
+
const v_11 = this.limit - this.c;
|
|
1507
|
+
this.#r_tidy_up();
|
|
1508
|
+
this.c = this.limit - v_11;
|
|
1509
|
+
this.limit_backward = v_4;
|
|
1510
|
+
this.c = this.limit_backward;
|
|
1511
|
+
return true;
|
|
1512
|
+
}
|
|
1513
|
+
/**@return{string}*/
|
|
1514
|
+
stem(input) {
|
|
1515
|
+
this.setCurrent(input);
|
|
1516
|
+
this.#stem();
|
|
1517
|
+
return this.getCurrent();
|
|
1518
|
+
}
|
|
1519
|
+
stemWord = this.stem;
|
|
1520
|
+
};
|
|
1521
|
+
|
|
1522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
|
|
1523
|
+
var a_03 = [
|
|
1524
|
+
["", 6],
|
|
1525
|
+
["\xE1", 1, 1],
|
|
1526
|
+
["\xE9", 2, 2],
|
|
1527
|
+
["\xED", 3, 3],
|
|
1528
|
+
["\xF3", 4, 4],
|
|
1529
|
+
["\xFA", 5, 5]
|
|
1530
|
+
];
|
|
1531
|
+
var a_13 = [
|
|
1532
|
+
["la", -1],
|
|
1533
|
+
["sela", -1, 1],
|
|
1534
|
+
["le", -1],
|
|
1535
|
+
["me", -1],
|
|
1536
|
+
["se", -1],
|
|
1537
|
+
["lo", -1],
|
|
1538
|
+
["selo", -1, 1],
|
|
1539
|
+
["las", -1],
|
|
1540
|
+
["selas", -1, 1],
|
|
1541
|
+
["les", -1],
|
|
1542
|
+
["los", -1],
|
|
1543
|
+
["selos", -1, 1],
|
|
1544
|
+
["nos", -1]
|
|
1545
|
+
];
|
|
1546
|
+
var a_23 = [
|
|
1547
|
+
["ando", 6],
|
|
1548
|
+
["iendo", 6],
|
|
1549
|
+
["yendo", 7],
|
|
1550
|
+
["\xE1ndo", 2],
|
|
1551
|
+
["i\xE9ndo", 1],
|
|
1552
|
+
["ar", 6],
|
|
1553
|
+
["er", 6],
|
|
1554
|
+
["ir", 6],
|
|
1555
|
+
["\xE1r", 3],
|
|
1556
|
+
["\xE9r", 4],
|
|
1557
|
+
["\xEDr", 5]
|
|
1558
|
+
];
|
|
1559
|
+
var a_33 = [
|
|
1560
|
+
["ic", -1],
|
|
1561
|
+
["ad", -1],
|
|
1562
|
+
["os", -1],
|
|
1563
|
+
["iv", 1]
|
|
1564
|
+
];
|
|
1565
|
+
var a_43 = [
|
|
1566
|
+
["able", 1],
|
|
1567
|
+
["ible", 1],
|
|
1568
|
+
["ante", 1]
|
|
1569
|
+
];
|
|
1570
|
+
var a_53 = [
|
|
1571
|
+
["ic", 1],
|
|
1572
|
+
["abil", 1],
|
|
1573
|
+
["iv", 1]
|
|
1574
|
+
];
|
|
1575
|
+
var a_63 = [
|
|
1576
|
+
["ica", 1],
|
|
1577
|
+
["ancia", 2],
|
|
1578
|
+
["encia", 5],
|
|
1579
|
+
["adora", 2],
|
|
1580
|
+
["osa", 1],
|
|
1581
|
+
["ista", 1],
|
|
1582
|
+
["iva", 9],
|
|
1583
|
+
["anza", 1],
|
|
1584
|
+
["log\xEDa", 3],
|
|
1585
|
+
["idad", 8],
|
|
1586
|
+
["able", 1],
|
|
1587
|
+
["ible", 1],
|
|
1588
|
+
["ante", 2],
|
|
1589
|
+
["mente", 7],
|
|
1590
|
+
["amente", 6, 1],
|
|
1591
|
+
["acion", 2],
|
|
1592
|
+
["ucion", 4],
|
|
1593
|
+
["aci\xF3n", 2],
|
|
1594
|
+
["uci\xF3n", 4],
|
|
1595
|
+
["ico", 1],
|
|
1596
|
+
["ismo", 1],
|
|
1597
|
+
["oso", 1],
|
|
1598
|
+
["amiento", 1],
|
|
1599
|
+
["imiento", 1],
|
|
1600
|
+
["ivo", 9],
|
|
1601
|
+
["ador", 2],
|
|
1602
|
+
["icas", 1],
|
|
1603
|
+
["ancias", 2],
|
|
1604
|
+
["encias", 5],
|
|
1605
|
+
["adoras", 2],
|
|
1606
|
+
["osas", 1],
|
|
1607
|
+
["istas", 1],
|
|
1608
|
+
["ivas", 9],
|
|
1609
|
+
["anzas", 1],
|
|
1610
|
+
["log\xEDas", 3],
|
|
1611
|
+
["idades", 8],
|
|
1612
|
+
["ables", 1],
|
|
1613
|
+
["ibles", 1],
|
|
1614
|
+
["aciones", 2],
|
|
1615
|
+
["uciones", 4],
|
|
1616
|
+
["adores", 2],
|
|
1617
|
+
["antes", 2],
|
|
1618
|
+
["icos", 1],
|
|
1619
|
+
["ismos", 1],
|
|
1620
|
+
["osos", 1],
|
|
1621
|
+
["amientos", 1],
|
|
1622
|
+
["imientos", 1],
|
|
1623
|
+
["ivos", 9]
|
|
1624
|
+
];
|
|
1625
|
+
var a_73 = [
|
|
1626
|
+
["ya", 1],
|
|
1627
|
+
["ye", 1],
|
|
1628
|
+
["yan", 1],
|
|
1629
|
+
["yen", 1],
|
|
1630
|
+
["yeron", 1],
|
|
1631
|
+
["yendo", 1],
|
|
1632
|
+
["yo", 1],
|
|
1633
|
+
["yas", 1],
|
|
1634
|
+
["yes", 1],
|
|
1635
|
+
["yais", 1],
|
|
1636
|
+
["yamos", 1],
|
|
1637
|
+
["y\xF3", 1]
|
|
1638
|
+
];
|
|
1639
|
+
var a_82 = [
|
|
1640
|
+
["aba", 2],
|
|
1641
|
+
["ada", 2],
|
|
1642
|
+
["ida", 2],
|
|
1643
|
+
["ara", 2],
|
|
1644
|
+
["iera", 2],
|
|
1645
|
+
["\xEDa", 2],
|
|
1646
|
+
["ar\xEDa", 2, 1],
|
|
1647
|
+
["er\xEDa", 2, 2],
|
|
1648
|
+
["ir\xEDa", 2, 3],
|
|
1649
|
+
["ad", 2],
|
|
1650
|
+
["ed", 2],
|
|
1651
|
+
["id", 2],
|
|
1652
|
+
["ase", 2],
|
|
1653
|
+
["iese", 2],
|
|
1654
|
+
["aste", 2],
|
|
1655
|
+
["iste", 2],
|
|
1656
|
+
["an", 2],
|
|
1657
|
+
["aban", 2, 1],
|
|
1658
|
+
["aran", 2, 2],
|
|
1659
|
+
["ieran", 2, 3],
|
|
1660
|
+
["\xEDan", 2, 4],
|
|
1661
|
+
["ar\xEDan", 2, 1],
|
|
1662
|
+
["er\xEDan", 2, 2],
|
|
1663
|
+
["ir\xEDan", 2, 3],
|
|
1664
|
+
["en", 1],
|
|
1665
|
+
["asen", 2, 1],
|
|
1666
|
+
["iesen", 2, 2],
|
|
1667
|
+
["aron", 2],
|
|
1668
|
+
["ieron", 2],
|
|
1669
|
+
["ar\xE1n", 2],
|
|
1670
|
+
["er\xE1n", 2],
|
|
1671
|
+
["ir\xE1n", 2],
|
|
1672
|
+
["ado", 2],
|
|
1673
|
+
["ido", 2],
|
|
1674
|
+
["ando", 2],
|
|
1675
|
+
["iendo", 2],
|
|
1676
|
+
["ar", 2],
|
|
1677
|
+
["er", 2],
|
|
1678
|
+
["ir", 2],
|
|
1679
|
+
["as", 2],
|
|
1680
|
+
["abas", 2, 1],
|
|
1681
|
+
["adas", 2, 2],
|
|
1682
|
+
["idas", 2, 3],
|
|
1683
|
+
["aras", 2, 4],
|
|
1684
|
+
["ieras", 2, 5],
|
|
1685
|
+
["\xEDas", 2, 6],
|
|
1686
|
+
["ar\xEDas", 2, 1],
|
|
1687
|
+
["er\xEDas", 2, 2],
|
|
1688
|
+
["ir\xEDas", 2, 3],
|
|
1689
|
+
["es", 1],
|
|
1690
|
+
["ases", 2, 1],
|
|
1691
|
+
["ieses", 2, 2],
|
|
1692
|
+
["abais", 2],
|
|
1693
|
+
["arais", 2],
|
|
1694
|
+
["ierais", 2],
|
|
1695
|
+
["\xEDais", 2],
|
|
1696
|
+
["ar\xEDais", 2, 1],
|
|
1697
|
+
["er\xEDais", 2, 2],
|
|
1698
|
+
["ir\xEDais", 2, 3],
|
|
1699
|
+
["aseis", 2],
|
|
1700
|
+
["ieseis", 2],
|
|
1701
|
+
["asteis", 2],
|
|
1702
|
+
["isteis", 2],
|
|
1703
|
+
["\xE1is", 2],
|
|
1704
|
+
["\xE9is", 1],
|
|
1705
|
+
["ar\xE9is", 2, 1],
|
|
1706
|
+
["er\xE9is", 2, 2],
|
|
1707
|
+
["ir\xE9is", 2, 3],
|
|
1708
|
+
["ados", 2],
|
|
1709
|
+
["idos", 2],
|
|
1710
|
+
["amos", 2],
|
|
1711
|
+
["\xE1bamos", 2, 1],
|
|
1712
|
+
["\xE1ramos", 2, 2],
|
|
1713
|
+
["i\xE9ramos", 2, 3],
|
|
1714
|
+
["\xEDamos", 2, 4],
|
|
1715
|
+
["ar\xEDamos", 2, 1],
|
|
1716
|
+
["er\xEDamos", 2, 2],
|
|
1717
|
+
["ir\xEDamos", 2, 3],
|
|
1718
|
+
["emos", 1],
|
|
1719
|
+
["aremos", 2, 1],
|
|
1720
|
+
["eremos", 2, 2],
|
|
1721
|
+
["iremos", 2, 3],
|
|
1722
|
+
["\xE1semos", 2, 4],
|
|
1723
|
+
["i\xE9semos", 2, 5],
|
|
1724
|
+
["imos", 2],
|
|
1725
|
+
["ar\xE1s", 2],
|
|
1726
|
+
["er\xE1s", 2],
|
|
1727
|
+
["ir\xE1s", 2],
|
|
1728
|
+
["\xEDs", 2],
|
|
1729
|
+
["ar\xE1", 2],
|
|
1730
|
+
["er\xE1", 2],
|
|
1731
|
+
["ir\xE1", 2],
|
|
1732
|
+
["ar\xE9", 2],
|
|
1733
|
+
["er\xE9", 2],
|
|
1734
|
+
["ir\xE9", 2],
|
|
1735
|
+
["i\xF3", 2]
|
|
1736
|
+
];
|
|
1737
|
+
var a_92 = [
|
|
1738
|
+
["a", 1],
|
|
1739
|
+
["e", 2],
|
|
1740
|
+
["o", 1],
|
|
1741
|
+
["os", 1],
|
|
1742
|
+
["\xE1", 1],
|
|
1743
|
+
["\xE9", 2],
|
|
1744
|
+
["\xED", 1],
|
|
1745
|
+
["\xF3", 1]
|
|
1746
|
+
];
|
|
1747
|
+
var g_v3 = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10];
|
|
1748
|
+
var spanish_stemmer_default = class extends BaseStemmer {
|
|
1749
|
+
static {
|
|
1750
|
+
__name(this, "default");
|
|
1751
|
+
}
|
|
1752
|
+
#I_p2 = 0;
|
|
1753
|
+
#I_p1 = 0;
|
|
1754
|
+
#I_pV = 0;
|
|
1755
|
+
/** @return {boolean} */
|
|
1756
|
+
#r_mark_regions() {
|
|
1757
|
+
this.#I_pV = this.limit;
|
|
1758
|
+
this.#I_p1 = this.limit;
|
|
1759
|
+
this.#I_p2 = this.limit;
|
|
1760
|
+
const v_1 = this.c;
|
|
1761
|
+
lab0: {
|
|
1762
|
+
lab1: {
|
|
1763
|
+
const v_2 = this.c;
|
|
1764
|
+
lab2: {
|
|
1765
|
+
if (!this.in_grouping(g_v3, 97, 252)) break lab2;
|
|
1766
|
+
lab3: {
|
|
1767
|
+
const v_3 = this.c;
|
|
1768
|
+
lab4: {
|
|
1769
|
+
if (!this.out_grouping(g_v3, 97, 252)) break lab4;
|
|
1770
|
+
if (!this.go_out_grouping(g_v3, 97, 252)) break lab4;
|
|
1771
|
+
this.c++;
|
|
1772
|
+
break lab3;
|
|
1773
|
+
}
|
|
1774
|
+
this.c = v_3;
|
|
1775
|
+
if (!this.in_grouping(g_v3, 97, 252)) break lab2;
|
|
1776
|
+
if (!this.go_in_grouping(g_v3, 97, 252)) break lab2;
|
|
1777
|
+
this.c++;
|
|
1778
|
+
}
|
|
1779
|
+
break lab1;
|
|
1780
|
+
}
|
|
1781
|
+
this.c = v_2;
|
|
1782
|
+
if (!this.out_grouping(g_v3, 97, 252)) break lab0;
|
|
1783
|
+
lab5: {
|
|
1784
|
+
const v_4 = this.c;
|
|
1785
|
+
lab6: {
|
|
1786
|
+
if (!this.out_grouping(g_v3, 97, 252)) break lab6;
|
|
1787
|
+
if (!this.go_out_grouping(g_v3, 97, 252)) break lab6;
|
|
1788
|
+
this.c++;
|
|
1789
|
+
break lab5;
|
|
1790
|
+
}
|
|
1791
|
+
this.c = v_4;
|
|
1792
|
+
if (!this.in_grouping(g_v3, 97, 252)) break lab0;
|
|
1793
|
+
if (this.c >= this.limit) break lab0;
|
|
1794
|
+
this.c++;
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
this.#I_pV = this.c;
|
|
1798
|
+
}
|
|
1799
|
+
this.c = v_1;
|
|
1800
|
+
const v_5 = this.c;
|
|
1801
|
+
lab7: {
|
|
1802
|
+
if (!this.go_out_grouping(g_v3, 97, 252)) break lab7;
|
|
1803
|
+
this.c++;
|
|
1804
|
+
if (!this.go_in_grouping(g_v3, 97, 252)) break lab7;
|
|
1805
|
+
this.c++;
|
|
1806
|
+
this.#I_p1 = this.c;
|
|
1807
|
+
if (!this.go_out_grouping(g_v3, 97, 252)) break lab7;
|
|
1808
|
+
this.c++;
|
|
1809
|
+
if (!this.go_in_grouping(g_v3, 97, 252)) break lab7;
|
|
1810
|
+
this.c++;
|
|
1811
|
+
this.#I_p2 = this.c;
|
|
1812
|
+
}
|
|
1813
|
+
this.c = v_5;
|
|
1814
|
+
return true;
|
|
1815
|
+
}
|
|
1816
|
+
/** @return {boolean} */
|
|
1817
|
+
#r_postlude() {
|
|
1818
|
+
let a;
|
|
1819
|
+
while (true) {
|
|
1820
|
+
const v_1 = this.c;
|
|
1821
|
+
lab0: {
|
|
1822
|
+
this.bra = this.c;
|
|
1823
|
+
a = this.find_among(a_03);
|
|
1824
|
+
this.ket = this.c;
|
|
1825
|
+
switch (a) {
|
|
1826
|
+
case 1: {
|
|
1827
|
+
this.slice_from("a");
|
|
1828
|
+
break;
|
|
1829
|
+
}
|
|
1830
|
+
case 2: {
|
|
1831
|
+
this.slice_from("e");
|
|
1832
|
+
break;
|
|
1833
|
+
}
|
|
1834
|
+
case 3: {
|
|
1835
|
+
this.slice_from("i");
|
|
1836
|
+
break;
|
|
1837
|
+
}
|
|
1838
|
+
case 4: {
|
|
1839
|
+
this.slice_from("o");
|
|
1840
|
+
break;
|
|
1841
|
+
}
|
|
1842
|
+
case 5: {
|
|
1843
|
+
this.slice_from("u");
|
|
1844
|
+
break;
|
|
1845
|
+
}
|
|
1846
|
+
case 6: {
|
|
1847
|
+
if (this.c >= this.limit) break lab0;
|
|
1848
|
+
this.c++;
|
|
1849
|
+
break;
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
continue;
|
|
1853
|
+
}
|
|
1854
|
+
this.c = v_1;
|
|
1855
|
+
break;
|
|
1856
|
+
}
|
|
1857
|
+
return true;
|
|
1858
|
+
}
|
|
1859
|
+
/** @return {boolean} */
|
|
1860
|
+
#r_RV() {
|
|
1861
|
+
return this.#I_pV <= this.c;
|
|
1862
|
+
}
|
|
1863
|
+
/** @return {boolean} */
|
|
1864
|
+
#r_R2() {
|
|
1865
|
+
return this.#I_p2 <= this.c;
|
|
1866
|
+
}
|
|
1867
|
+
/** @return {boolean} */
|
|
1868
|
+
#r_attached_pronoun() {
|
|
1869
|
+
let a;
|
|
1870
|
+
this.ket = this.c;
|
|
1871
|
+
if (this.find_among_b(a_13) === 0) return false;
|
|
1872
|
+
this.bra = this.c;
|
|
1873
|
+
a = this.find_among_b(a_23);
|
|
1874
|
+
if (a === 0) return false;
|
|
1875
|
+
if (!this.#r_RV()) return false;
|
|
1876
|
+
switch (a) {
|
|
1877
|
+
case 1: {
|
|
1878
|
+
this.bra = this.c;
|
|
1879
|
+
this.slice_from("iendo");
|
|
1880
|
+
break;
|
|
1881
|
+
}
|
|
1882
|
+
case 2: {
|
|
1883
|
+
this.bra = this.c;
|
|
1884
|
+
this.slice_from("ando");
|
|
1885
|
+
break;
|
|
1886
|
+
}
|
|
1887
|
+
case 3: {
|
|
1888
|
+
this.bra = this.c;
|
|
1889
|
+
this.slice_from("ar");
|
|
1890
|
+
break;
|
|
1891
|
+
}
|
|
1892
|
+
case 4: {
|
|
1893
|
+
this.bra = this.c;
|
|
1894
|
+
this.slice_from("er");
|
|
1895
|
+
break;
|
|
1896
|
+
}
|
|
1897
|
+
case 5: {
|
|
1898
|
+
this.bra = this.c;
|
|
1899
|
+
this.slice_from("ir");
|
|
1900
|
+
break;
|
|
1901
|
+
}
|
|
1902
|
+
case 6: {
|
|
1903
|
+
this.slice_del();
|
|
1904
|
+
break;
|
|
1905
|
+
}
|
|
1906
|
+
case 7: {
|
|
1907
|
+
if (!this.eq_s_b("u")) return false;
|
|
1908
|
+
this.slice_del();
|
|
1909
|
+
break;
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
return true;
|
|
1913
|
+
}
|
|
1914
|
+
/** @return {boolean} */
|
|
1915
|
+
#r_standard_suffix() {
|
|
1916
|
+
let a;
|
|
1917
|
+
this.ket = this.c;
|
|
1918
|
+
a = this.find_among_b(a_63);
|
|
1919
|
+
if (a === 0) return false;
|
|
1920
|
+
this.bra = this.c;
|
|
1921
|
+
switch (a) {
|
|
1922
|
+
case 1: {
|
|
1923
|
+
if (!this.#r_R2()) return false;
|
|
1924
|
+
this.slice_del();
|
|
1925
|
+
break;
|
|
1926
|
+
}
|
|
1927
|
+
case 2: {
|
|
1928
|
+
if (!this.#r_R2()) return false;
|
|
1929
|
+
this.slice_del();
|
|
1930
|
+
const v_1 = this.limit - this.c;
|
|
1931
|
+
lab0: {
|
|
1932
|
+
this.ket = this.c;
|
|
1933
|
+
if (!this.eq_s_b("ic")) {
|
|
1934
|
+
this.c = this.limit - v_1;
|
|
1935
|
+
break lab0;
|
|
1936
|
+
}
|
|
1937
|
+
this.bra = this.c;
|
|
1938
|
+
if (!this.#r_R2()) {
|
|
1939
|
+
this.c = this.limit - v_1;
|
|
1940
|
+
break lab0;
|
|
1941
|
+
}
|
|
1942
|
+
this.slice_del();
|
|
1943
|
+
}
|
|
1944
|
+
break;
|
|
1945
|
+
}
|
|
1946
|
+
case 3: {
|
|
1947
|
+
if (!this.#r_R2()) return false;
|
|
1948
|
+
this.slice_from("log");
|
|
1949
|
+
break;
|
|
1950
|
+
}
|
|
1951
|
+
case 4: {
|
|
1952
|
+
if (!this.#r_R2()) return false;
|
|
1953
|
+
this.slice_from("u");
|
|
1954
|
+
break;
|
|
1955
|
+
}
|
|
1956
|
+
case 5: {
|
|
1957
|
+
if (!this.#r_R2()) return false;
|
|
1958
|
+
this.slice_from("ente");
|
|
1959
|
+
break;
|
|
1960
|
+
}
|
|
1961
|
+
case 6: {
|
|
1962
|
+
if (this.#I_p1 > this.c) return false;
|
|
1963
|
+
this.slice_del();
|
|
1964
|
+
const v_2 = this.limit - this.c;
|
|
1965
|
+
lab1: {
|
|
1966
|
+
this.ket = this.c;
|
|
1967
|
+
a = this.find_among_b(a_33);
|
|
1968
|
+
if (a === 0) {
|
|
1969
|
+
this.c = this.limit - v_2;
|
|
1970
|
+
break lab1;
|
|
1971
|
+
}
|
|
1972
|
+
this.bra = this.c;
|
|
1973
|
+
if (!this.#r_R2()) {
|
|
1974
|
+
this.c = this.limit - v_2;
|
|
1975
|
+
break lab1;
|
|
1976
|
+
}
|
|
1977
|
+
this.slice_del();
|
|
1978
|
+
switch (a) {
|
|
1979
|
+
case 1: {
|
|
1980
|
+
this.ket = this.c;
|
|
1981
|
+
if (!this.eq_s_b("at")) {
|
|
1982
|
+
this.c = this.limit - v_2;
|
|
1983
|
+
break lab1;
|
|
1984
|
+
}
|
|
1985
|
+
this.bra = this.c;
|
|
1986
|
+
if (!this.#r_R2()) {
|
|
1987
|
+
this.c = this.limit - v_2;
|
|
1988
|
+
break lab1;
|
|
1989
|
+
}
|
|
1990
|
+
this.slice_del();
|
|
1991
|
+
break;
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
break;
|
|
1996
|
+
}
|
|
1997
|
+
case 7: {
|
|
1998
|
+
if (!this.#r_R2()) return false;
|
|
1999
|
+
this.slice_del();
|
|
2000
|
+
const v_3 = this.limit - this.c;
|
|
2001
|
+
lab2: {
|
|
2002
|
+
this.ket = this.c;
|
|
2003
|
+
if (this.find_among_b(a_43) === 0) {
|
|
2004
|
+
this.c = this.limit - v_3;
|
|
2005
|
+
break lab2;
|
|
2006
|
+
}
|
|
2007
|
+
this.bra = this.c;
|
|
2008
|
+
if (!this.#r_R2()) {
|
|
2009
|
+
this.c = this.limit - v_3;
|
|
2010
|
+
break lab2;
|
|
2011
|
+
}
|
|
2012
|
+
this.slice_del();
|
|
2013
|
+
}
|
|
2014
|
+
break;
|
|
2015
|
+
}
|
|
2016
|
+
case 8: {
|
|
2017
|
+
if (!this.#r_R2()) return false;
|
|
2018
|
+
this.slice_del();
|
|
2019
|
+
const v_4 = this.limit - this.c;
|
|
2020
|
+
lab3: {
|
|
2021
|
+
this.ket = this.c;
|
|
2022
|
+
if (this.find_among_b(a_53) === 0) {
|
|
2023
|
+
this.c = this.limit - v_4;
|
|
2024
|
+
break lab3;
|
|
2025
|
+
}
|
|
2026
|
+
this.bra = this.c;
|
|
2027
|
+
if (!this.#r_R2()) {
|
|
2028
|
+
this.c = this.limit - v_4;
|
|
2029
|
+
break lab3;
|
|
2030
|
+
}
|
|
2031
|
+
this.slice_del();
|
|
2032
|
+
}
|
|
2033
|
+
break;
|
|
2034
|
+
}
|
|
2035
|
+
case 9: {
|
|
2036
|
+
if (!this.#r_R2()) return false;
|
|
2037
|
+
this.slice_del();
|
|
2038
|
+
const v_5 = this.limit - this.c;
|
|
2039
|
+
lab4: {
|
|
2040
|
+
this.ket = this.c;
|
|
2041
|
+
if (!this.eq_s_b("at")) {
|
|
2042
|
+
this.c = this.limit - v_5;
|
|
2043
|
+
break lab4;
|
|
2044
|
+
}
|
|
2045
|
+
this.bra = this.c;
|
|
2046
|
+
if (!this.#r_R2()) {
|
|
2047
|
+
this.c = this.limit - v_5;
|
|
2048
|
+
break lab4;
|
|
2049
|
+
}
|
|
2050
|
+
this.slice_del();
|
|
2051
|
+
}
|
|
2052
|
+
break;
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
return true;
|
|
2056
|
+
}
|
|
2057
|
+
/** @return {boolean} */
|
|
2058
|
+
#r_y_verb_suffix() {
|
|
2059
|
+
if (this.c < this.#I_pV) return false;
|
|
2060
|
+
const v_1 = this.limit_backward;
|
|
2061
|
+
this.limit_backward = this.#I_pV;
|
|
2062
|
+
this.ket = this.c;
|
|
2063
|
+
if (this.find_among_b(a_73) === 0) {
|
|
2064
|
+
this.limit_backward = v_1;
|
|
2065
|
+
return false;
|
|
2066
|
+
}
|
|
2067
|
+
this.bra = this.c;
|
|
2068
|
+
this.limit_backward = v_1;
|
|
2069
|
+
if (!this.eq_s_b("u")) return false;
|
|
2070
|
+
this.slice_del();
|
|
2071
|
+
return true;
|
|
2072
|
+
}
|
|
2073
|
+
/** @return {boolean} */
|
|
2074
|
+
#r_verb_suffix() {
|
|
2075
|
+
let a;
|
|
2076
|
+
if (this.c < this.#I_pV) return false;
|
|
2077
|
+
const v_1 = this.limit_backward;
|
|
2078
|
+
this.limit_backward = this.#I_pV;
|
|
2079
|
+
this.ket = this.c;
|
|
2080
|
+
a = this.find_among_b(a_82);
|
|
2081
|
+
if (a === 0) {
|
|
2082
|
+
this.limit_backward = v_1;
|
|
2083
|
+
return false;
|
|
2084
|
+
}
|
|
2085
|
+
this.bra = this.c;
|
|
2086
|
+
this.limit_backward = v_1;
|
|
2087
|
+
switch (a) {
|
|
2088
|
+
case 1: {
|
|
2089
|
+
const v_2 = this.limit - this.c;
|
|
2090
|
+
lab0: {
|
|
2091
|
+
if (!this.eq_s_b("u")) {
|
|
2092
|
+
this.c = this.limit - v_2;
|
|
2093
|
+
break lab0;
|
|
2094
|
+
}
|
|
2095
|
+
const v_3 = this.limit - this.c;
|
|
2096
|
+
if (!this.eq_s_b("g")) {
|
|
2097
|
+
this.c = this.limit - v_2;
|
|
2098
|
+
break lab0;
|
|
2099
|
+
}
|
|
2100
|
+
this.c = this.limit - v_3;
|
|
2101
|
+
}
|
|
2102
|
+
this.bra = this.c;
|
|
2103
|
+
this.slice_del();
|
|
2104
|
+
break;
|
|
2105
|
+
}
|
|
2106
|
+
case 2: {
|
|
2107
|
+
this.slice_del();
|
|
2108
|
+
break;
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
return true;
|
|
2112
|
+
}
|
|
2113
|
+
/** @return {boolean} */
|
|
2114
|
+
#r_residual_suffix() {
|
|
2115
|
+
let a;
|
|
2116
|
+
this.ket = this.c;
|
|
2117
|
+
a = this.find_among_b(a_92);
|
|
2118
|
+
if (a === 0) return false;
|
|
2119
|
+
this.bra = this.c;
|
|
2120
|
+
switch (a) {
|
|
2121
|
+
case 1: {
|
|
2122
|
+
if (!this.#r_RV()) return false;
|
|
2123
|
+
this.slice_del();
|
|
2124
|
+
break;
|
|
2125
|
+
}
|
|
2126
|
+
case 2: {
|
|
2127
|
+
if (!this.#r_RV()) return false;
|
|
2128
|
+
this.slice_del();
|
|
2129
|
+
const v_1 = this.limit - this.c;
|
|
2130
|
+
lab0: {
|
|
2131
|
+
this.ket = this.c;
|
|
2132
|
+
if (!this.eq_s_b("u")) {
|
|
2133
|
+
this.c = this.limit - v_1;
|
|
2134
|
+
break lab0;
|
|
2135
|
+
}
|
|
2136
|
+
this.bra = this.c;
|
|
2137
|
+
const v_2 = this.limit - this.c;
|
|
2138
|
+
if (!this.eq_s_b("g")) {
|
|
2139
|
+
this.c = this.limit - v_1;
|
|
2140
|
+
break lab0;
|
|
2141
|
+
}
|
|
2142
|
+
this.c = this.limit - v_2;
|
|
2143
|
+
if (!this.#r_RV()) {
|
|
2144
|
+
this.c = this.limit - v_1;
|
|
2145
|
+
break lab0;
|
|
2146
|
+
}
|
|
2147
|
+
this.slice_del();
|
|
2148
|
+
}
|
|
2149
|
+
break;
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
return true;
|
|
2153
|
+
}
|
|
2154
|
+
/** @return {boolean} */
|
|
2155
|
+
#stem() {
|
|
2156
|
+
this.#r_mark_regions();
|
|
2157
|
+
this.limit_backward = this.c;
|
|
2158
|
+
this.c = this.limit;
|
|
2159
|
+
const v_1 = this.limit - this.c;
|
|
2160
|
+
this.#r_attached_pronoun();
|
|
2161
|
+
this.c = this.limit - v_1;
|
|
2162
|
+
const v_2 = this.limit - this.c;
|
|
2163
|
+
lab0: {
|
|
2164
|
+
lab1: {
|
|
2165
|
+
const v_3 = this.limit - this.c;
|
|
2166
|
+
lab2: {
|
|
2167
|
+
if (!this.#r_standard_suffix()) break lab2;
|
|
2168
|
+
break lab1;
|
|
2169
|
+
}
|
|
2170
|
+
this.c = this.limit - v_3;
|
|
2171
|
+
lab3: {
|
|
2172
|
+
if (!this.#r_y_verb_suffix()) break lab3;
|
|
2173
|
+
break lab1;
|
|
2174
|
+
}
|
|
2175
|
+
this.c = this.limit - v_3;
|
|
2176
|
+
if (!this.#r_verb_suffix()) break lab0;
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
this.c = this.limit - v_2;
|
|
2180
|
+
const v_4 = this.limit - this.c;
|
|
2181
|
+
this.#r_residual_suffix();
|
|
2182
|
+
this.c = this.limit - v_4;
|
|
2183
|
+
this.c = this.limit_backward;
|
|
2184
|
+
const v_5 = this.c;
|
|
2185
|
+
this.#r_postlude();
|
|
2186
|
+
this.c = v_5;
|
|
2187
|
+
return true;
|
|
2188
|
+
}
|
|
2189
|
+
/**@return{string}*/
|
|
2190
|
+
stem(input) {
|
|
2191
|
+
this.setCurrent(input);
|
|
2192
|
+
this.#stem();
|
|
2193
|
+
return this.getCurrent();
|
|
2194
|
+
}
|
|
2195
|
+
stemWord = this.stem;
|
|
2196
|
+
};
|
|
2197
|
+
|
|
2198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/search/stem.js
|
|
2199
|
+
var SNOWBALL_VERSION = "3.1.1";
|
|
2200
|
+
var CYRILLIC_STEMMERS = [...languagesOf("cyrillic"), "none"];
|
|
2201
|
+
var LATIN_STEMMERS = [...languagesOf("latin"), "none"];
|
|
2202
|
+
var DEFAULT_STEMMERS = { cyrillic: "russian", latin: "english,spanish" };
|
|
2203
|
+
var DEFAULT_STEMMERS_VERSION = 2;
|
|
2204
|
+
var STEM_SEPARATOR = "0stemsep0";
|
|
2205
|
+
var STEM_CACHE_LIMIT = 2e5;
|
|
2206
|
+
var analyzerIdentity = /* @__PURE__ */ __name((stemmers) => `snowball-${SNOWBALL_VERSION} cyrillic=${stemmers.cyrillic} latin=${stemmers.latin}`, "analyzerIdentity");
|
|
2207
|
+
var parseStemmers = /* @__PURE__ */ __name((value) => {
|
|
2208
|
+
const record = typeof value === "object" && value !== null ? value : {};
|
|
2209
|
+
const pick = /* @__PURE__ */ __name((script, allowed, fallback) => {
|
|
2210
|
+
const choice = record[script] ?? fallback;
|
|
2211
|
+
if (allowed.includes(choice))
|
|
2212
|
+
return choice;
|
|
2213
|
+
throw new CliError("validation_error", `${script} words cannot be stemmed with ${JSON.stringify(choice)} \u2014 choose ${allowed.join(", ")}`, { reason: "stemmer.invalid", script, allowed: [...allowed] });
|
|
2214
|
+
}, "pick");
|
|
2215
|
+
return {
|
|
2216
|
+
cyrillic: pick("cyrillic", CYRILLIC_STEMMERS, DEFAULT_STEMMERS.cyrillic),
|
|
2217
|
+
latin: latinOf(record.latin ?? DEFAULT_STEMMERS.latin)
|
|
2218
|
+
};
|
|
2219
|
+
}, "parseStemmers");
|
|
2220
|
+
var latinOf = /* @__PURE__ */ __name((value) => {
|
|
2221
|
+
const parts = Array.isArray(value) ? value : typeof value === "string" ? value.split(",").map((part) => part.trim()) : [value];
|
|
2222
|
+
const unknown = parts.find((part) => !LATIN_STEMMERS.includes(part));
|
|
2223
|
+
const named = [...new Set(parts)].filter((part) => part !== "none").sort();
|
|
2224
|
+
if (unknown !== void 0 || parts.length === 0 || named.length > 0 && parts.includes("none"))
|
|
2225
|
+
throw new CliError("validation_error", `latin words cannot be stemmed with ${JSON.stringify(value)} \u2014 choose none, or one or more of english, spanish joined by commas`, { reason: "stemmer.invalid", script: "latin", allowed: [...LATIN_STEMMERS] });
|
|
2226
|
+
return named.length ? named.join(",") : "none";
|
|
2227
|
+
}, "latinOf");
|
|
2228
|
+
var TOKEN = /[\p{L}\p{N}\p{Co}\p{M}]+/gu;
|
|
2229
|
+
var MARKS = new RegExp("\\p{M}+", "gu");
|
|
2230
|
+
var CYRILLIC = new RegExp("^\\p{Script=Cyrillic}+$", "u");
|
|
2231
|
+
var LATIN = new RegExp("^\\p{Script=Latin}+$", "u");
|
|
2232
|
+
var snowball = {
|
|
2233
|
+
russian: /* @__PURE__ */ __name(() => new russian_stemmer_default(), "russian"),
|
|
2234
|
+
spanish: /* @__PURE__ */ __name(() => new spanish_stemmer_default(), "spanish"),
|
|
2235
|
+
english: /* @__PURE__ */ __name(() => new english_stemmer_default(), "english"),
|
|
2236
|
+
none: /* @__PURE__ */ __name(() => null, "none")
|
|
2237
|
+
};
|
|
2238
|
+
var createStemmer = /* @__PURE__ */ __name((stemmers = DEFAULT_STEMMERS, { cacheLimit = STEM_CACHE_LIMIT } = {}) => {
|
|
2239
|
+
const valid = parseStemmers(stemmers);
|
|
2240
|
+
const cyrillic = snowball[valid.cyrillic]();
|
|
2241
|
+
const latinNames = valid.latin.split(",");
|
|
2242
|
+
const latins = latinNames.map((name) => snowball[name]());
|
|
2243
|
+
const cache = /* @__PURE__ */ new Map();
|
|
2244
|
+
const compute = /* @__PURE__ */ __name((token, variant) => {
|
|
2245
|
+
const word = token.normalize("NFC").toLowerCase().replace(MARKS, "");
|
|
2246
|
+
const engine = CYRILLIC.test(word) ? cyrillic : LATIN.test(word) ? latins[variant] ?? null : null;
|
|
2247
|
+
const stem = engine?.stemWord(word) || word;
|
|
2248
|
+
return normalize(stem);
|
|
2249
|
+
}, "compute");
|
|
2250
|
+
const stemOf = /* @__PURE__ */ __name((token, variant) => {
|
|
2251
|
+
const key = variant === 0 ? token : `${variant}\0${token}`;
|
|
2252
|
+
const cached = cache.get(key);
|
|
2253
|
+
if (cached !== void 0)
|
|
2254
|
+
return cached;
|
|
2255
|
+
const stem = compute(token, variant);
|
|
2256
|
+
if (cache.size >= cacheLimit)
|
|
2257
|
+
cache.clear();
|
|
2258
|
+
if (cacheLimit > 0)
|
|
2259
|
+
cache.set(key, stem);
|
|
2260
|
+
return stem;
|
|
2261
|
+
}, "stemOf");
|
|
2262
|
+
const stemToken = /* @__PURE__ */ __name((token) => stemOf(token, 0), "stemToken");
|
|
2263
|
+
const tokensOf = /* @__PURE__ */ __name((text) => text.normalize("NFC").toLowerCase().match(TOKEN) ?? [], "tokensOf");
|
|
2264
|
+
const stemSequences = /* @__PURE__ */ __name((text) => {
|
|
2265
|
+
const tokens = tokensOf(text);
|
|
2266
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2267
|
+
return latins.flatMap((_, variant) => {
|
|
2268
|
+
const sequence = tokens.map((token) => stemOf(token, variant)).filter(Boolean);
|
|
2269
|
+
const key = sequence.join(" ");
|
|
2270
|
+
if (seen.has(key))
|
|
2271
|
+
return [];
|
|
2272
|
+
seen.add(key);
|
|
2273
|
+
return [sequence];
|
|
2274
|
+
});
|
|
2275
|
+
}, "stemSequences");
|
|
2276
|
+
return {
|
|
2277
|
+
stemmers: valid,
|
|
2278
|
+
identity: analyzerIdentity(valid),
|
|
2279
|
+
stemToken,
|
|
2280
|
+
stemTokens: /* @__PURE__ */ __name((text) => tokensOf(text).map(stemToken).filter(Boolean), "stemTokens"),
|
|
2281
|
+
stemSequences,
|
|
2282
|
+
indexText: /* @__PURE__ */ __name((text) => stemSequences(text).map((sequence) => sequence.join(" ")).filter(Boolean).join(` ${STEM_SEPARATOR} `), "indexText"),
|
|
2283
|
+
phrases: /* @__PURE__ */ __name((text) => {
|
|
2284
|
+
const phrases = stemSequences(text).filter((sequence) => sequence.length > 0).map((sequence) => `"${sequence.join(" ").replaceAll('"', '""')}"`);
|
|
2285
|
+
return phrases.length ? phrases.join(" OR ") : void 0;
|
|
2286
|
+
}, "phrases"),
|
|
2287
|
+
explain: /* @__PURE__ */ __name((text) => tokensOf(text).flatMap((word) => {
|
|
2288
|
+
const bare = word.replace(MARKS, "");
|
|
2289
|
+
const script = CYRILLIC.test(bare) ? "cyrillic" : LATIN.test(bare) ? "latin" : "none";
|
|
2290
|
+
const variants = script === "latin" ? latinNames.map((name, variant) => ({ name, variant })) : [{ name: script === "cyrillic" ? valid.cyrillic : "none", variant: 0 }];
|
|
2291
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2292
|
+
return variants.flatMap(({ name, variant }) => {
|
|
2293
|
+
const stem = stemOf(word, variant);
|
|
2294
|
+
if (!stem || seen.has(stem))
|
|
2295
|
+
return [];
|
|
2296
|
+
seen.add(stem);
|
|
2297
|
+
return [{ word, stem, stemmer: name }];
|
|
2298
|
+
});
|
|
2299
|
+
}), "explain")
|
|
2300
|
+
};
|
|
2301
|
+
}, "createStemmer");
|
|
2302
|
+
|
|
2303
|
+
export {
|
|
2304
|
+
LANGUAGES,
|
|
2305
|
+
NORMALIZER_VERSION,
|
|
2306
|
+
fold,
|
|
2307
|
+
normalize,
|
|
2308
|
+
SNOWBALL_VERSION,
|
|
2309
|
+
DEFAULT_STEMMERS,
|
|
2310
|
+
DEFAULT_STEMMERS_VERSION,
|
|
2311
|
+
STEM_SEPARATOR,
|
|
2312
|
+
analyzerIdentity,
|
|
2313
|
+
parseStemmers,
|
|
2314
|
+
createStemmer
|
|
2315
|
+
};
|