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