-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathstemmer.java
executable file
·495 lines (481 loc) · 20.3 KB
/
stemmer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
// This file was generated automatically by the Snowball to Java compiler
package org.cbsean.analizer;
import org.tartarus.snowball.Among;
/**
* This class was automatically generated by a Snowball to Java compiler
* It implements the stemming algorithm defined by a snowball script.
*/
public class ArmenianStemmer extends org.tartarus.snowball.SnowballProgram {
private static final long serialVersionUID = 1L;
private final static ArmenianStemmer methodObject = new ArmenianStemmer();
private final static Among a_0[] = {
new Among("\u0580\u0578\u0580\u0564", -1, 1, "", methodObject),
new Among("\u0565\u0580\u0578\u0580\u0564", 0, 1, "", methodObject),
new Among("\u0561\u056C\u056B", -1, 1, "", methodObject),
new Among("\u0561\u056F\u056B", -1, 1, "", methodObject),
new Among("\u0578\u0580\u0561\u056F", -1, 1, "", methodObject),
new Among("\u0565\u0572", -1, 1, "", methodObject),
new Among("\u0561\u056F\u0561\u0576", -1, 1, "", methodObject),
new Among("\u0561\u0580\u0561\u0576", -1, 1, "", methodObject),
new Among("\u0565\u0576", -1, 1, "", methodObject),
new Among("\u0565\u056F\u0565\u0576", 8, 1, "", methodObject),
new Among("\u0565\u0580\u0565\u0576", 8, 1, "", methodObject),
new Among("\u0578\u0580\u0567\u0576", -1, 1, "", methodObject),
new Among("\u056B\u0576", -1, 1, "", methodObject),
new Among("\u0563\u056B\u0576", 12, 1, "", methodObject),
new Among("\u0578\u057E\u056B\u0576", 12, 1, "", methodObject),
new Among("\u056C\u0561\u0575\u0576", -1, 1, "", methodObject),
new Among("\u057E\u0578\u0582\u0576", -1, 1, "", methodObject),
new Among("\u057A\u0565\u057D", -1, 1, "", methodObject),
new Among("\u056B\u057E", -1, 1, "", methodObject),
new Among("\u0561\u057F", -1, 1, "", methodObject),
new Among("\u0561\u057E\u0565\u057F", -1, 1, "", methodObject),
new Among("\u056F\u0578\u057F", -1, 1, "", methodObject),
new Among("\u0562\u0561\u0580", -1, 1, "", methodObject)
};
private final static Among a_1[] = {
new Among("\u0561", -1, 1, "", methodObject),
new Among("\u0561\u0581\u0561", 0, 1, "", methodObject),
new Among("\u0565\u0581\u0561", 0, 1, "", methodObject),
new Among("\u057E\u0565", -1, 1, "", methodObject),
new Among("\u0561\u0581\u0580\u056B", -1, 1, "", methodObject),
new Among("\u0561\u0581\u056B", -1, 1, "", methodObject),
new Among("\u0565\u0581\u056B", -1, 1, "", methodObject),
new Among("\u057E\u0565\u0581\u056B", 6, 1, "", methodObject),
new Among("\u0561\u056C", -1, 1, "", methodObject),
new Among("\u0568\u0561\u056C", 8, 1, "", methodObject),
new Among("\u0561\u0576\u0561\u056C", 8, 1, "", methodObject),
new Among("\u0565\u0576\u0561\u056C", 8, 1, "", methodObject),
new Among("\u0561\u0581\u0576\u0561\u056C", 8, 1, "", methodObject),
new Among("\u0565\u056C", -1, 1, "", methodObject),
new Among("\u0568\u0565\u056C", 13, 1, "", methodObject),
new Among("\u0576\u0565\u056C", 13, 1, "", methodObject),
new Among("\u0581\u0576\u0565\u056C", 15, 1, "", methodObject),
new Among("\u0565\u0581\u0576\u0565\u056C", 16, 1, "", methodObject),
new Among("\u0579\u0565\u056C", 13, 1, "", methodObject),
new Among("\u057E\u0565\u056C", 13, 1, "", methodObject),
new Among("\u0561\u0581\u057E\u0565\u056C", 19, 1, "", methodObject),
new Among("\u0565\u0581\u057E\u0565\u056C", 19, 1, "", methodObject),
new Among("\u057F\u0565\u056C", 13, 1, "", methodObject),
new Among("\u0561\u057F\u0565\u056C", 22, 1, "", methodObject),
new Among("\u0578\u057F\u0565\u056C", 22, 1, "", methodObject),
new Among("\u056F\u0578\u057F\u0565\u056C", 24, 1, "", methodObject),
new Among("\u057E\u0561\u056E", -1, 1, "", methodObject),
new Among("\u0578\u0582\u0574", -1, 1, "", methodObject),
new Among("\u057E\u0578\u0582\u0574", 27, 1, "", methodObject),
new Among("\u0561\u0576", -1, 1, "", methodObject),
new Among("\u0581\u0561\u0576", 29, 1, "", methodObject),
new Among("\u0561\u0581\u0561\u0576", 30, 1, "", methodObject),
new Among("\u0561\u0581\u0580\u056B\u0576", -1, 1, "", methodObject),
new Among("\u0561\u0581\u056B\u0576", -1, 1, "", methodObject),
new Among("\u0565\u0581\u056B\u0576", -1, 1, "", methodObject),
new Among("\u057E\u0565\u0581\u056B\u0576", 34, 1, "", methodObject),
new Among("\u0561\u056C\u056B\u057D", -1, 1, "", methodObject),
new Among("\u0565\u056C\u056B\u057D", -1, 1, "", methodObject),
new Among("\u0561\u057E", -1, 1, "", methodObject),
new Among("\u0561\u0581\u0561\u057E", 38, 1, "", methodObject),
new Among("\u0565\u0581\u0561\u057E", 38, 1, "", methodObject),
new Among("\u0561\u056C\u0578\u057E", -1, 1, "", methodObject),
new Among("\u0565\u056C\u0578\u057E", -1, 1, "", methodObject),
new Among("\u0561\u0580", -1, 1, "", methodObject),
new Among("\u0561\u0581\u0561\u0580", 43, 1, "", methodObject),
new Among("\u0565\u0581\u0561\u0580", 43, 1, "", methodObject),
new Among("\u0561\u0581\u0580\u056B\u0580", -1, 1, "", methodObject),
new Among("\u0561\u0581\u056B\u0580", -1, 1, "", methodObject),
new Among("\u0565\u0581\u056B\u0580", -1, 1, "", methodObject),
new Among("\u057E\u0565\u0581\u056B\u0580", 48, 1, "", methodObject),
new Among("\u0561\u0581", -1, 1, "", methodObject),
new Among("\u0565\u0581", -1, 1, "", methodObject),
new Among("\u0561\u0581\u0580\u0565\u0581", 51, 1, "", methodObject),
new Among("\u0561\u056C\u0578\u0582\u0581", -1, 1, "", methodObject),
new Among("\u0565\u056C\u0578\u0582\u0581", -1, 1, "", methodObject),
new Among("\u0561\u056C\u0578\u0582", -1, 1, "", methodObject),
new Among("\u0565\u056C\u0578\u0582", -1, 1, "", methodObject),
new Among("\u0561\u0584", -1, 1, "", methodObject),
new Among("\u0581\u0561\u0584", 57, 1, "", methodObject),
new Among("\u0561\u0581\u0561\u0584", 58, 1, "", methodObject),
new Among("\u0561\u0581\u0580\u056B\u0584", -1, 1, "", methodObject),
new Among("\u0561\u0581\u056B\u0584", -1, 1, "", methodObject),
new Among("\u0565\u0581\u056B\u0584", -1, 1, "", methodObject),
new Among("\u057E\u0565\u0581\u056B\u0584", 62, 1, "", methodObject),
new Among("\u0561\u0576\u0584", -1, 1, "", methodObject),
new Among("\u0581\u0561\u0576\u0584", 64, 1, "", methodObject),
new Among("\u0561\u0581\u0561\u0576\u0584", 65, 1, "", methodObject),
new Among("\u0561\u0581\u0580\u056B\u0576\u0584", -1, 1, "", methodObject),
new Among("\u0561\u0581\u056B\u0576\u0584", -1, 1, "", methodObject),
new Among("\u0565\u0581\u056B\u0576\u0584", -1, 1, "", methodObject),
new Among("\u057E\u0565\u0581\u056B\u0576\u0584", 69, 1, "", methodObject)
};
private final static Among a_2[] = {
new Among("\u0578\u0580\u0564", -1, 1, "", methodObject),
new Among("\u0578\u0582\u0575\u0569", -1, 1, "", methodObject),
new Among("\u0578\u0582\u0570\u056B", -1, 1, "", methodObject),
new Among("\u0581\u056B", -1, 1, "", methodObject),
new Among("\u056B\u056C", -1, 1, "", methodObject),
new Among("\u0561\u056F", -1, 1, "", methodObject),
new Among("\u0575\u0561\u056F", 5, 1, "", methodObject),
new Among("\u0561\u0576\u0561\u056F", 5, 1, "", methodObject),
new Among("\u056B\u056F", -1, 1, "", methodObject),
new Among("\u0578\u0582\u056F", -1, 1, "", methodObject),
new Among("\u0561\u0576", -1, 1, "", methodObject),
new Among("\u057A\u0561\u0576", 10, 1, "", methodObject),
new Among("\u057D\u057F\u0561\u0576", 10, 1, "", methodObject),
new Among("\u0561\u0580\u0561\u0576", 10, 1, "", methodObject),
new Among("\u0575\u0578\u0582\u0576", -1, 1, "", methodObject),
new Among("\u0578\u0582\u0569\u0575\u0578\u0582\u0576", 15, 1, "", methodObject),
new Among("\u0561\u056E\u0578", -1, 1, "", methodObject),
new Among("\u056B\u0579", -1, 1, "", methodObject),
new Among("\u0578\u0582\u057D", -1, 1, "", methodObject),
new Among("\u0578\u0582\u057D\u057F", -1, 1, "", methodObject),
new Among("\u0563\u0561\u0580", -1, 1, "", methodObject),
new Among("\u057E\u0578\u0580", -1, 1, "", methodObject),
new Among("\u0561\u057E\u0578\u0580", 22, 1, "", methodObject),
new Among("\u0578\u0581", -1, 1, "", methodObject),
new Among("\u0561\u0576\u0585\u0581", -1, 1, "", methodObject),
new Among("\u0578\u0582", -1, 1, "", methodObject),
new Among("\u0584", -1, 1, "", methodObject),
new Among("\u0579\u0565\u0584", 27, 1, "", methodObject),
new Among("\u056B\u0584", 27, 1, "", methodObject),
new Among("\u0561\u056C\u056B\u0584", 29, 1, "", methodObject),
new Among("\u0561\u0576\u056B\u0584", 29, 1, "", methodObject),
new Among("\u057E\u0561\u056E\u0584", 27, 1, "", methodObject),
new Among("\u0578\u0582\u0575\u0584", 27, 1, "", methodObject),
new Among("\u0565\u0576\u0584", 27, 1, "", methodObject),
new Among("\u0578\u0576\u0584", 27, 1, "", methodObject),
new Among("\u0578\u0582\u0576\u0584", 27, 1, "", methodObject),
new Among("\u0574\u0578\u0582\u0576\u0584", 36, 1, "", methodObject),
new Among("\u056B\u0579\u0584", 27, 1, "", methodObject),
new Among("\u0561\u0580\u0584", 27, 1, "", methodObject),
new Among("\u0565\u0572\u0567\u0576", -1, 1, "", methodObject)
};
private final static Among a_3[] = {
new Among("\u057D\u0561", -1, 1, "", methodObject),
new Among("\u057E\u0561", -1, 1, "", methodObject),
new Among("\u0561\u0574\u0562", -1, 1, "", methodObject),
new Among("\u0564", -1, 1, "", methodObject),
new Among("\u0561\u0576\u0564", 3, 1, "", methodObject),
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u0564", 4, 1, "", methodObject),
new Among("\u057E\u0561\u0576\u0564", 4, 1, "", methodObject),
new Among("\u0578\u057B\u0564", 3, 1, "", methodObject),
new Among("\u0565\u0580\u0564", 3, 1, "", methodObject),
new Among("\u0576\u0565\u0580\u0564", 8, 1, "", methodObject),
new Among("\u0578\u0582\u0564", 3, 1, "", methodObject),
new Among("\u0568", -1, 1, "", methodObject),
new Among("\u0561\u0576\u0568", 11, 1, "", methodObject),
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u0568", 12, 1, "", methodObject),
new Among("\u057E\u0561\u0576\u0568", 12, 1, "", methodObject),
new Among("\u0578\u057B\u0568", 11, 1, "", methodObject),
new Among("\u0565\u0580\u0568", 11, 1, "", methodObject),
new Among("\u0576\u0565\u0580\u0568", 16, 1, "", methodObject),
new Among("\u056B", -1, 1, "", methodObject),
new Among("\u057E\u056B", 18, 1, "", methodObject),
new Among("\u0565\u0580\u056B", 18, 1, "", methodObject),
new Among("\u0576\u0565\u0580\u056B", 20, 1, "", methodObject),
new Among("\u0561\u0576\u0578\u0582\u0574", -1, 1, "", methodObject),
new Among("\u0565\u0580\u0578\u0582\u0574", -1, 1, "", methodObject),
new Among("\u0576\u0565\u0580\u0578\u0582\u0574", 23, 1, "", methodObject),
new Among("\u0576", -1, 1, "", methodObject),
new Among("\u0561\u0576", 25, 1, "", methodObject),
new Among("\u0578\u0582\u0569\u0575\u0561\u0576", 26, 1, "", methodObject),
new Among("\u057E\u0561\u0576", 26, 1, "", methodObject),
new Among("\u056B\u0576", 25, 1, "", methodObject),
new Among("\u0565\u0580\u056B\u0576", 29, 1, "", methodObject),
new Among("\u0576\u0565\u0580\u056B\u0576", 30, 1, "", methodObject),
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u0576", 25, 1, "", methodObject),
new Among("\u0565\u0580\u0576", 25, 1, "", methodObject),
new Among("\u0576\u0565\u0580\u0576", 33, 1, "", methodObject),
new Among("\u0578\u0582\u0576", 25, 1, "", methodObject),
new Among("\u0578\u057B", -1, 1, "", methodObject),
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u057D", -1, 1, "", methodObject),
new Among("\u057E\u0561\u0576\u057D", -1, 1, "", methodObject),
new Among("\u0578\u057B\u057D", -1, 1, "", methodObject),
new Among("\u0578\u057E", -1, 1, "", methodObject),
new Among("\u0561\u0576\u0578\u057E", 40, 1, "", methodObject),
new Among("\u057E\u0578\u057E", 40, 1, "", methodObject),
new Among("\u0565\u0580\u0578\u057E", 40, 1, "", methodObject),
new Among("\u0576\u0565\u0580\u0578\u057E", 43, 1, "", methodObject),
new Among("\u0565\u0580", -1, 1, "", methodObject),
new Among("\u0576\u0565\u0580", 45, 1, "", methodObject),
new Among("\u0581", -1, 1, "", methodObject),
new Among("\u056B\u0581", 47, 1, "", methodObject),
new Among("\u057E\u0561\u0576\u056B\u0581", 48, 1, "", methodObject),
new Among("\u0578\u057B\u056B\u0581", 48, 1, "", methodObject),
new Among("\u057E\u056B\u0581", 48, 1, "", methodObject),
new Among("\u0565\u0580\u056B\u0581", 48, 1, "", methodObject),
new Among("\u0576\u0565\u0580\u056B\u0581", 52, 1, "", methodObject),
new Among("\u0581\u056B\u0581", 48, 1, "", methodObject),
new Among("\u0578\u0581", 47, 1, "", methodObject),
new Among("\u0578\u0582\u0581", 47, 1, "", methodObject)
};
private static final char g_v[] = {209, 4, 128, 0, 18};
private int I_p2;
private int I_pV;
private void copy_from(ArmenianStemmer other) {
I_p2 = other.I_p2;
I_pV = other.I_pV;
super.copy_from(other);
}
private boolean r_mark_regions() {
int v_1;
// (, line 58
I_pV = limit;
I_p2 = limit;
// do, line 62
v_1 = cursor;
lab0:
do {
// (, line 62
// gopast, line 63
golab1:
while (true) {
lab2:
do {
if (!(in_grouping(g_v, 1377, 1413))) {
break lab2;
}
break golab1;
} while (false);
if (cursor >= limit) {
break lab0;
}
cursor++;
}
// setmark pV, line 63
I_pV = cursor;
// gopast, line 63
golab3:
while (true) {
lab4:
do {
if (!(out_grouping(g_v, 1377, 1413))) {
break lab4;
}
break golab3;
} while (false);
if (cursor >= limit) {
break lab0;
}
cursor++;
}
// gopast, line 64
golab5:
while (true) {
lab6:
do {
if (!(in_grouping(g_v, 1377, 1413))) {
break lab6;
}
break golab5;
} while (false);
if (cursor >= limit) {
break lab0;
}
cursor++;
}
// gopast, line 64
golab7:
while (true) {
lab8:
do {
if (!(out_grouping(g_v, 1377, 1413))) {
break lab8;
}
break golab7;
} while (false);
if (cursor >= limit) {
break lab0;
}
cursor++;
}
// setmark p2, line 64
I_p2 = cursor;
} while (false);
cursor = v_1;
return true;
}
private boolean r_R2() {
if (!(I_p2 <= cursor)) {
return false;
}
return true;
}
private boolean r_adjective() {
int among_var;
// (, line 72
// [, line 73
ket = cursor;
// substring, line 73
among_var = find_among_b(a_0, 23);
if (among_var == 0) {
return false;
}
// ], line 73
bra = cursor;
switch (among_var) {
case 0:
return false;
case 1:
// (, line 98
// delete, line 98
slice_del();
break;
}
return true;
}
private boolean r_verb() {
int among_var;
// (, line 102
// [, line 103
ket = cursor;
// substring, line 103
among_var = find_among_b(a_1, 71);
if (among_var == 0) {
return false;
}
// ], line 103
bra = cursor;
switch (among_var) {
case 0:
return false;
case 1:
// (, line 176
// delete, line 176
slice_del();
break;
}
return true;
}
private boolean r_noun() {
int among_var;
// (, line 180
// [, line 181
ket = cursor;
// substring, line 181
among_var = find_among_b(a_2, 40);
if (among_var == 0) {
return false;
}
// ], line 181
bra = cursor;
switch (among_var) {
case 0:
return false;
case 1:
// (, line 223
// delete, line 223
slice_del();
break;
}
return true;
}
private boolean r_ending() {
int among_var;
// (, line 227
// [, line 228
ket = cursor;
// substring, line 228
among_var = find_among_b(a_3, 57);
if (among_var == 0) {
return false;
}
// ], line 228
bra = cursor;
// call R2, line 228
if (!r_R2()) {
return false;
}
switch (among_var) {
case 0:
return false;
case 1:
// (, line 287
// delete, line 287
slice_del();
break;
}
return true;
}
public boolean stem() {
int v_1;
int v_2;
int v_3;
int v_4;
int v_5;
int v_6;
int v_7;
// (, line 292
// do, line 294
v_1 = cursor;
lab0:
do {
// call mark_regions, line 294
if (!r_mark_regions()) {
break lab0;
}
} while (false);
cursor = v_1;
// backwards, line 295
limit_backward = cursor;
cursor = limit;
// setlimit, line 295
v_2 = limit - cursor;
// tomark, line 295
if (cursor < I_pV) {
return false;
}
cursor = I_pV;
v_3 = limit_backward;
limit_backward = cursor;
cursor = limit - v_2;
// (, line 295
// do, line 296
v_4 = limit - cursor;
lab1:
do {
// call ending, line 296
if (!r_ending()) {
break lab1;
}
} while (false);
cursor = limit - v_4;
// do, line 297
v_5 = limit - cursor;
lab2:
do {
// call verb, line 297
if (!r_verb()) {
break lab2;
}
} while (false);
cursor = limit - v_5;
// do, line 298
v_6 = limit - cursor;
lab3:
do {
// call adjective, line 298
if (!r_adjective()) {
break lab3;
}
} while (false);
cursor = limit - v_6;
// do, line 299
v_7 = limit - cursor;
lab4:
do {
// call noun, line 299
if (!r_noun()) {
break lab4;
}
} while (false);
cursor = limit - v_7;
limit_backward = v_3;
cursor = limit_backward;
return true;
}
public boolean equals(Object o) {
return o instanceof ArmenianStemmer;
}
public int hashCode() {
return ArmenianStemmer.class.getName().hashCode();
}
}