@delali/narsil 0.1.14 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +54 -0
- package/README.md +38 -972
- package/dist/adapters/filesystem.mjs +1 -1
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/{chunk-WISGW24C.mjs → chunk-AUMKFYTG.mjs} +1 -1
- package/dist/{chunk-HRABJLPB.mjs → chunk-BKAI2WXI.mjs} +1 -0
- package/dist/chunk-GHJWC2E5.mjs +9 -0
- package/dist/chunk-KH3YGMVT.mjs +15 -0
- package/dist/{chunk-ALB35PRQ.mjs → chunk-M2EDG55Y.mjs} +8 -0
- package/dist/{chunk-HMO6OMZ3.mjs → chunk-S6IAXOBA.mjs} +1073 -506
- package/dist/chunk-TGP5M5R7.mjs +880 -0
- package/dist/chunk-U2BKYEC7.mjs +254 -0
- package/dist/{chunk-MEW7HD75.mjs → chunk-XAKNSWIK.mjs} +2543 -1154
- package/dist/{config-CojEPOgS.d.ts → config-P27AtSn4.d.ts} +28 -7
- package/dist/direct-executor-2FV3MEDD.mjs +5 -0
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/etcd.mjs +2 -2
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution.d.ts +10 -4
- package/dist/distribution.mjs +1875 -1772
- package/dist/embeddings/openai.mjs +1 -1
- package/dist/index.browser.mjs +4566 -1783
- package/dist/index.d.ts +14 -5
- package/dist/index.mjs +6 -5
- package/dist/{language-ONQ3iVDf.d.ts → language-CmJBHf1j.d.ts} +4 -1
- package/dist/languages/albanian.d.ts +5 -0
- package/dist/languages/albanian.mjs +103 -0
- package/dist/languages/amharic.d.ts +5 -0
- package/dist/languages/amharic.mjs +240 -0
- package/dist/languages/arabic.d.ts +1 -1
- package/dist/languages/arabic.mjs +939 -154
- package/dist/languages/armenian.d.ts +1 -1
- package/dist/languages/armenian.mjs +275 -243
- package/dist/languages/azerbaijani.d.ts +5 -0
- package/dist/languages/azerbaijani.mjs +152 -0
- package/dist/languages/bambara.d.ts +5 -0
- package/dist/languages/bambara.mjs +60 -0
- package/dist/languages/basque.d.ts +5 -0
- package/dist/languages/basque.mjs +726 -0
- package/dist/languages/belarusian.d.ts +5 -0
- package/dist/languages/belarusian.mjs +100 -0
- package/dist/languages/bengali.d.ts +5 -0
- package/dist/languages/bengali.mjs +128 -0
- package/dist/languages/bosnian.d.ts +5 -0
- package/dist/languages/bosnian.mjs +197 -0
- package/dist/languages/breton.d.ts +5 -0
- package/dist/languages/breton.mjs +96 -0
- package/dist/languages/bulgarian.d.ts +1 -1
- package/dist/languages/bulgarian.mjs +11 -2
- package/dist/languages/burmese.d.ts +5 -0
- package/dist/languages/burmese.mjs +57 -0
- package/dist/languages/catalan.d.ts +5 -0
- package/dist/languages/catalan.mjs +987 -0
- package/dist/languages/chinese.d.ts +1 -1
- package/dist/languages/chinese.mjs +4 -3
- package/dist/languages/croatian.d.ts +5 -0
- package/dist/languages/croatian.mjs +191 -0
- package/dist/languages/czech.d.ts +5 -0
- package/dist/languages/czech.mjs +628 -0
- package/dist/languages/dagbani.d.ts +1 -1
- package/dist/languages/dagbani.mjs +11 -2
- package/dist/languages/danish.d.ts +1 -1
- package/dist/languages/danish.mjs +215 -110
- package/dist/languages/dutch.d.ts +1 -1
- package/dist/languages/dutch.mjs +1248 -163
- package/dist/languages/english.d.ts +1 -1
- package/dist/languages/english.mjs +2 -1
- package/dist/languages/esperanto.d.ts +5 -0
- package/dist/languages/esperanto.mjs +689 -0
- package/dist/languages/estonian.d.ts +5 -0
- package/dist/languages/estonian.mjs +2160 -0
- package/dist/languages/ewe.d.ts +1 -1
- package/dist/languages/ewe.mjs +11 -2
- package/dist/languages/faroese.d.ts +5 -0
- package/dist/languages/faroese.mjs +93 -0
- package/dist/languages/fijian.d.ts +5 -0
- package/dist/languages/fijian.mjs +55 -0
- package/dist/languages/finnish.d.ts +1 -1
- package/dist/languages/finnish.mjs +528 -263
- package/dist/languages/french.d.ts +1 -1
- package/dist/languages/french.mjs +950 -437
- package/dist/languages/ga.d.ts +1 -1
- package/dist/languages/ga.mjs +2 -1
- package/dist/languages/galician.d.ts +5 -0
- package/dist/languages/galician.mjs +172 -0
- package/dist/languages/georgian.d.ts +5 -0
- package/dist/languages/georgian.mjs +91 -0
- package/dist/languages/german.d.ts +1 -1
- package/dist/languages/german.mjs +432 -162
- package/dist/languages/greek.d.ts +1 -1
- package/dist/languages/greek.mjs +1970 -281
- package/dist/languages/guarani.d.ts +5 -0
- package/dist/languages/guarani.mjs +132 -0
- package/dist/languages/gujarati.d.ts +5 -0
- package/dist/languages/gujarati.mjs +234 -0
- package/dist/languages/haitian-creole.d.ts +5 -0
- package/dist/languages/haitian-creole.mjs +106 -0
- package/dist/languages/hausa.d.ts +1 -1
- package/dist/languages/hausa.mjs +2 -1
- package/dist/languages/hawaiian.d.ts +5 -0
- package/dist/languages/hawaiian.mjs +69 -0
- package/dist/languages/hebrew.d.ts +5 -0
- package/dist/languages/hebrew.mjs +213 -0
- package/dist/languages/hindi.d.ts +1 -1
- package/dist/languages/hindi.mjs +175 -97
- package/dist/languages/hungarian.d.ts +1 -1
- package/dist/languages/hungarian.mjs +412 -326
- package/dist/languages/icelandic.d.ts +5 -0
- package/dist/languages/icelandic.mjs +161 -0
- package/dist/languages/igbo.d.ts +1 -1
- package/dist/languages/igbo.mjs +2 -1
- package/dist/languages/indonesian.d.ts +1 -1
- package/dist/languages/indonesian.mjs +329 -137
- package/dist/languages/irish.d.ts +1 -1
- package/dist/languages/irish.mjs +223 -139
- package/dist/languages/italian.d.ts +1 -1
- package/dist/languages/italian.mjs +703 -406
- package/dist/languages/japanese.d.ts +1 -1
- package/dist/languages/japanese.mjs +5 -108
- package/dist/languages/kannada.d.ts +5 -0
- package/dist/languages/kannada.mjs +94 -0
- package/dist/languages/kazakh.d.ts +5 -0
- package/dist/languages/kazakh.mjs +90 -0
- package/dist/languages/khmer.d.ts +5 -0
- package/dist/languages/khmer.mjs +181 -0
- package/dist/languages/kinyarwanda.d.ts +5 -0
- package/dist/languages/kinyarwanda.mjs +99 -0
- package/dist/languages/kirundi.d.ts +5 -0
- package/dist/languages/kirundi.mjs +92 -0
- package/dist/languages/korean.d.ts +5 -0
- package/dist/languages/korean.mjs +252 -0
- package/dist/languages/kurmanji.d.ts +5 -0
- package/dist/languages/kurmanji.mjs +50 -0
- package/dist/languages/kyrgyz.d.ts +5 -0
- package/dist/languages/kyrgyz.mjs +108 -0
- package/dist/languages/lao.d.ts +5 -0
- package/dist/languages/lao.mjs +63 -0
- package/dist/languages/latin.d.ts +5 -0
- package/dist/languages/latin.mjs +69 -0
- package/dist/languages/latvian.d.ts +5 -0
- package/dist/languages/latvian.mjs +173 -0
- package/dist/languages/lingala.d.ts +5 -0
- package/dist/languages/lingala.mjs +61 -0
- package/dist/languages/lithuanian.d.ts +5 -0
- package/dist/languages/lithuanian.mjs +571 -0
- package/dist/languages/luxembourgish.d.ts +5 -0
- package/dist/languages/luxembourgish.mjs +214 -0
- package/dist/languages/macedonian.d.ts +5 -0
- package/dist/languages/macedonian.mjs +808 -0
- package/dist/languages/malagasy.d.ts +5 -0
- package/dist/languages/malagasy.mjs +67 -0
- package/dist/languages/malay.d.ts +5 -0
- package/dist/languages/malay.mjs +482 -0
- package/dist/languages/malayalam.d.ts +5 -0
- package/dist/languages/malayalam.mjs +122 -0
- package/dist/languages/maltese.d.ts +5 -0
- package/dist/languages/maltese.mjs +139 -0
- package/dist/languages/maori.d.ts +5 -0
- package/dist/languages/maori.mjs +79 -0
- package/dist/languages/marathi.d.ts +5 -0
- package/dist/languages/marathi.mjs +111 -0
- package/dist/languages/nepali.d.ts +1 -1
- package/dist/languages/nepali.mjs +209 -99
- package/dist/languages/norwegian.d.ts +1 -1
- package/dist/languages/norwegian.mjs +218 -85
- package/dist/languages/oromo.d.ts +5 -0
- package/dist/languages/oromo.mjs +78 -0
- package/dist/languages/persian.d.ts +5 -0
- package/dist/languages/persian.mjs +710 -0
- package/dist/languages/polish.d.ts +5 -0
- package/dist/languages/polish.mjs +614 -0
- package/dist/languages/portuguese.d.ts +1 -1
- package/dist/languages/portuguese.mjs +613 -380
- package/dist/languages/punjabi.d.ts +5 -0
- package/dist/languages/punjabi.mjs +197 -0
- package/dist/languages/romanian.d.ts +1 -1
- package/dist/languages/romanian.mjs +561 -382
- package/dist/languages/russian.d.ts +1 -1
- package/dist/languages/russian.mjs +373 -244
- package/dist/languages/samoan.d.ts +5 -0
- package/dist/languages/samoan.mjs +63 -0
- package/dist/languages/sanskrit.d.ts +1 -1
- package/dist/languages/sanskrit.mjs +2 -2
- package/dist/languages/scottish-gaelic.d.ts +5 -0
- package/dist/languages/scottish-gaelic.mjs +370 -0
- package/dist/languages/serbian.d.ts +1 -1
- package/dist/languages/serbian.mjs +3635 -155
- package/dist/languages/shona.d.ts +5 -0
- package/dist/languages/shona.mjs +91 -0
- package/dist/languages/sinhala.d.ts +5 -0
- package/dist/languages/sinhala.mjs +182 -0
- package/dist/languages/slovak.d.ts +5 -0
- package/dist/languages/slovak.mjs +430 -0
- package/dist/languages/slovenian.d.ts +1 -1
- package/dist/languages/slovenian.mjs +11 -2
- package/dist/languages/sorani.d.ts +5 -0
- package/dist/languages/sorani.mjs +156 -0
- package/dist/languages/spanish.d.ts +1 -1
- package/dist/languages/spanish.mjs +676 -374
- package/dist/languages/swahili.d.ts +1 -1
- package/dist/languages/swahili.mjs +2 -1
- package/dist/languages/swedish.d.ts +1 -1
- package/dist/languages/swedish.mjs +237 -95
- package/dist/languages/tagalog.d.ts +5 -0
- package/dist/languages/tagalog.mjs +159 -0
- package/dist/languages/tamil.d.ts +1 -1
- package/dist/languages/tamil.mjs +836 -64
- package/dist/languages/tatar.d.ts +5 -0
- package/dist/languages/tatar.mjs +1017 -0
- package/dist/languages/telugu.d.ts +5 -0
- package/dist/languages/telugu.mjs +62 -0
- package/dist/languages/thai.d.ts +5 -0
- package/dist/languages/thai.mjs +65 -0
- package/dist/languages/tibetan.d.ts +5 -0
- package/dist/languages/tibetan.mjs +119 -0
- package/dist/languages/tigrinya.d.ts +5 -0
- package/dist/languages/tigrinya.mjs +194 -0
- package/dist/languages/tongan.d.ts +5 -0
- package/dist/languages/tongan.mjs +56 -0
- package/dist/languages/turkish.d.ts +1 -1
- package/dist/languages/turkish.mjs +1246 -393
- package/dist/languages/twi.d.ts +1 -1
- package/dist/languages/twi.mjs +13 -2
- package/dist/languages/ukrainian.d.ts +1 -1
- package/dist/languages/ukrainian.mjs +125 -47
- package/dist/languages/urdu.d.ts +5 -0
- package/dist/languages/urdu.mjs +528 -0
- package/dist/languages/vietnamese.d.ts +5 -0
- package/dist/languages/vietnamese.mjs +277 -0
- package/dist/languages/welsh.d.ts +5 -0
- package/dist/languages/welsh.mjs +446 -0
- package/dist/languages/wolof.d.ts +5 -0
- package/dist/languages/wolof.mjs +79 -0
- package/dist/languages/xhosa.d.ts +5 -0
- package/dist/languages/xhosa.mjs +95 -0
- package/dist/languages/yoruba.d.ts +1 -1
- package/dist/languages/yoruba.mjs +1 -0
- package/dist/languages/zulu.d.ts +1 -1
- package/dist/languages/zulu.mjs +2 -1
- package/dist/narsil-CMZRPDlQ.d.ts +159 -0
- package/dist/persistence/durability/checkpoint-worker.d.ts +13 -0
- package/dist/persistence/durability/checkpoint-worker.mjs +6 -5
- package/dist/{schema-DCgkO1j4.d.ts → schema-BnvLvjRp.d.ts} +5 -3
- package/dist/server.d.ts +12 -3
- package/dist/server.mjs +183 -64
- package/dist/{types-DHX6zGeD.d.ts → types-BRTcBgAp.d.ts} +1 -1
- package/dist/workers/entry.mjs +2 -2
- package/package.json +10 -3
- package/dist/chunk-TW6BXTOL.mjs +0 -338
- package/dist/direct-executor-E52FFGDE.mjs +0 -4
- package/dist/narsil-D-84Nvm4.d.ts +0 -72
|
@@ -1,426 +1,1278 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
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
|
-
|
|
1
|
+
import { BaseStemmer } from '../chunk-U2BKYEC7.mjs';
|
|
2
|
+
|
|
3
|
+
// src/languages/snowball/turkish.ts
|
|
4
|
+
var a_0 = [
|
|
5
|
+
["m", -1],
|
|
6
|
+
["n", -1],
|
|
7
|
+
["miz", -1],
|
|
8
|
+
["niz", -1],
|
|
9
|
+
["muz", -1],
|
|
10
|
+
["nuz", -1],
|
|
11
|
+
["m\xFCz", -1],
|
|
12
|
+
["n\xFCz", -1],
|
|
13
|
+
["m\u0131z", -1],
|
|
14
|
+
["n\u0131z", -1]
|
|
15
|
+
];
|
|
16
|
+
var a_1 = [
|
|
17
|
+
["leri", -1],
|
|
18
|
+
["lar\u0131", -1]
|
|
19
|
+
];
|
|
20
|
+
var a_2 = [
|
|
21
|
+
["ni", -1],
|
|
22
|
+
["nu", -1],
|
|
23
|
+
["n\xFC", -1],
|
|
24
|
+
["n\u0131", -1]
|
|
25
|
+
];
|
|
26
|
+
var a_3 = [
|
|
27
|
+
["in", -1],
|
|
28
|
+
["un", -1],
|
|
29
|
+
["\xFCn", -1],
|
|
30
|
+
["\u0131n", -1]
|
|
31
|
+
];
|
|
32
|
+
var a_4 = [
|
|
33
|
+
["a", -1],
|
|
34
|
+
["e", -1]
|
|
35
|
+
];
|
|
36
|
+
var a_5 = [
|
|
37
|
+
["na", -1],
|
|
38
|
+
["ne", -1]
|
|
39
|
+
];
|
|
40
|
+
var a_6 = [
|
|
41
|
+
["da", -1],
|
|
42
|
+
["ta", -1],
|
|
43
|
+
["de", -1],
|
|
44
|
+
["te", -1]
|
|
45
|
+
];
|
|
46
|
+
var a_7 = [
|
|
47
|
+
["nda", -1],
|
|
48
|
+
["nde", -1]
|
|
49
|
+
];
|
|
50
|
+
var a_8 = [
|
|
51
|
+
["dan", -1],
|
|
52
|
+
["tan", -1],
|
|
53
|
+
["den", -1],
|
|
54
|
+
["ten", -1]
|
|
55
|
+
];
|
|
56
|
+
var a_9 = [
|
|
57
|
+
["ndan", -1],
|
|
58
|
+
["nden", -1]
|
|
59
|
+
];
|
|
60
|
+
var a_10 = [
|
|
61
|
+
["la", -1],
|
|
62
|
+
["le", -1]
|
|
63
|
+
];
|
|
64
|
+
var a_11 = [
|
|
65
|
+
["ca", -1],
|
|
66
|
+
["ce", -1]
|
|
67
|
+
];
|
|
68
|
+
var a_12 = [
|
|
69
|
+
["im", -1],
|
|
70
|
+
["um", -1],
|
|
71
|
+
["\xFCm", -1],
|
|
72
|
+
["\u0131m", -1]
|
|
73
|
+
];
|
|
74
|
+
var a_13 = [
|
|
75
|
+
["sin", -1],
|
|
76
|
+
["sun", -1],
|
|
77
|
+
["s\xFCn", -1],
|
|
78
|
+
["s\u0131n", -1]
|
|
79
|
+
];
|
|
80
|
+
var a_14 = [
|
|
81
|
+
["iz", -1],
|
|
82
|
+
["uz", -1],
|
|
83
|
+
["\xFCz", -1],
|
|
84
|
+
["\u0131z", -1]
|
|
85
|
+
];
|
|
86
|
+
var a_15 = [
|
|
87
|
+
["siniz", -1],
|
|
88
|
+
["sunuz", -1],
|
|
89
|
+
["s\xFCn\xFCz", -1],
|
|
90
|
+
["s\u0131n\u0131z", -1]
|
|
91
|
+
];
|
|
92
|
+
var a_16 = [
|
|
93
|
+
["lar", -1],
|
|
94
|
+
["ler", -1]
|
|
95
|
+
];
|
|
96
|
+
var a_17 = [
|
|
97
|
+
["niz", -1],
|
|
98
|
+
["nuz", -1],
|
|
99
|
+
["n\xFCz", -1],
|
|
100
|
+
["n\u0131z", -1]
|
|
101
|
+
];
|
|
102
|
+
var a_18 = [
|
|
103
|
+
["dir", -1],
|
|
104
|
+
["tir", -1],
|
|
105
|
+
["dur", -1],
|
|
106
|
+
["tur", -1],
|
|
107
|
+
["d\xFCr", -1],
|
|
108
|
+
["t\xFCr", -1],
|
|
109
|
+
["d\u0131r", -1],
|
|
110
|
+
["t\u0131r", -1]
|
|
111
|
+
];
|
|
112
|
+
var a_19 = [
|
|
113
|
+
["cas\u0131na", -1],
|
|
114
|
+
["cesine", -1]
|
|
115
|
+
];
|
|
116
|
+
var a_20 = [
|
|
117
|
+
["di", -1],
|
|
118
|
+
["ti", -1],
|
|
119
|
+
["dik", -1],
|
|
120
|
+
["tik", -1],
|
|
121
|
+
["duk", -1],
|
|
122
|
+
["tuk", -1],
|
|
123
|
+
["d\xFCk", -1],
|
|
124
|
+
["t\xFCk", -1],
|
|
125
|
+
["d\u0131k", -1],
|
|
126
|
+
["t\u0131k", -1],
|
|
127
|
+
["dim", -1],
|
|
128
|
+
["tim", -1],
|
|
129
|
+
["dum", -1],
|
|
130
|
+
["tum", -1],
|
|
131
|
+
["d\xFCm", -1],
|
|
132
|
+
["t\xFCm", -1],
|
|
133
|
+
["d\u0131m", -1],
|
|
134
|
+
["t\u0131m", -1],
|
|
135
|
+
["din", -1],
|
|
136
|
+
["tin", -1],
|
|
137
|
+
["dun", -1],
|
|
138
|
+
["tun", -1],
|
|
139
|
+
["d\xFCn", -1],
|
|
140
|
+
["t\xFCn", -1],
|
|
141
|
+
["d\u0131n", -1],
|
|
142
|
+
["t\u0131n", -1],
|
|
143
|
+
["du", -1],
|
|
144
|
+
["tu", -1],
|
|
145
|
+
["d\xFC", -1],
|
|
146
|
+
["t\xFC", -1],
|
|
147
|
+
["d\u0131", -1],
|
|
148
|
+
["t\u0131", -1]
|
|
149
|
+
];
|
|
150
|
+
var a_21 = [
|
|
151
|
+
["sa", -1],
|
|
152
|
+
["se", -1],
|
|
153
|
+
["sak", -1],
|
|
154
|
+
["sek", -1],
|
|
155
|
+
["sam", -1],
|
|
156
|
+
["sem", -1],
|
|
157
|
+
["san", -1],
|
|
158
|
+
["sen", -1]
|
|
159
|
+
];
|
|
160
|
+
var a_22 = [
|
|
161
|
+
["mi\u015F", -1],
|
|
162
|
+
["mu\u015F", -1],
|
|
163
|
+
["m\xFC\u015F", -1],
|
|
164
|
+
["m\u0131\u015F", -1]
|
|
165
|
+
];
|
|
166
|
+
var a_23 = [
|
|
167
|
+
["b", 1],
|
|
168
|
+
["c", 2],
|
|
169
|
+
["d", 3],
|
|
170
|
+
["\u011F", 4]
|
|
171
|
+
];
|
|
172
|
+
var as_23 = ["p", "\xE7", "t", "k"];
|
|
173
|
+
var g_vowel = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 8, 0, 0, 0, 0, 0, 0, 1];
|
|
174
|
+
var g_U = [1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1];
|
|
175
|
+
var g_vowel1 = [1, 64, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
|
|
176
|
+
var g_vowel2 = [17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130];
|
|
177
|
+
var g_vowel3 = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
|
|
178
|
+
var g_vowel4 = [17];
|
|
179
|
+
var g_vowel5 = [65];
|
|
180
|
+
var g_vowel6 = [65];
|
|
181
|
+
var TurkishStemmer = class extends BaseStemmer {
|
|
182
|
+
#r_check_vowel_harmony() {
|
|
183
|
+
const v_1 = this.limit - this.c;
|
|
184
|
+
if (!this.go_out_grouping_b(g_vowel, 97, 305)) return false;
|
|
185
|
+
lab0: {
|
|
186
|
+
const v_2 = this.limit - this.c;
|
|
187
|
+
lab1: {
|
|
188
|
+
if (!this.eq_s_b("a")) break lab1;
|
|
189
|
+
if (!this.go_out_grouping_b(g_vowel1, 97, 305)) break lab1;
|
|
190
|
+
break lab0;
|
|
191
|
+
}
|
|
192
|
+
this.c = this.limit - v_2;
|
|
193
|
+
lab2: {
|
|
194
|
+
if (!this.eq_s_b("e")) break lab2;
|
|
195
|
+
if (!this.go_out_grouping_b(g_vowel2, 101, 252)) break lab2;
|
|
196
|
+
break lab0;
|
|
197
|
+
}
|
|
198
|
+
this.c = this.limit - v_2;
|
|
199
|
+
lab3: {
|
|
200
|
+
if (!this.eq_s_b("\u0131")) break lab3;
|
|
201
|
+
if (!this.go_out_grouping_b(g_vowel3, 97, 305)) break lab3;
|
|
202
|
+
break lab0;
|
|
63
203
|
}
|
|
204
|
+
this.c = this.limit - v_2;
|
|
205
|
+
lab4: {
|
|
206
|
+
if (!this.eq_s_b("i")) break lab4;
|
|
207
|
+
if (!this.go_out_grouping_b(g_vowel4, 101, 105)) break lab4;
|
|
208
|
+
break lab0;
|
|
209
|
+
}
|
|
210
|
+
this.c = this.limit - v_2;
|
|
211
|
+
lab5: {
|
|
212
|
+
if (!this.eq_s_b("o")) break lab5;
|
|
213
|
+
if (!this.go_out_grouping_b(g_vowel5, 111, 117)) break lab5;
|
|
214
|
+
break lab0;
|
|
215
|
+
}
|
|
216
|
+
this.c = this.limit - v_2;
|
|
217
|
+
lab6: {
|
|
218
|
+
if (!this.eq_s_b("\xF6")) break lab6;
|
|
219
|
+
if (!this.go_out_grouping_b(g_vowel6, 246, 252)) break lab6;
|
|
220
|
+
break lab0;
|
|
221
|
+
}
|
|
222
|
+
this.c = this.limit - v_2;
|
|
223
|
+
lab7: {
|
|
224
|
+
if (!this.eq_s_b("u")) break lab7;
|
|
225
|
+
if (!this.go_out_grouping_b(g_vowel5, 111, 117)) break lab7;
|
|
226
|
+
break lab0;
|
|
227
|
+
}
|
|
228
|
+
this.c = this.limit - v_2;
|
|
229
|
+
if (!this.eq_s_b("\xFC")) return false;
|
|
230
|
+
if (!this.go_out_grouping_b(g_vowel6, 246, 252)) return false;
|
|
64
231
|
}
|
|
232
|
+
this.c = this.limit - v_1;
|
|
233
|
+
return true;
|
|
65
234
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
235
|
+
#r_mark_suffix_with_optional_n_consonant() {
|
|
236
|
+
lab0: {
|
|
237
|
+
const v_1 = this.limit - this.c;
|
|
238
|
+
lab1: {
|
|
239
|
+
if (!this.eq_s_b("n")) break lab1;
|
|
240
|
+
const v_2 = this.limit - this.c;
|
|
241
|
+
if (!this.in_grouping_b(g_vowel, 97, 305)) break lab1;
|
|
242
|
+
this.c = this.limit - v_2;
|
|
243
|
+
break lab0;
|
|
244
|
+
}
|
|
245
|
+
this.c = this.limit - v_1;
|
|
246
|
+
lab2: {
|
|
247
|
+
if (!this.eq_s_b("n")) break lab2;
|
|
248
|
+
return false;
|
|
74
249
|
}
|
|
250
|
+
const v_3 = this.limit - this.c;
|
|
251
|
+
if (this.c <= this.limit_backward) return false;
|
|
252
|
+
this.c--;
|
|
253
|
+
if (!this.in_grouping_b(g_vowel, 97, 305)) return false;
|
|
254
|
+
this.c = this.limit - v_3;
|
|
75
255
|
}
|
|
256
|
+
return true;
|
|
76
257
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
258
|
+
#r_mark_suffix_with_optional_y_consonant() {
|
|
259
|
+
lab0: {
|
|
260
|
+
const v_1 = this.limit - this.c;
|
|
261
|
+
lab1: {
|
|
262
|
+
if (!this.eq_s_b("y")) break lab1;
|
|
263
|
+
const v_2 = this.limit - this.c;
|
|
264
|
+
if (!this.in_grouping_b(g_vowel, 97, 305)) break lab1;
|
|
265
|
+
this.c = this.limit - v_2;
|
|
266
|
+
break lab0;
|
|
267
|
+
}
|
|
268
|
+
this.c = this.limit - v_1;
|
|
269
|
+
lab2: {
|
|
270
|
+
if (!this.eq_s_b("y")) break lab2;
|
|
271
|
+
return false;
|
|
85
272
|
}
|
|
273
|
+
const v_3 = this.limit - this.c;
|
|
274
|
+
if (this.c <= this.limit_backward) return false;
|
|
275
|
+
this.c--;
|
|
276
|
+
if (!this.in_grouping_b(g_vowel, 97, 305)) return false;
|
|
277
|
+
this.c = this.limit - v_3;
|
|
86
278
|
}
|
|
279
|
+
return true;
|
|
87
280
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
281
|
+
#r_mark_possessives() {
|
|
282
|
+
if (this.find_among_b(a_0) === 0) return false;
|
|
283
|
+
lab0: {
|
|
284
|
+
const v_1 = this.limit - this.c;
|
|
285
|
+
lab1: {
|
|
286
|
+
if (!this.in_grouping_b(g_U, 105, 305)) break lab1;
|
|
287
|
+
const v_2 = this.limit - this.c;
|
|
288
|
+
if (!this.out_grouping_b(g_vowel, 97, 305)) break lab1;
|
|
289
|
+
this.c = this.limit - v_2;
|
|
290
|
+
break lab0;
|
|
291
|
+
}
|
|
292
|
+
this.c = this.limit - v_1;
|
|
293
|
+
lab2: {
|
|
294
|
+
if (!this.in_grouping_b(g_U, 105, 305)) break lab2;
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
const v_3 = this.limit - this.c;
|
|
298
|
+
if (this.c <= this.limit_backward) return false;
|
|
299
|
+
this.c--;
|
|
300
|
+
if (!this.out_grouping_b(g_vowel, 97, 305)) return false;
|
|
301
|
+
this.c = this.limit - v_3;
|
|
95
302
|
}
|
|
303
|
+
return true;
|
|
96
304
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
function tryRemoveCaseDan(word) {
|
|
121
|
-
return tryStripWithHarmony(word, ["dan", "den", "tan", "ten"], 2);
|
|
122
|
-
}
|
|
123
|
-
function tryRemoveCaseNa(word) {
|
|
124
|
-
return tryStripWithHarmony(word, ["na", "ne"], 2);
|
|
125
|
-
}
|
|
126
|
-
function tryRemoveCaseA(word) {
|
|
127
|
-
return tryStripWithHarmony(word, ["a", "e"], 2);
|
|
128
|
-
}
|
|
129
|
-
function tryRemoveGenitive(word) {
|
|
130
|
-
return tryStripWithHarmonyAndPrecondN(word, ["\u0131n", "in", "un", "\xFCn"], 2);
|
|
131
|
-
}
|
|
132
|
-
function tryRemoveAccusative(word) {
|
|
133
|
-
const long = tryStripWithHarmony(word, ["n\u0131", "ni", "nu", "n\xFC"], 2);
|
|
134
|
-
if (long !== word) return long;
|
|
135
|
-
return tryStripWithHarmonyAndPrecondY(word, ["\u0131", "i", "u", "\xFC"], 2);
|
|
136
|
-
}
|
|
137
|
-
function tryRemoveCopulaDi(word) {
|
|
138
|
-
return tryStripWithHarmonyAndPrecondY(
|
|
139
|
-
word,
|
|
140
|
-
[
|
|
141
|
-
"dik",
|
|
142
|
-
"tik",
|
|
143
|
-
"duk",
|
|
144
|
-
"tuk",
|
|
145
|
-
"d\xFCk",
|
|
146
|
-
"t\xFCk",
|
|
147
|
-
"d\u0131k",
|
|
148
|
-
"t\u0131k",
|
|
149
|
-
"dim",
|
|
150
|
-
"tim",
|
|
151
|
-
"dum",
|
|
152
|
-
"tum",
|
|
153
|
-
"d\xFCm",
|
|
154
|
-
"t\xFCm",
|
|
155
|
-
"d\u0131m",
|
|
156
|
-
"t\u0131m",
|
|
157
|
-
"din",
|
|
158
|
-
"tin",
|
|
159
|
-
"dun",
|
|
160
|
-
"tun",
|
|
161
|
-
"d\xFCn",
|
|
162
|
-
"t\xFCn",
|
|
163
|
-
"d\u0131n",
|
|
164
|
-
"t\u0131n",
|
|
165
|
-
"di",
|
|
166
|
-
"ti",
|
|
167
|
-
"du",
|
|
168
|
-
"tu",
|
|
169
|
-
"d\xFC",
|
|
170
|
-
"t\xFC",
|
|
171
|
-
"d\u0131",
|
|
172
|
-
"t\u0131"
|
|
173
|
-
],
|
|
174
|
-
2
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
function tryRemoveCopulaSa(word) {
|
|
178
|
-
return tryStripWithHarmonyAndPrecondY(word, ["sak", "sek", "sam", "sem", "san", "sen", "sa", "se"], 2);
|
|
179
|
-
}
|
|
180
|
-
function tryRemoveCopulaMis(word) {
|
|
181
|
-
return tryStripWithHarmonyAndPrecondY(word, ["mi\u015F", "mu\u015F", "m\xFC\u015F", "m\u0131\u015F"], 2);
|
|
182
|
-
}
|
|
183
|
-
function tryRemoveCopulaSiniz(word) {
|
|
184
|
-
return tryStripWithHarmony(word, ["siniz", "sunuz", "s\xFCn\xFCz", "s\u0131n\u0131z"], 2);
|
|
185
|
-
}
|
|
186
|
-
function tryRemoveCopulaLar(word) {
|
|
187
|
-
return tryStripWithHarmony(word, ["lar", "ler"], 2);
|
|
188
|
-
}
|
|
189
|
-
function tryRemoveCopulaCasina(word) {
|
|
190
|
-
return tryStripMinVowels(word, ["cas\u0131na", "cesine"], 2);
|
|
191
|
-
}
|
|
192
|
-
function tryRemoveCopulaDir(word) {
|
|
193
|
-
return tryStripWithHarmony(word, ["dir", "tir", "dur", "tur", "d\xFCr", "t\xFCr", "d\u0131r", "t\u0131r"], 2);
|
|
194
|
-
}
|
|
195
|
-
function tryRemoveWithLa(word) {
|
|
196
|
-
return tryStripWithHarmonyAndPrecondY(word, ["la", "le"], 2);
|
|
197
|
-
}
|
|
198
|
-
function tryRemoveWithCa(word) {
|
|
199
|
-
return tryStripWithHarmonyAndPrecondN(word, ["ca", "ce"], 2);
|
|
200
|
-
}
|
|
201
|
-
function tryRemoveKen(word) {
|
|
202
|
-
if (word.endsWith("ken")) {
|
|
203
|
-
const candidate = stripSuffix(word, "ken");
|
|
204
|
-
if (vowelCount(candidate) >= 2 && checkPreconditionY(candidate)) {
|
|
205
|
-
return candidate;
|
|
305
|
+
#r_mark_sU() {
|
|
306
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
307
|
+
if (!this.in_grouping_b(g_U, 105, 305)) return false;
|
|
308
|
+
lab0: {
|
|
309
|
+
const v_1 = this.limit - this.c;
|
|
310
|
+
lab1: {
|
|
311
|
+
if (!this.eq_s_b("s")) break lab1;
|
|
312
|
+
const v_2 = this.limit - this.c;
|
|
313
|
+
if (!this.in_grouping_b(g_vowel, 97, 305)) break lab1;
|
|
314
|
+
this.c = this.limit - v_2;
|
|
315
|
+
break lab0;
|
|
316
|
+
}
|
|
317
|
+
this.c = this.limit - v_1;
|
|
318
|
+
lab2: {
|
|
319
|
+
if (!this.eq_s_b("s")) break lab2;
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
const v_3 = this.limit - this.c;
|
|
323
|
+
if (this.c <= this.limit_backward) return false;
|
|
324
|
+
this.c--;
|
|
325
|
+
if (!this.in_grouping_b(g_vowel, 97, 305)) return false;
|
|
326
|
+
this.c = this.limit - v_3;
|
|
206
327
|
}
|
|
328
|
+
return true;
|
|
207
329
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
function changed(original, current) {
|
|
211
|
-
return original !== current;
|
|
212
|
-
}
|
|
213
|
-
var CONSONANT_SOFTENING = {
|
|
214
|
-
b: "p",
|
|
215
|
-
c: "\xE7",
|
|
216
|
-
d: "t",
|
|
217
|
-
\u011F: "k"
|
|
218
|
-
};
|
|
219
|
-
function handleConsonantSoftening(word) {
|
|
220
|
-
if (word.length > 0) {
|
|
221
|
-
const last = word[word.length - 1];
|
|
222
|
-
if (last in CONSONANT_SOFTENING) {
|
|
223
|
-
return word.slice(0, -1) + CONSONANT_SOFTENING[last];
|
|
224
|
-
}
|
|
330
|
+
#r_mark_lArI() {
|
|
331
|
+
return this.find_among_b(a_1) !== 0;
|
|
225
332
|
}
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
const last = word[word.length - 1];
|
|
231
|
-
if (last !== "d" && last !== "g") return word;
|
|
232
|
-
const beforeLast = word.slice(0, -1);
|
|
233
|
-
const lv = lastVowel(beforeLast);
|
|
234
|
-
if (lv === null) return word;
|
|
235
|
-
let insertedVowel;
|
|
236
|
-
if (BACK_UNROUNDED_VOWELS.includes(lv)) insertedVowel = "\u0131";
|
|
237
|
-
else if (FRONT_UNROUNDED_VOWELS.includes(lv)) insertedVowel = "i";
|
|
238
|
-
else if (BACK_ROUNDED_VOWELS.includes(lv)) insertedVowel = "u";
|
|
239
|
-
else if (FRONT_ROUNDED_VOWELS.includes(lv)) insertedVowel = "\xFC";
|
|
240
|
-
else insertedVowel = "\u0131";
|
|
241
|
-
return beforeLast + insertedVowel + last;
|
|
242
|
-
}
|
|
243
|
-
function nominalVerbSuffixes(word) {
|
|
244
|
-
const original = word;
|
|
245
|
-
let removed = false;
|
|
246
|
-
let result;
|
|
247
|
-
result = tryRemoveCopulaMis(word);
|
|
248
|
-
if (changed(word, result)) {
|
|
249
|
-
word = result;
|
|
250
|
-
removed = true;
|
|
333
|
+
#r_mark_nUn() {
|
|
334
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
335
|
+
if (this.find_among_b(a_3) === 0) return false;
|
|
336
|
+
return this.#r_mark_suffix_with_optional_n_consonant();
|
|
251
337
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
word = result;
|
|
256
|
-
removed = true;
|
|
257
|
-
}
|
|
338
|
+
#r_mark_DA() {
|
|
339
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
340
|
+
return this.find_among_b(a_6) !== 0;
|
|
258
341
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
word = result;
|
|
263
|
-
removed = true;
|
|
264
|
-
}
|
|
342
|
+
#r_mark_ndA() {
|
|
343
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
344
|
+
return this.find_among_b(a_7) !== 0;
|
|
265
345
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
if (
|
|
269
|
-
|
|
270
|
-
removed = true;
|
|
271
|
-
}
|
|
346
|
+
#r_mark_yUm() {
|
|
347
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
348
|
+
if (this.find_among_b(a_12) === 0) return false;
|
|
349
|
+
return this.#r_mark_suffix_with_optional_y_consonant();
|
|
272
350
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
351
|
+
#r_mark_sUn() {
|
|
352
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
353
|
+
return this.find_among_b(a_13) !== 0;
|
|
354
|
+
}
|
|
355
|
+
#r_mark_yUz() {
|
|
356
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
357
|
+
if (this.find_among_b(a_14) === 0) return false;
|
|
358
|
+
return this.#r_mark_suffix_with_optional_y_consonant();
|
|
359
|
+
}
|
|
360
|
+
#r_mark_sUnUz() {
|
|
361
|
+
return this.find_among_b(a_15) !== 0;
|
|
362
|
+
}
|
|
363
|
+
#r_mark_lAr() {
|
|
364
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
365
|
+
return this.find_among_b(a_16) !== 0;
|
|
366
|
+
}
|
|
367
|
+
#r_mark_DUr() {
|
|
368
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
369
|
+
return this.find_among_b(a_18) !== 0;
|
|
370
|
+
}
|
|
371
|
+
#r_mark_yDU() {
|
|
372
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
373
|
+
if (this.find_among_b(a_20) === 0) return false;
|
|
374
|
+
return this.#r_mark_suffix_with_optional_y_consonant();
|
|
375
|
+
}
|
|
376
|
+
#r_mark_ysA() {
|
|
377
|
+
if (this.find_among_b(a_21) === 0) return false;
|
|
378
|
+
return this.#r_mark_suffix_with_optional_y_consonant();
|
|
379
|
+
}
|
|
380
|
+
#r_mark_ymUs_() {
|
|
381
|
+
if (!this.#r_check_vowel_harmony()) return false;
|
|
382
|
+
if (this.find_among_b(a_22) === 0) return false;
|
|
383
|
+
return this.#r_mark_suffix_with_optional_y_consonant();
|
|
384
|
+
}
|
|
385
|
+
#r_stem_suffix_chain_before_ki() {
|
|
386
|
+
this.ket = this.c;
|
|
387
|
+
if (!this.eq_s_b("ki")) return false;
|
|
388
|
+
lab0: {
|
|
389
|
+
const v_1 = this.limit - this.c;
|
|
390
|
+
lab1: {
|
|
391
|
+
if (!this.#r_mark_DA()) break lab1;
|
|
392
|
+
this.bra = this.c;
|
|
393
|
+
this.slice_del();
|
|
394
|
+
const v_2 = this.limit - this.c;
|
|
395
|
+
lab2: {
|
|
396
|
+
this.ket = this.c;
|
|
397
|
+
lab3: {
|
|
398
|
+
const v_3 = this.limit - this.c;
|
|
399
|
+
lab4: {
|
|
400
|
+
if (!this.#r_mark_lAr()) break lab4;
|
|
401
|
+
this.bra = this.c;
|
|
402
|
+
this.slice_del();
|
|
403
|
+
const v_4 = this.limit - this.c;
|
|
404
|
+
lab5: {
|
|
405
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
406
|
+
this.c = this.limit - v_4;
|
|
407
|
+
break lab5;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
break lab3;
|
|
411
|
+
}
|
|
412
|
+
this.c = this.limit - v_3;
|
|
413
|
+
if (!this.#r_mark_possessives()) {
|
|
414
|
+
this.c = this.limit - v_2;
|
|
415
|
+
break lab2;
|
|
416
|
+
}
|
|
417
|
+
this.bra = this.c;
|
|
418
|
+
this.slice_del();
|
|
419
|
+
const v_5 = this.limit - this.c;
|
|
420
|
+
lab6: {
|
|
421
|
+
this.ket = this.c;
|
|
422
|
+
if (!this.#r_mark_lAr()) {
|
|
423
|
+
this.c = this.limit - v_5;
|
|
424
|
+
break lab6;
|
|
425
|
+
}
|
|
426
|
+
this.bra = this.c;
|
|
427
|
+
this.slice_del();
|
|
428
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
429
|
+
this.c = this.limit - v_5;
|
|
430
|
+
break lab6;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
291
433
|
}
|
|
292
434
|
}
|
|
435
|
+
break lab0;
|
|
436
|
+
}
|
|
437
|
+
this.c = this.limit - v_1;
|
|
438
|
+
lab7: {
|
|
439
|
+
if (!this.#r_mark_nUn()) break lab7;
|
|
440
|
+
this.bra = this.c;
|
|
441
|
+
this.slice_del();
|
|
442
|
+
const v_6 = this.limit - this.c;
|
|
443
|
+
lab8: {
|
|
444
|
+
this.ket = this.c;
|
|
445
|
+
lab9: {
|
|
446
|
+
const v_7 = this.limit - this.c;
|
|
447
|
+
lab10: {
|
|
448
|
+
if (!this.#r_mark_lArI()) break lab10;
|
|
449
|
+
this.bra = this.c;
|
|
450
|
+
this.slice_del();
|
|
451
|
+
break lab9;
|
|
452
|
+
}
|
|
453
|
+
this.c = this.limit - v_7;
|
|
454
|
+
lab11: {
|
|
455
|
+
this.ket = this.c;
|
|
456
|
+
lab12: {
|
|
457
|
+
const v_8 = this.limit - this.c;
|
|
458
|
+
lab13: {
|
|
459
|
+
if (!this.#r_mark_possessives()) break lab13;
|
|
460
|
+
break lab12;
|
|
461
|
+
}
|
|
462
|
+
this.c = this.limit - v_8;
|
|
463
|
+
if (!this.#r_mark_sU()) break lab11;
|
|
464
|
+
}
|
|
465
|
+
this.bra = this.c;
|
|
466
|
+
this.slice_del();
|
|
467
|
+
const v_9 = this.limit - this.c;
|
|
468
|
+
lab14: {
|
|
469
|
+
this.ket = this.c;
|
|
470
|
+
if (!this.#r_mark_lAr()) {
|
|
471
|
+
this.c = this.limit - v_9;
|
|
472
|
+
break lab14;
|
|
473
|
+
}
|
|
474
|
+
this.bra = this.c;
|
|
475
|
+
this.slice_del();
|
|
476
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
477
|
+
this.c = this.limit - v_9;
|
|
478
|
+
break lab14;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
break lab9;
|
|
482
|
+
}
|
|
483
|
+
this.c = this.limit - v_7;
|
|
484
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
485
|
+
this.c = this.limit - v_6;
|
|
486
|
+
break lab8;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
break lab0;
|
|
491
|
+
}
|
|
492
|
+
this.c = this.limit - v_1;
|
|
493
|
+
if (!this.#r_mark_ndA()) return false;
|
|
494
|
+
lab15: {
|
|
495
|
+
const v_10 = this.limit - this.c;
|
|
496
|
+
lab16: {
|
|
497
|
+
if (!this.#r_mark_lArI()) break lab16;
|
|
498
|
+
this.bra = this.c;
|
|
499
|
+
this.slice_del();
|
|
500
|
+
break lab15;
|
|
501
|
+
}
|
|
502
|
+
this.c = this.limit - v_10;
|
|
503
|
+
lab17: {
|
|
504
|
+
if (!this.#r_mark_sU()) break lab17;
|
|
505
|
+
this.bra = this.c;
|
|
506
|
+
this.slice_del();
|
|
507
|
+
const v_11 = this.limit - this.c;
|
|
508
|
+
lab18: {
|
|
509
|
+
this.ket = this.c;
|
|
510
|
+
if (!this.#r_mark_lAr()) {
|
|
511
|
+
this.c = this.limit - v_11;
|
|
512
|
+
break lab18;
|
|
513
|
+
}
|
|
514
|
+
this.bra = this.c;
|
|
515
|
+
this.slice_del();
|
|
516
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
517
|
+
this.c = this.limit - v_11;
|
|
518
|
+
break lab18;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
break lab15;
|
|
522
|
+
}
|
|
523
|
+
this.c = this.limit - v_10;
|
|
524
|
+
if (!this.#r_stem_suffix_chain_before_ki()) return false;
|
|
293
525
|
}
|
|
294
|
-
return { word, removed: true };
|
|
295
526
|
}
|
|
527
|
+
return true;
|
|
296
528
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
result = tryRemovePossessiveNiz(word);
|
|
311
|
-
if (changed(word, result)) {
|
|
312
|
-
word = result;
|
|
313
|
-
} else {
|
|
314
|
-
result = tryRemoveCopulaSiniz(word);
|
|
315
|
-
if (changed(word, result)) {
|
|
316
|
-
word = result;
|
|
317
|
-
} else {
|
|
318
|
-
result = tryRemoveCopulaLar(word);
|
|
319
|
-
if (changed(word, result)) word = result;
|
|
529
|
+
#stem() {
|
|
530
|
+
let a;
|
|
531
|
+
let B_continue_stemming_noun_suffixes;
|
|
532
|
+
{
|
|
533
|
+
const v_1 = this.c;
|
|
534
|
+
lab1: {
|
|
535
|
+
this.bra = this.c;
|
|
536
|
+
while (true) {
|
|
537
|
+
const v_2 = this.c;
|
|
538
|
+
lab3: {
|
|
539
|
+
lab4: {
|
|
540
|
+
if (!this.eq_s("'")) break lab4;
|
|
541
|
+
break lab3;
|
|
320
542
|
}
|
|
543
|
+
this.c = v_2;
|
|
544
|
+
break;
|
|
545
|
+
}
|
|
546
|
+
this.c = v_2;
|
|
547
|
+
if (this.c >= this.limit) break lab1;
|
|
548
|
+
this.c++;
|
|
549
|
+
}
|
|
550
|
+
this.ket = this.c;
|
|
551
|
+
this.slice_del();
|
|
552
|
+
}
|
|
553
|
+
this.c = v_1;
|
|
554
|
+
const v_3 = this.c;
|
|
555
|
+
lab5: {
|
|
556
|
+
if (this.c + 2 > this.limit) break lab5;
|
|
557
|
+
this.c += 2;
|
|
558
|
+
while (true) {
|
|
559
|
+
const v_4 = this.c;
|
|
560
|
+
lab7: {
|
|
561
|
+
if (!this.eq_s("'")) break lab7;
|
|
562
|
+
this.c = v_4;
|
|
563
|
+
break;
|
|
321
564
|
}
|
|
565
|
+
this.c = v_4;
|
|
566
|
+
if (this.c >= this.limit) break lab5;
|
|
567
|
+
this.c++;
|
|
322
568
|
}
|
|
569
|
+
this.bra = this.c;
|
|
570
|
+
this.c = this.limit;
|
|
571
|
+
this.ket = this.c;
|
|
572
|
+
this.slice_del();
|
|
323
573
|
}
|
|
574
|
+
this.c = v_3;
|
|
324
575
|
}
|
|
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
|
-
|
|
576
|
+
const v_5 = this.c;
|
|
577
|
+
for (let v_6 = 2; v_6 > 0; v_6--) {
|
|
578
|
+
if (!this.go_out_grouping(g_vowel, 97, 305)) return false;
|
|
579
|
+
this.c++;
|
|
580
|
+
}
|
|
581
|
+
this.c = v_5;
|
|
582
|
+
this.limit_backward = this.c;
|
|
583
|
+
this.c = this.limit;
|
|
584
|
+
const v_7 = this.limit - this.c;
|
|
585
|
+
lab8: {
|
|
586
|
+
this.ket = this.c;
|
|
587
|
+
B_continue_stemming_noun_suffixes = true;
|
|
588
|
+
lab9: {
|
|
589
|
+
const v_8 = this.limit - this.c;
|
|
590
|
+
lab10: {
|
|
591
|
+
lab11: {
|
|
592
|
+
const v_9 = this.limit - this.c;
|
|
593
|
+
lab12: {
|
|
594
|
+
if (!this.#r_mark_ymUs_()) break lab12;
|
|
595
|
+
break lab11;
|
|
596
|
+
}
|
|
597
|
+
this.c = this.limit - v_9;
|
|
598
|
+
lab13: {
|
|
599
|
+
if (!this.#r_mark_yDU()) break lab13;
|
|
600
|
+
break lab11;
|
|
601
|
+
}
|
|
602
|
+
this.c = this.limit - v_9;
|
|
603
|
+
lab14: {
|
|
604
|
+
if (!this.#r_mark_ysA()) break lab14;
|
|
605
|
+
break lab11;
|
|
606
|
+
}
|
|
607
|
+
this.c = this.limit - v_9;
|
|
608
|
+
if (!this.eq_s_b("ken")) break lab10;
|
|
609
|
+
if (!this.#r_mark_suffix_with_optional_y_consonant()) break lab10;
|
|
610
|
+
}
|
|
611
|
+
break lab9;
|
|
612
|
+
}
|
|
613
|
+
this.c = this.limit - v_8;
|
|
614
|
+
lab15: {
|
|
615
|
+
if (this.find_among_b(a_19) === 0) break lab15;
|
|
616
|
+
lab16: {
|
|
617
|
+
const v_10 = this.limit - this.c;
|
|
618
|
+
lab17: {
|
|
619
|
+
if (!this.#r_mark_sUnUz()) break lab17;
|
|
620
|
+
break lab16;
|
|
621
|
+
}
|
|
622
|
+
this.c = this.limit - v_10;
|
|
623
|
+
lab18: {
|
|
624
|
+
if (!this.#r_mark_lAr()) break lab18;
|
|
625
|
+
break lab16;
|
|
626
|
+
}
|
|
627
|
+
this.c = this.limit - v_10;
|
|
628
|
+
lab19: {
|
|
629
|
+
if (!this.#r_mark_yUm()) break lab19;
|
|
630
|
+
break lab16;
|
|
631
|
+
}
|
|
632
|
+
this.c = this.limit - v_10;
|
|
633
|
+
lab20: {
|
|
634
|
+
if (!this.#r_mark_sUn()) break lab20;
|
|
635
|
+
break lab16;
|
|
636
|
+
}
|
|
637
|
+
this.c = this.limit - v_10;
|
|
638
|
+
lab21: {
|
|
639
|
+
if (!this.#r_mark_yUz()) break lab21;
|
|
640
|
+
break lab16;
|
|
641
|
+
}
|
|
642
|
+
this.c = this.limit - v_10;
|
|
643
|
+
}
|
|
644
|
+
if (!this.#r_mark_ymUs_()) break lab15;
|
|
645
|
+
break lab9;
|
|
646
|
+
}
|
|
647
|
+
this.c = this.limit - v_8;
|
|
648
|
+
lab22: {
|
|
649
|
+
if (!this.#r_mark_lAr()) break lab22;
|
|
650
|
+
this.bra = this.c;
|
|
651
|
+
this.slice_del();
|
|
652
|
+
const v_11 = this.limit - this.c;
|
|
653
|
+
lab23: {
|
|
654
|
+
this.ket = this.c;
|
|
655
|
+
lab24: {
|
|
656
|
+
const v_12 = this.limit - this.c;
|
|
657
|
+
lab25: {
|
|
658
|
+
if (!this.#r_mark_DUr()) break lab25;
|
|
659
|
+
break lab24;
|
|
660
|
+
}
|
|
661
|
+
this.c = this.limit - v_12;
|
|
662
|
+
lab26: {
|
|
663
|
+
if (!this.#r_mark_yDU()) break lab26;
|
|
664
|
+
break lab24;
|
|
665
|
+
}
|
|
666
|
+
this.c = this.limit - v_12;
|
|
667
|
+
lab27: {
|
|
668
|
+
if (!this.#r_mark_ysA()) break lab27;
|
|
669
|
+
break lab24;
|
|
670
|
+
}
|
|
671
|
+
this.c = this.limit - v_12;
|
|
672
|
+
if (!this.#r_mark_ymUs_()) {
|
|
673
|
+
this.c = this.limit - v_11;
|
|
674
|
+
break lab23;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
B_continue_stemming_noun_suffixes = false;
|
|
679
|
+
break lab9;
|
|
680
|
+
}
|
|
681
|
+
this.c = this.limit - v_8;
|
|
682
|
+
lab28: {
|
|
683
|
+
if (!this.#r_check_vowel_harmony()) break lab28;
|
|
684
|
+
if (this.find_among_b(a_17) === 0) break lab28;
|
|
685
|
+
lab29: {
|
|
686
|
+
const v_13 = this.limit - this.c;
|
|
687
|
+
lab30: {
|
|
688
|
+
if (!this.#r_mark_yDU()) break lab30;
|
|
689
|
+
break lab29;
|
|
690
|
+
}
|
|
691
|
+
this.c = this.limit - v_13;
|
|
692
|
+
if (!this.#r_mark_ysA()) break lab28;
|
|
693
|
+
}
|
|
694
|
+
break lab9;
|
|
695
|
+
}
|
|
696
|
+
this.c = this.limit - v_8;
|
|
697
|
+
lab31: {
|
|
698
|
+
lab32: {
|
|
699
|
+
const v_14 = this.limit - this.c;
|
|
700
|
+
lab33: {
|
|
701
|
+
if (!this.#r_mark_sUnUz()) break lab33;
|
|
702
|
+
break lab32;
|
|
703
|
+
}
|
|
704
|
+
this.c = this.limit - v_14;
|
|
705
|
+
lab34: {
|
|
706
|
+
if (!this.#r_mark_yUz()) break lab34;
|
|
707
|
+
break lab32;
|
|
708
|
+
}
|
|
709
|
+
this.c = this.limit - v_14;
|
|
710
|
+
lab35: {
|
|
711
|
+
if (!this.#r_mark_sUn()) break lab35;
|
|
712
|
+
break lab32;
|
|
713
|
+
}
|
|
714
|
+
this.c = this.limit - v_14;
|
|
715
|
+
if (!this.#r_mark_yUm()) break lab31;
|
|
716
|
+
}
|
|
717
|
+
this.bra = this.c;
|
|
718
|
+
this.slice_del();
|
|
719
|
+
const v_15 = this.limit - this.c;
|
|
720
|
+
lab36: {
|
|
721
|
+
this.ket = this.c;
|
|
722
|
+
if (!this.#r_mark_ymUs_()) {
|
|
723
|
+
this.c = this.limit - v_15;
|
|
724
|
+
break lab36;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
break lab9;
|
|
728
|
+
}
|
|
729
|
+
this.c = this.limit - v_8;
|
|
730
|
+
if (!this.#r_mark_DUr()) break lab8;
|
|
731
|
+
this.bra = this.c;
|
|
732
|
+
this.slice_del();
|
|
733
|
+
const v_16 = this.limit - this.c;
|
|
734
|
+
lab37: {
|
|
735
|
+
this.ket = this.c;
|
|
736
|
+
lab38: {
|
|
737
|
+
const v_17 = this.limit - this.c;
|
|
738
|
+
lab39: {
|
|
739
|
+
if (!this.#r_mark_sUnUz()) break lab39;
|
|
740
|
+
break lab38;
|
|
741
|
+
}
|
|
742
|
+
this.c = this.limit - v_17;
|
|
743
|
+
lab40: {
|
|
744
|
+
if (!this.#r_mark_lAr()) break lab40;
|
|
745
|
+
break lab38;
|
|
746
|
+
}
|
|
747
|
+
this.c = this.limit - v_17;
|
|
748
|
+
lab41: {
|
|
749
|
+
if (!this.#r_mark_yUm()) break lab41;
|
|
750
|
+
break lab38;
|
|
751
|
+
}
|
|
752
|
+
this.c = this.limit - v_17;
|
|
753
|
+
lab42: {
|
|
754
|
+
if (!this.#r_mark_sUn()) break lab42;
|
|
755
|
+
break lab38;
|
|
756
|
+
}
|
|
757
|
+
this.c = this.limit - v_17;
|
|
758
|
+
lab43: {
|
|
759
|
+
if (!this.#r_mark_yUz()) break lab43;
|
|
760
|
+
break lab38;
|
|
761
|
+
}
|
|
762
|
+
this.c = this.limit - v_17;
|
|
763
|
+
}
|
|
764
|
+
if (!this.#r_mark_ymUs_()) {
|
|
765
|
+
this.c = this.limit - v_16;
|
|
766
|
+
break lab37;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
this.bra = this.c;
|
|
771
|
+
this.slice_del();
|
|
772
|
+
}
|
|
773
|
+
this.c = this.limit - v_7;
|
|
774
|
+
if (!B_continue_stemming_noun_suffixes) return false;
|
|
775
|
+
const v_18 = this.limit - this.c;
|
|
776
|
+
lab44: {
|
|
777
|
+
lab45: {
|
|
778
|
+
const v_19 = this.limit - this.c;
|
|
779
|
+
lab46: {
|
|
780
|
+
this.ket = this.c;
|
|
781
|
+
if (!this.#r_mark_lAr()) break lab46;
|
|
782
|
+
this.bra = this.c;
|
|
783
|
+
this.slice_del();
|
|
784
|
+
const v_20 = this.limit - this.c;
|
|
785
|
+
lab47: {
|
|
786
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
787
|
+
this.c = this.limit - v_20;
|
|
788
|
+
break lab47;
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
break lab45;
|
|
792
|
+
}
|
|
793
|
+
this.c = this.limit - v_19;
|
|
794
|
+
lab48: {
|
|
795
|
+
this.ket = this.c;
|
|
796
|
+
if (!this.#r_check_vowel_harmony()) break lab48;
|
|
797
|
+
if (this.find_among_b(a_11) === 0) break lab48;
|
|
798
|
+
if (!this.#r_mark_suffix_with_optional_n_consonant()) break lab48;
|
|
799
|
+
this.bra = this.c;
|
|
800
|
+
this.slice_del();
|
|
801
|
+
const v_21 = this.limit - this.c;
|
|
802
|
+
lab49: {
|
|
803
|
+
lab50: {
|
|
804
|
+
const v_22 = this.limit - this.c;
|
|
805
|
+
lab51: {
|
|
806
|
+
this.ket = this.c;
|
|
807
|
+
if (!this.#r_mark_lArI()) break lab51;
|
|
808
|
+
this.bra = this.c;
|
|
809
|
+
this.slice_del();
|
|
810
|
+
break lab50;
|
|
811
|
+
}
|
|
812
|
+
this.c = this.limit - v_22;
|
|
813
|
+
lab52: {
|
|
814
|
+
this.ket = this.c;
|
|
815
|
+
lab53: {
|
|
816
|
+
const v_23 = this.limit - this.c;
|
|
817
|
+
lab54: {
|
|
818
|
+
if (!this.#r_mark_possessives()) break lab54;
|
|
819
|
+
break lab53;
|
|
820
|
+
}
|
|
821
|
+
this.c = this.limit - v_23;
|
|
822
|
+
if (!this.#r_mark_sU()) break lab52;
|
|
823
|
+
}
|
|
824
|
+
this.bra = this.c;
|
|
825
|
+
this.slice_del();
|
|
826
|
+
const v_24 = this.limit - this.c;
|
|
827
|
+
lab55: {
|
|
828
|
+
this.ket = this.c;
|
|
829
|
+
if (!this.#r_mark_lAr()) {
|
|
830
|
+
this.c = this.limit - v_24;
|
|
831
|
+
break lab55;
|
|
832
|
+
}
|
|
833
|
+
this.bra = this.c;
|
|
834
|
+
this.slice_del();
|
|
835
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
836
|
+
this.c = this.limit - v_24;
|
|
837
|
+
break lab55;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
break lab50;
|
|
841
|
+
}
|
|
842
|
+
this.c = this.limit - v_22;
|
|
843
|
+
this.ket = this.c;
|
|
844
|
+
if (!this.#r_mark_lAr()) {
|
|
845
|
+
this.c = this.limit - v_21;
|
|
846
|
+
break lab49;
|
|
847
|
+
}
|
|
848
|
+
this.bra = this.c;
|
|
849
|
+
this.slice_del();
|
|
850
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
851
|
+
this.c = this.limit - v_21;
|
|
852
|
+
break lab49;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
break lab45;
|
|
857
|
+
}
|
|
858
|
+
this.c = this.limit - v_19;
|
|
859
|
+
lab56: {
|
|
860
|
+
this.ket = this.c;
|
|
861
|
+
lab57: {
|
|
862
|
+
const v_25 = this.limit - this.c;
|
|
863
|
+
lab58: {
|
|
864
|
+
if (!this.#r_mark_ndA()) break lab58;
|
|
865
|
+
break lab57;
|
|
866
|
+
}
|
|
867
|
+
this.c = this.limit - v_25;
|
|
868
|
+
if (!this.#r_check_vowel_harmony()) break lab56;
|
|
869
|
+
if (this.find_among_b(a_5) === 0) break lab56;
|
|
870
|
+
}
|
|
871
|
+
lab59: {
|
|
872
|
+
const v_26 = this.limit - this.c;
|
|
873
|
+
lab60: {
|
|
874
|
+
if (!this.#r_mark_lArI()) break lab60;
|
|
875
|
+
this.bra = this.c;
|
|
876
|
+
this.slice_del();
|
|
877
|
+
break lab59;
|
|
878
|
+
}
|
|
879
|
+
this.c = this.limit - v_26;
|
|
880
|
+
lab61: {
|
|
881
|
+
if (!this.#r_mark_sU()) break lab61;
|
|
882
|
+
this.bra = this.c;
|
|
883
|
+
this.slice_del();
|
|
884
|
+
const v_27 = this.limit - this.c;
|
|
885
|
+
lab62: {
|
|
886
|
+
this.ket = this.c;
|
|
887
|
+
if (!this.#r_mark_lAr()) {
|
|
888
|
+
this.c = this.limit - v_27;
|
|
889
|
+
break lab62;
|
|
890
|
+
}
|
|
891
|
+
this.bra = this.c;
|
|
892
|
+
this.slice_del();
|
|
893
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
894
|
+
this.c = this.limit - v_27;
|
|
895
|
+
break lab62;
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
break lab59;
|
|
899
|
+
}
|
|
900
|
+
this.c = this.limit - v_26;
|
|
901
|
+
if (!this.#r_stem_suffix_chain_before_ki()) break lab56;
|
|
902
|
+
}
|
|
903
|
+
break lab45;
|
|
904
|
+
}
|
|
905
|
+
this.c = this.limit - v_19;
|
|
906
|
+
lab63: {
|
|
907
|
+
this.ket = this.c;
|
|
908
|
+
lab64: {
|
|
909
|
+
const v_28 = this.limit - this.c;
|
|
910
|
+
lab65: {
|
|
911
|
+
if (!this.#r_check_vowel_harmony()) break lab65;
|
|
912
|
+
if (this.find_among_b(a_9) === 0) break lab65;
|
|
913
|
+
break lab64;
|
|
914
|
+
}
|
|
915
|
+
this.c = this.limit - v_28;
|
|
916
|
+
if (!this.#r_check_vowel_harmony()) break lab63;
|
|
917
|
+
if (this.find_among_b(a_2) === 0) break lab63;
|
|
918
|
+
}
|
|
919
|
+
lab66: {
|
|
920
|
+
const v_29 = this.limit - this.c;
|
|
921
|
+
lab67: {
|
|
922
|
+
if (!this.#r_mark_sU()) break lab67;
|
|
923
|
+
this.bra = this.c;
|
|
924
|
+
this.slice_del();
|
|
925
|
+
const v_30 = this.limit - this.c;
|
|
926
|
+
lab68: {
|
|
927
|
+
this.ket = this.c;
|
|
928
|
+
if (!this.#r_mark_lAr()) {
|
|
929
|
+
this.c = this.limit - v_30;
|
|
930
|
+
break lab68;
|
|
931
|
+
}
|
|
932
|
+
this.bra = this.c;
|
|
933
|
+
this.slice_del();
|
|
934
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
935
|
+
this.c = this.limit - v_30;
|
|
936
|
+
break lab68;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
break lab66;
|
|
940
|
+
}
|
|
941
|
+
this.c = this.limit - v_29;
|
|
942
|
+
if (!this.#r_mark_lArI()) break lab63;
|
|
943
|
+
}
|
|
944
|
+
break lab45;
|
|
945
|
+
}
|
|
946
|
+
this.c = this.limit - v_19;
|
|
947
|
+
lab69: {
|
|
948
|
+
this.ket = this.c;
|
|
949
|
+
if (!this.#r_check_vowel_harmony()) break lab69;
|
|
950
|
+
if (this.find_among_b(a_8) === 0) break lab69;
|
|
951
|
+
this.bra = this.c;
|
|
952
|
+
this.slice_del();
|
|
953
|
+
const v_31 = this.limit - this.c;
|
|
954
|
+
lab70: {
|
|
955
|
+
this.ket = this.c;
|
|
956
|
+
lab71: {
|
|
957
|
+
const v_32 = this.limit - this.c;
|
|
958
|
+
lab72: {
|
|
959
|
+
if (!this.#r_mark_possessives()) break lab72;
|
|
960
|
+
this.bra = this.c;
|
|
961
|
+
this.slice_del();
|
|
962
|
+
const v_33 = this.limit - this.c;
|
|
963
|
+
lab73: {
|
|
964
|
+
this.ket = this.c;
|
|
965
|
+
if (!this.#r_mark_lAr()) {
|
|
966
|
+
this.c = this.limit - v_33;
|
|
967
|
+
break lab73;
|
|
968
|
+
}
|
|
969
|
+
this.bra = this.c;
|
|
970
|
+
this.slice_del();
|
|
971
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
972
|
+
this.c = this.limit - v_33;
|
|
973
|
+
break lab73;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
break lab71;
|
|
977
|
+
}
|
|
978
|
+
this.c = this.limit - v_32;
|
|
979
|
+
lab74: {
|
|
980
|
+
if (!this.#r_mark_lAr()) break lab74;
|
|
981
|
+
this.bra = this.c;
|
|
982
|
+
this.slice_del();
|
|
983
|
+
const v_34 = this.limit - this.c;
|
|
984
|
+
lab75: {
|
|
985
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
986
|
+
this.c = this.limit - v_34;
|
|
987
|
+
break lab75;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
break lab71;
|
|
991
|
+
}
|
|
992
|
+
this.c = this.limit - v_32;
|
|
993
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
994
|
+
this.c = this.limit - v_31;
|
|
995
|
+
break lab70;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
break lab45;
|
|
1000
|
+
}
|
|
1001
|
+
this.c = this.limit - v_19;
|
|
1002
|
+
lab76: {
|
|
1003
|
+
this.ket = this.c;
|
|
1004
|
+
lab77: {
|
|
1005
|
+
const v_35 = this.limit - this.c;
|
|
1006
|
+
lab78: {
|
|
1007
|
+
if (!this.#r_mark_nUn()) break lab78;
|
|
1008
|
+
break lab77;
|
|
1009
|
+
}
|
|
1010
|
+
this.c = this.limit - v_35;
|
|
1011
|
+
if (!this.#r_check_vowel_harmony()) break lab76;
|
|
1012
|
+
if (this.find_among_b(a_10) === 0) break lab76;
|
|
1013
|
+
if (!this.#r_mark_suffix_with_optional_y_consonant()) break lab76;
|
|
1014
|
+
}
|
|
1015
|
+
this.bra = this.c;
|
|
1016
|
+
this.slice_del();
|
|
1017
|
+
const v_36 = this.limit - this.c;
|
|
1018
|
+
lab79: {
|
|
1019
|
+
lab80: {
|
|
1020
|
+
const v_37 = this.limit - this.c;
|
|
1021
|
+
lab81: {
|
|
1022
|
+
this.ket = this.c;
|
|
1023
|
+
if (!this.#r_mark_lAr()) break lab81;
|
|
1024
|
+
this.bra = this.c;
|
|
1025
|
+
this.slice_del();
|
|
1026
|
+
if (!this.#r_stem_suffix_chain_before_ki()) break lab81;
|
|
1027
|
+
break lab80;
|
|
1028
|
+
}
|
|
1029
|
+
this.c = this.limit - v_37;
|
|
1030
|
+
lab82: {
|
|
1031
|
+
this.ket = this.c;
|
|
1032
|
+
lab83: {
|
|
1033
|
+
const v_38 = this.limit - this.c;
|
|
1034
|
+
lab84: {
|
|
1035
|
+
if (!this.#r_mark_possessives()) break lab84;
|
|
1036
|
+
break lab83;
|
|
1037
|
+
}
|
|
1038
|
+
this.c = this.limit - v_38;
|
|
1039
|
+
if (!this.#r_mark_sU()) break lab82;
|
|
1040
|
+
}
|
|
1041
|
+
this.bra = this.c;
|
|
1042
|
+
this.slice_del();
|
|
1043
|
+
const v_39 = this.limit - this.c;
|
|
1044
|
+
lab85: {
|
|
1045
|
+
this.ket = this.c;
|
|
1046
|
+
if (!this.#r_mark_lAr()) {
|
|
1047
|
+
this.c = this.limit - v_39;
|
|
1048
|
+
break lab85;
|
|
1049
|
+
}
|
|
1050
|
+
this.bra = this.c;
|
|
1051
|
+
this.slice_del();
|
|
1052
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
1053
|
+
this.c = this.limit - v_39;
|
|
1054
|
+
break lab85;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
break lab80;
|
|
1058
|
+
}
|
|
1059
|
+
this.c = this.limit - v_37;
|
|
1060
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
1061
|
+
this.c = this.limit - v_36;
|
|
1062
|
+
break lab79;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
break lab45;
|
|
1067
|
+
}
|
|
1068
|
+
this.c = this.limit - v_19;
|
|
1069
|
+
lab86: {
|
|
1070
|
+
this.ket = this.c;
|
|
1071
|
+
if (!this.#r_mark_lArI()) break lab86;
|
|
1072
|
+
this.bra = this.c;
|
|
1073
|
+
this.slice_del();
|
|
1074
|
+
break lab45;
|
|
1075
|
+
}
|
|
1076
|
+
this.c = this.limit - v_19;
|
|
1077
|
+
lab87: {
|
|
1078
|
+
if (!this.#r_stem_suffix_chain_before_ki()) break lab87;
|
|
1079
|
+
break lab45;
|
|
1080
|
+
}
|
|
1081
|
+
this.c = this.limit - v_19;
|
|
1082
|
+
lab88: {
|
|
1083
|
+
this.ket = this.c;
|
|
1084
|
+
lab89: {
|
|
1085
|
+
const v_40 = this.limit - this.c;
|
|
1086
|
+
lab90: {
|
|
1087
|
+
if (!this.#r_mark_DA()) break lab90;
|
|
1088
|
+
break lab89;
|
|
1089
|
+
}
|
|
1090
|
+
this.c = this.limit - v_40;
|
|
1091
|
+
lab91: {
|
|
1092
|
+
if (!this.#r_check_vowel_harmony()) break lab91;
|
|
1093
|
+
if (!this.in_grouping_b(g_U, 105, 305)) break lab91;
|
|
1094
|
+
if (!this.#r_mark_suffix_with_optional_y_consonant()) break lab91;
|
|
1095
|
+
break lab89;
|
|
1096
|
+
}
|
|
1097
|
+
this.c = this.limit - v_40;
|
|
1098
|
+
if (!this.#r_check_vowel_harmony()) break lab88;
|
|
1099
|
+
if (this.find_among_b(a_4) === 0) break lab88;
|
|
1100
|
+
if (!this.#r_mark_suffix_with_optional_y_consonant()) break lab88;
|
|
1101
|
+
}
|
|
1102
|
+
this.bra = this.c;
|
|
1103
|
+
this.slice_del();
|
|
1104
|
+
const v_41 = this.limit - this.c;
|
|
1105
|
+
lab92: {
|
|
1106
|
+
this.ket = this.c;
|
|
1107
|
+
lab93: {
|
|
1108
|
+
const v_42 = this.limit - this.c;
|
|
1109
|
+
lab94: {
|
|
1110
|
+
if (!this.#r_mark_possessives()) break lab94;
|
|
1111
|
+
this.bra = this.c;
|
|
1112
|
+
this.slice_del();
|
|
1113
|
+
const v_43 = this.limit - this.c;
|
|
1114
|
+
lab95: {
|
|
1115
|
+
this.ket = this.c;
|
|
1116
|
+
if (!this.#r_mark_lAr()) {
|
|
1117
|
+
this.c = this.limit - v_43;
|
|
1118
|
+
break lab95;
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
break lab93;
|
|
1122
|
+
}
|
|
1123
|
+
this.c = this.limit - v_42;
|
|
1124
|
+
if (!this.#r_mark_lAr()) {
|
|
1125
|
+
this.c = this.limit - v_41;
|
|
1126
|
+
break lab92;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
this.bra = this.c;
|
|
1130
|
+
this.slice_del();
|
|
1131
|
+
this.ket = this.c;
|
|
1132
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
1133
|
+
this.c = this.limit - v_41;
|
|
1134
|
+
break lab92;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
break lab45;
|
|
1138
|
+
}
|
|
1139
|
+
this.c = this.limit - v_19;
|
|
1140
|
+
this.ket = this.c;
|
|
1141
|
+
lab96: {
|
|
1142
|
+
const v_44 = this.limit - this.c;
|
|
1143
|
+
lab97: {
|
|
1144
|
+
if (!this.#r_mark_possessives()) break lab97;
|
|
1145
|
+
break lab96;
|
|
1146
|
+
}
|
|
1147
|
+
this.c = this.limit - v_44;
|
|
1148
|
+
if (!this.#r_mark_sU()) break lab44;
|
|
1149
|
+
}
|
|
1150
|
+
this.bra = this.c;
|
|
1151
|
+
this.slice_del();
|
|
1152
|
+
const v_45 = this.limit - this.c;
|
|
1153
|
+
lab98: {
|
|
1154
|
+
this.ket = this.c;
|
|
1155
|
+
if (!this.#r_mark_lAr()) {
|
|
1156
|
+
this.c = this.limit - v_45;
|
|
1157
|
+
break lab98;
|
|
1158
|
+
}
|
|
1159
|
+
this.bra = this.c;
|
|
1160
|
+
this.slice_del();
|
|
1161
|
+
if (!this.#r_stem_suffix_chain_before_ki()) {
|
|
1162
|
+
this.c = this.limit - v_45;
|
|
1163
|
+
break lab98;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
this.c = this.limit - v_18;
|
|
1169
|
+
this.c = this.limit_backward;
|
|
1170
|
+
this.limit_backward = this.c;
|
|
1171
|
+
this.c = this.limit;
|
|
1172
|
+
{
|
|
1173
|
+
const v_46 = this.limit - this.c;
|
|
1174
|
+
lab99: {
|
|
1175
|
+
if (!this.eq_s_b("ad")) break lab99;
|
|
1176
|
+
const v_47 = this.limit - this.c;
|
|
1177
|
+
lab100: {
|
|
1178
|
+
if (!this.eq_s_b("soy")) {
|
|
1179
|
+
this.c = this.limit - v_47;
|
|
1180
|
+
break lab100;
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
if (
|
|
1184
|
+
/**@type {boolean}*/
|
|
1185
|
+
this.c > this.limit_backward
|
|
1186
|
+
) break lab99;
|
|
1187
|
+
return false;
|
|
1188
|
+
}
|
|
1189
|
+
this.c = this.limit - v_46;
|
|
1190
|
+
}
|
|
1191
|
+
const v_48 = this.limit - this.c;
|
|
1192
|
+
lab101: {
|
|
1193
|
+
this.ket = this.c;
|
|
1194
|
+
this.bra = this.c;
|
|
1195
|
+
lab102: {
|
|
1196
|
+
lab103: {
|
|
1197
|
+
if (!this.eq_s_b("d")) break lab103;
|
|
1198
|
+
break lab102;
|
|
1199
|
+
}
|
|
1200
|
+
if (!this.eq_s_b("g")) break lab101;
|
|
1201
|
+
}
|
|
1202
|
+
if (!this.go_out_grouping_b(g_vowel, 97, 305)) break lab101;
|
|
1203
|
+
lab104: {
|
|
1204
|
+
const v_49 = this.limit - this.c;
|
|
1205
|
+
lab105: {
|
|
1206
|
+
lab106: {
|
|
1207
|
+
lab107: {
|
|
1208
|
+
if (!this.eq_s_b("a")) break lab107;
|
|
1209
|
+
break lab106;
|
|
1210
|
+
}
|
|
1211
|
+
if (!this.eq_s_b("\u0131")) break lab105;
|
|
1212
|
+
}
|
|
1213
|
+
this.slice_from("\u0131");
|
|
1214
|
+
break lab104;
|
|
1215
|
+
}
|
|
1216
|
+
this.c = this.limit - v_49;
|
|
1217
|
+
lab108: {
|
|
1218
|
+
lab109: {
|
|
1219
|
+
lab110: {
|
|
1220
|
+
if (!this.eq_s_b("e")) break lab110;
|
|
1221
|
+
break lab109;
|
|
1222
|
+
}
|
|
1223
|
+
if (!this.eq_s_b("i")) break lab108;
|
|
1224
|
+
}
|
|
1225
|
+
this.slice_from("i");
|
|
1226
|
+
break lab104;
|
|
1227
|
+
}
|
|
1228
|
+
this.c = this.limit - v_49;
|
|
1229
|
+
lab111: {
|
|
1230
|
+
lab112: {
|
|
1231
|
+
lab113: {
|
|
1232
|
+
if (!this.eq_s_b("o")) break lab113;
|
|
1233
|
+
break lab112;
|
|
1234
|
+
}
|
|
1235
|
+
if (!this.eq_s_b("u")) break lab111;
|
|
1236
|
+
}
|
|
1237
|
+
this.slice_from("u");
|
|
1238
|
+
break lab104;
|
|
1239
|
+
}
|
|
1240
|
+
this.c = this.limit - v_49;
|
|
1241
|
+
lab114: {
|
|
1242
|
+
lab115: {
|
|
1243
|
+
if (!this.eq_s_b("\xF6")) break lab115;
|
|
1244
|
+
break lab114;
|
|
1245
|
+
}
|
|
1246
|
+
if (!this.eq_s_b("\xFC")) break lab101;
|
|
1247
|
+
}
|
|
1248
|
+
this.slice_from("\xFC");
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
this.c = this.limit - v_48;
|
|
1252
|
+
const v_50 = this.limit - this.c;
|
|
1253
|
+
lab116: {
|
|
1254
|
+
this.ket = this.c;
|
|
1255
|
+
a = this.find_among_b(a_23);
|
|
1256
|
+
if (a === 0) break lab116;
|
|
1257
|
+
this.bra = this.c;
|
|
1258
|
+
this.slice_from(as_23[a - 1]);
|
|
1259
|
+
}
|
|
1260
|
+
this.c = this.limit - v_50;
|
|
1261
|
+
this.c = this.limit_backward;
|
|
1262
|
+
return true;
|
|
397
1263
|
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
word = result;
|
|
403
|
-
result = tryRemoveGenitive(word);
|
|
404
|
-
if (changed(word, result)) return result;
|
|
405
|
-
result = tryRemoveAccusative(word);
|
|
406
|
-
if (changed(word, result)) return result;
|
|
407
|
-
return word;
|
|
1264
|
+
stem(input) {
|
|
1265
|
+
this.setCurrent(input);
|
|
1266
|
+
this.#stem();
|
|
1267
|
+
return this.getCurrent();
|
|
408
1268
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
function stem(word) {
|
|
414
|
-
if (vowelCount(word) < 2) return word;
|
|
415
|
-
const { word: afterNominal, removed: nominalRemoved } = nominalVerbSuffixes(word);
|
|
416
|
-
word = afterNominal;
|
|
417
|
-
if (!nominalRemoved) return word;
|
|
418
|
-
word = nounSuffixes(word);
|
|
419
|
-
if (word.endsWith("soyad") || word === "ad") return word;
|
|
420
|
-
word = handleVowelInsertion(word);
|
|
421
|
-
word = handleConsonantSoftening(word);
|
|
422
|
-
return word;
|
|
1269
|
+
};
|
|
1270
|
+
var shared = new TurkishStemmer();
|
|
1271
|
+
function stem(token) {
|
|
1272
|
+
return shared.stem(token);
|
|
423
1273
|
}
|
|
1274
|
+
|
|
1275
|
+
// src/languages/turkish.ts
|
|
424
1276
|
var stopWords = /* @__PURE__ */ new Set([
|
|
425
1277
|
"acaba",
|
|
426
1278
|
"acep",
|
|
@@ -667,9 +1519,10 @@ var stopWords = /* @__PURE__ */ new Set([
|
|
|
667
1519
|
]);
|
|
668
1520
|
var turkish = {
|
|
669
1521
|
name: "turkish",
|
|
1522
|
+
revision: "c537dbdae6350a3c",
|
|
670
1523
|
stemmer: stem,
|
|
671
1524
|
stopWords,
|
|
672
|
-
tokenizer: { splitPattern: /[^a-z0-9
|
|
1525
|
+
tokenizer: { splitPattern: /[^a-z0-9çğıöşüâî]+/gi }
|
|
673
1526
|
};
|
|
674
1527
|
|
|
675
1528
|
export { turkish };
|