@leemour/cli-messaging 0.145.0 → 0.146.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.
@@ -0,0 +1,468 @@
1
+ // Generated from russian.sbl by Snowball 3.1.1 - https://snowballstem.org/
2
+
3
+ // deno-lint-ignore-file ban-unused-ignore no-constant-condition no-empty prefer-const
4
+
5
+ const a_0 = [
6
+ ["\u0432", 1],
7
+ ["\u0438\u0432", 2, 1],
8
+ ["\u044B\u0432", 2, 2],
9
+ ["\u0432\u0448\u0438", 1],
10
+ ["\u0438\u0432\u0448\u0438", 2, 1],
11
+ ["\u044B\u0432\u0448\u0438", 2, 2],
12
+ ["\u0432\u0448\u0438\u0441\u044C", 1],
13
+ ["\u0438\u0432\u0448\u0438\u0441\u044C", 2, 1],
14
+ ["\u044B\u0432\u0448\u0438\u0441\u044C", 2, 2]
15
+ ];
16
+
17
+ const a_1 = [
18
+ ["\u0435\u0435", 1],
19
+ ["\u0438\u0435", 1],
20
+ ["\u043E\u0435", 1],
21
+ ["\u044B\u0435", 1],
22
+ ["\u0438\u043C\u0438", 1],
23
+ ["\u044B\u043C\u0438", 1],
24
+ ["\u0435\u0439", 1],
25
+ ["\u0438\u0439", 1],
26
+ ["\u043E\u0439", 1],
27
+ ["\u044B\u0439", 1],
28
+ ["\u0435\u043C", 1],
29
+ ["\u0438\u043C", 1],
30
+ ["\u043E\u043C", 1],
31
+ ["\u044B\u043C", 1],
32
+ ["\u0435\u0433\u043E", 1],
33
+ ["\u043E\u0433\u043E", 1],
34
+ ["\u0435\u043C\u0443", 1],
35
+ ["\u043E\u043C\u0443", 1],
36
+ ["\u0438\u0445", 1],
37
+ ["\u044B\u0445", 1],
38
+ ["\u0435\u044E", 1],
39
+ ["\u043E\u044E", 1],
40
+ ["\u0443\u044E", 1],
41
+ ["\u044E\u044E", 1],
42
+ ["\u0430\u044F", 1],
43
+ ["\u044F\u044F", 1]
44
+ ];
45
+
46
+ const a_2 = [
47
+ ["\u0435\u043C", 1],
48
+ ["\u043D\u043D", 1],
49
+ ["\u0432\u0448", 1],
50
+ ["\u0438\u0432\u0448", 2, 1],
51
+ ["\u044B\u0432\u0448", 2, 2],
52
+ ["\u0449", 1],
53
+ ["\u044E\u0449", 1, 1],
54
+ ["\u0443\u044E\u0449", 2, 1]
55
+ ];
56
+
57
+ const a_3 = [
58
+ ["\u0441\u044C", 1],
59
+ ["\u0441\u044F", 1]
60
+ ];
61
+
62
+ const a_4 = [
63
+ ["\u043B\u0430", 1],
64
+ ["\u0438\u043B\u0430", 2, 1],
65
+ ["\u044B\u043B\u0430", 2, 2],
66
+ ["\u043D\u0430", 1],
67
+ ["\u0435\u043D\u0430", 2, 1],
68
+ ["\u0435\u0442\u0435", 1],
69
+ ["\u0438\u0442\u0435", 2],
70
+ ["\u0439\u0442\u0435", 1],
71
+ ["\u0435\u0439\u0442\u0435", 2, 1],
72
+ ["\u0443\u0439\u0442\u0435", 2, 2],
73
+ ["\u043B\u0438", 1],
74
+ ["\u0438\u043B\u0438", 2, 1],
75
+ ["\u044B\u043B\u0438", 2, 2],
76
+ ["\u0439", 1],
77
+ ["\u0435\u0439", 2, 1],
78
+ ["\u0443\u0439", 2, 2],
79
+ ["\u043B", 1],
80
+ ["\u0438\u043B", 2, 1],
81
+ ["\u044B\u043B", 2, 2],
82
+ ["\u0435\u043C", 1],
83
+ ["\u0438\u043C", 2],
84
+ ["\u044B\u043C", 2],
85
+ ["\u043D", 1],
86
+ ["\u0435\u043D", 2, 1],
87
+ ["\u043B\u043E", 1],
88
+ ["\u0438\u043B\u043E", 2, 1],
89
+ ["\u044B\u043B\u043E", 2, 2],
90
+ ["\u043D\u043E", 1],
91
+ ["\u0435\u043D\u043E", 2, 1],
92
+ ["\u043D\u043D\u043E", 1, 2],
93
+ ["\u0435\u0442", 1],
94
+ ["\u0443\u0435\u0442", 2, 1],
95
+ ["\u0438\u0442", 2],
96
+ ["\u044B\u0442", 2],
97
+ ["\u044E\u0442", 1],
98
+ ["\u0443\u044E\u0442", 2, 1],
99
+ ["\u044F\u0442", 2],
100
+ ["\u043D\u044B", 1],
101
+ ["\u0435\u043D\u044B", 2, 1],
102
+ ["\u0442\u044C", 1],
103
+ ["\u0438\u0442\u044C", 2, 1],
104
+ ["\u044B\u0442\u044C", 2, 2],
105
+ ["\u0435\u0448\u044C", 1],
106
+ ["\u0438\u0448\u044C", 2],
107
+ ["\u044E", 2],
108
+ ["\u0443\u044E", 2, 1]
109
+ ];
110
+
111
+ const a_5 = [
112
+ ["\u0430", 1],
113
+ ["\u0435\u0432", 1],
114
+ ["\u043E\u0432", 1],
115
+ ["\u0435", 1],
116
+ ["\u0438\u0435", 1, 1],
117
+ ["\u044C\u0435", 1, 2],
118
+ ["\u0438", 1],
119
+ ["\u0435\u0438", 1, 1],
120
+ ["\u0438\u0438", 1, 2],
121
+ ["\u0430\u043C\u0438", 1, 3],
122
+ ["\u044F\u043C\u0438", 1, 4],
123
+ ["\u0438\u044F\u043C\u0438", 1, 1],
124
+ ["\u0439", 1],
125
+ ["\u0435\u0439", 1, 1],
126
+ ["\u0438\u0435\u0439", 1, 1],
127
+ ["\u0438\u0439", 1, 3],
128
+ ["\u043E\u0439", 1, 4],
129
+ ["\u0430\u043C", 1],
130
+ ["\u0435\u043C", 1],
131
+ ["\u0438\u0435\u043C", 1, 1],
132
+ ["\u043E\u043C", 1],
133
+ ["\u044F\u043C", 1],
134
+ ["\u0438\u044F\u043C", 1, 1],
135
+ ["\u043E", 1],
136
+ ["\u0443", 1],
137
+ ["\u0430\u0445", 1],
138
+ ["\u044F\u0445", 1],
139
+ ["\u0438\u044F\u0445", 1, 1],
140
+ ["\u044B", 1],
141
+ ["\u044C", 1],
142
+ ["\u044E", 1],
143
+ ["\u0438\u044E", 1, 1],
144
+ ["\u044C\u044E", 1, 2],
145
+ ["\u044F", 1],
146
+ ["\u0438\u044F", 1, 1],
147
+ ["\u044C\u044F", 1, 2]
148
+ ];
149
+
150
+ const a_6 = [
151
+ ["\u043E\u0441\u0442", 1],
152
+ ["\u043E\u0441\u0442\u044C", 1]
153
+ ];
154
+
155
+ const a_7 = [
156
+ ["\u0435\u0439\u0448\u0435", 1],
157
+ ["\u043D", 2],
158
+ ["\u0435\u0439\u0448", 1],
159
+ ["\u044C", 3]
160
+ ];
161
+
162
+ const /** Array<number> */ g_v = [33, 65, 8, 232];
163
+
164
+ import B from './base-stemmer.js'
165
+
166
+ export default class extends B {
167
+
168
+ #I_p2/** number */ = 0;
169
+ #I_pV/** number */ = 0;
170
+
171
+
172
+ /** @return {boolean} */
173
+ #r_mark_regions() {
174
+ this.#I_pV = this.limit;
175
+ this.#I_p2 = this.limit;
176
+ const /** number */ v_1 = this.c;
177
+ // deno-lint-ignore no-unused-labels
178
+ lab0: {
179
+ if (!this.go_out_grouping(g_v, 1072, 1103)) break lab0;
180
+ this.c++;
181
+ this.#I_pV = this.c;
182
+ if (!this.go_in_grouping(g_v, 1072, 1103)) break lab0;
183
+ this.c++;
184
+ if (!this.go_out_grouping(g_v, 1072, 1103)) break lab0;
185
+ this.c++;
186
+ if (!this.go_in_grouping(g_v, 1072, 1103)) break lab0;
187
+ this.c++;
188
+ this.#I_p2 = this.c;
189
+ }
190
+ this.c = v_1;
191
+ return true;
192
+ }
193
+
194
+ /** @return {boolean} */
195
+ #r_perfective_gerund() {
196
+ let /** number */ a;
197
+ this.ket = this.c;
198
+ a = this.find_among_b(a_0);
199
+ if (a === 0) return false;
200
+ this.bra = this.c;
201
+ switch (a) {
202
+ case 1: {
203
+ // deno-lint-ignore no-unused-labels
204
+ lab0: {
205
+ // deno-lint-ignore no-unused-labels
206
+ lab1: {
207
+ if (!(this.eq_s_b("\u0430"))) break lab1;
208
+ break lab0;
209
+ }
210
+ if (!(this.eq_s_b("\u044F"))) return false;
211
+ }
212
+ this.slice_del();
213
+ break;
214
+ }
215
+ case 2: {
216
+ this.slice_del();
217
+ break;
218
+ }
219
+ }
220
+ return true;
221
+ }
222
+
223
+ /** @return {boolean} */
224
+ #r_adjective() {
225
+ this.ket = this.c;
226
+ if (this.find_among_b(a_1) === 0) return false;
227
+ this.bra = this.c;
228
+ this.slice_del();
229
+ return true;
230
+ }
231
+
232
+ /** @return {boolean} */
233
+ #r_adjectival() {
234
+ let /** number */ a;
235
+ if (!this.#r_adjective()) return false;
236
+ const /** number */ v_1 = this.limit - this.c;
237
+ // deno-lint-ignore no-unused-labels
238
+ lab0: {
239
+ this.ket = this.c;
240
+ a = this.find_among_b(a_2);
241
+ if (a === 0) {
242
+ this.c = this.limit - v_1;
243
+ break lab0;
244
+ }
245
+ this.bra = this.c;
246
+ switch (a) {
247
+ case 1: {
248
+ // deno-lint-ignore no-unused-labels
249
+ lab1: {
250
+ // deno-lint-ignore no-unused-labels
251
+ lab2: {
252
+ if (!(this.eq_s_b("\u0430"))) break lab2;
253
+ break lab1;
254
+ }
255
+ if (!(this.eq_s_b("\u044F"))) {
256
+ this.c = this.limit - v_1;
257
+ break lab0;
258
+ }
259
+ }
260
+ this.slice_del();
261
+ break;
262
+ }
263
+ case 2: {
264
+ this.slice_del();
265
+ break;
266
+ }
267
+ }
268
+ }
269
+ return true;
270
+ }
271
+
272
+ /** @return {boolean} */
273
+ #r_reflexive() {
274
+ this.ket = this.c;
275
+ if (this.find_among_b(a_3) === 0) return false;
276
+ this.bra = this.c;
277
+ this.slice_del();
278
+ return true;
279
+ }
280
+
281
+ /** @return {boolean} */
282
+ #r_verb() {
283
+ let /** number */ a;
284
+ this.ket = this.c;
285
+ a = this.find_among_b(a_4);
286
+ if (a === 0) return false;
287
+ this.bra = this.c;
288
+ switch (a) {
289
+ case 1: {
290
+ // deno-lint-ignore no-unused-labels
291
+ lab0: {
292
+ // deno-lint-ignore no-unused-labels
293
+ lab1: {
294
+ if (!(this.eq_s_b("\u0430"))) break lab1;
295
+ break lab0;
296
+ }
297
+ if (!(this.eq_s_b("\u044F"))) return false;
298
+ }
299
+ this.slice_del();
300
+ break;
301
+ }
302
+ case 2: {
303
+ this.slice_del();
304
+ break;
305
+ }
306
+ }
307
+ return true;
308
+ }
309
+
310
+ /** @return {boolean} */
311
+ #r_noun() {
312
+ this.ket = this.c;
313
+ if (this.find_among_b(a_5) === 0) return false;
314
+ this.bra = this.c;
315
+ this.slice_del();
316
+ return true;
317
+ }
318
+
319
+ /** @return {boolean} */
320
+ #r_derivational() {
321
+ this.ket = this.c;
322
+ if (this.find_among_b(a_6) === 0) return false;
323
+ this.bra = this.c;
324
+ if (this.#I_p2 > this.c) return false;
325
+ this.slice_del();
326
+ return true;
327
+ }
328
+
329
+ /** @return {boolean} */
330
+ #r_tidy_up() {
331
+ let /** number */ a;
332
+ this.ket = this.c;
333
+ a = this.find_among_b(a_7);
334
+ if (a === 0) return false;
335
+ this.bra = this.c;
336
+ switch (a) {
337
+ case 1: {
338
+ this.slice_del();
339
+ this.ket = this.c;
340
+ if (!(this.eq_s_b("\u043D"))) return false;
341
+ this.bra = this.c;
342
+ if (!(this.eq_s_b("\u043D"))) return false;
343
+ this.slice_del();
344
+ break;
345
+ }
346
+ case 2: {
347
+ if (!(this.eq_s_b("\u043D"))) return false;
348
+ this.slice_del();
349
+ break;
350
+ }
351
+ case 3: {
352
+ this.slice_del();
353
+ break;
354
+ }
355
+ }
356
+ return true;
357
+ }
358
+
359
+ /** @return {boolean} */
360
+ #stem() {
361
+ const /** number */ v_1 = this.c;
362
+ // deno-lint-ignore no-unused-labels
363
+ lab0: {
364
+ while (true) {
365
+ const /** number */ v_2 = this.c;
366
+ // deno-lint-ignore no-unused-labels
367
+ lab1: {
368
+ // deno-lint-ignore no-unused-labels
369
+ golab2: while (true)
370
+ {
371
+ const /** number */ v_3 = this.c;
372
+ // deno-lint-ignore no-unused-labels
373
+ lab3: {
374
+ this.bra = this.c;
375
+ if (!(this.eq_s("\u0451"))) break lab3;
376
+ this.ket = this.c;
377
+ this.c = v_3;
378
+ break golab2;
379
+ }
380
+ this.c = v_3;
381
+ if (this.c >= this.limit) break lab1;
382
+ this.c++;
383
+ }
384
+ this.slice_from("\u0435");
385
+ continue;
386
+ }
387
+ this.c = v_2;
388
+ break;
389
+ }
390
+ }
391
+ this.c = v_1;
392
+ this.#r_mark_regions();
393
+ this.limit_backward = this.c; this.c = this.limit;
394
+ if (this.c < this.#I_pV) return false;
395
+ const /** number */ v_4 = this.limit_backward;
396
+ this.limit_backward = this.#I_pV;
397
+ const /** number */ v_5 = this.limit - this.c;
398
+ // deno-lint-ignore no-unused-labels
399
+ lab4: {
400
+ // deno-lint-ignore no-unused-labels
401
+ lab5: {
402
+ const /** number */ v_6 = this.limit - this.c;
403
+ // deno-lint-ignore no-unused-labels
404
+ lab6: {
405
+ if (!this.#r_perfective_gerund()) break lab6;
406
+ break lab5;
407
+ }
408
+ this.c = this.limit - v_6;
409
+ const /** number */ v_7 = this.limit - this.c;
410
+ // deno-lint-ignore no-unused-labels
411
+ lab7: {
412
+ if (!this.#r_reflexive()) {
413
+ this.c = this.limit - v_7;
414
+ break lab7;
415
+ }
416
+ }
417
+ // deno-lint-ignore no-unused-labels
418
+ lab8: {
419
+ const /** number */ v_8 = this.limit - this.c;
420
+ // deno-lint-ignore no-unused-labels
421
+ lab9: {
422
+ if (!this.#r_adjectival()) break lab9;
423
+ break lab8;
424
+ }
425
+ this.c = this.limit - v_8;
426
+ // deno-lint-ignore no-unused-labels
427
+ lab10: {
428
+ if (!this.#r_verb()) break lab10;
429
+ break lab8;
430
+ }
431
+ this.c = this.limit - v_8;
432
+ if (!this.#r_noun()) break lab4;
433
+ }
434
+ }
435
+ }
436
+ this.c = this.limit - v_5;
437
+ const /** number */ v_9 = this.limit - this.c;
438
+ // deno-lint-ignore no-unused-labels
439
+ lab11: {
440
+ this.ket = this.c;
441
+ if (!(this.eq_s_b("\u0438"))) {
442
+ this.c = this.limit - v_9;
443
+ break lab11;
444
+ }
445
+ this.bra = this.c;
446
+ this.slice_del();
447
+ }
448
+ const /** number */ v_10 = this.limit - this.c;
449
+ this.#r_derivational();
450
+ this.c = this.limit - v_10;
451
+ const /** number */ v_11 = this.limit - this.c;
452
+ this.#r_tidy_up();
453
+ this.c = this.limit - v_11;
454
+ this.limit_backward = v_4;
455
+ this.c = this.limit_backward;
456
+ return true;
457
+ }
458
+
459
+ /**@return{string}*/
460
+ stem(/**string*/input) {
461
+ this.setCurrent(input);
462
+ this.#stem();
463
+ return this.getCurrent();
464
+ }
465
+
466
+ stemWord = this.stem;
467
+ }
468
+