PostgreSQL Source Code git master
stem_UTF_8_turkish.c
Go to the documentation of this file.
1/* Generated from turkish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
2
4
5#include <stddef.h>
6
7#include "snowball_runtime.h"
8
9struct SN_local {
10 struct SN_env z;
12};
13
14typedef struct SN_local SN_local;
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19extern int turkish_UTF_8_stem(struct SN_env * z);
20#ifdef __cplusplus
21}
22#endif
23
24static int r_stem_suffix_chain_before_ki(struct SN_env * z);
25static int r_stem_noun_suffixes(struct SN_env * z);
26static int r_stem_nominal_verb_suffixes(struct SN_env * z);
27static int r_remove_proper_noun_suffix(struct SN_env * z);
28static int r_postlude(struct SN_env * z);
29static int r_post_process_last_consonants(struct SN_env * z);
30static int r_more_than_one_syllable_word(struct SN_env * z);
35static int r_mark_ysA(struct SN_env * z);
36static int r_mark_ymUs_(struct SN_env * z);
37static int r_mark_yken(struct SN_env * z);
38static int r_mark_yDU(struct SN_env * z);
39static int r_mark_yUz(struct SN_env * z);
40static int r_mark_yUm(struct SN_env * z);
41static int r_mark_yU(struct SN_env * z);
42static int r_mark_ylA(struct SN_env * z);
43static int r_mark_yA(struct SN_env * z);
44static int r_mark_possessives(struct SN_env * z);
45static int r_mark_sUnUz(struct SN_env * z);
46static int r_mark_sUn(struct SN_env * z);
47static int r_mark_sU(struct SN_env * z);
48static int r_mark_nUz(struct SN_env * z);
49static int r_mark_nUn(struct SN_env * z);
50static int r_mark_nU(struct SN_env * z);
51static int r_mark_ndAn(struct SN_env * z);
52static int r_mark_ndA(struct SN_env * z);
53static int r_mark_ncA(struct SN_env * z);
54static int r_mark_nA(struct SN_env * z);
55static int r_mark_lArI(struct SN_env * z);
56static int r_mark_lAr(struct SN_env * z);
57static int r_mark_ki(struct SN_env * z);
58static int r_mark_DUr(struct SN_env * z);
59static int r_mark_DAn(struct SN_env * z);
60static int r_mark_DA(struct SN_env * z);
61static int r_mark_cAsInA(struct SN_env * z);
62static int r_is_reserved_word(struct SN_env * z);
63static int r_check_vowel_harmony(struct SN_env * z);
65
66static const symbol s_0[] = { 0xC4, 0xB1 };
67static const symbol s_1[] = { 0xC3, 0xB6 };
68static const symbol s_2[] = { 0xC3, 0xBC };
69static const symbol s_3[] = { 'k', 'i' };
70static const symbol s_4[] = { 'k', 'e', 'n' };
71static const symbol s_5[] = { 'p' };
72static const symbol s_6[] = { 0xC3, 0xA7 };
73static const symbol s_7[] = { 't' };
74static const symbol s_8[] = { 'k' };
75static const symbol s_9[] = { 0xC4, 0xB1 };
76static const symbol s_10[] = { 0xC4, 0xB1 };
77static const symbol s_11[] = { 'i' };
78static const symbol s_12[] = { 'u' };
79static const symbol s_13[] = { 0xC3, 0xB6 };
80static const symbol s_14[] = { 0xC3, 0xBC };
81static const symbol s_15[] = { 0xC3, 0xBC };
82static const symbol s_16[] = { 'a', 'd' };
83static const symbol s_17[] = { 's', 'o', 'y' };
84
85static const symbol s_0_0[1] = { 'm' };
86static const symbol s_0_1[1] = { 'n' };
87static const symbol s_0_2[3] = { 'm', 'i', 'z' };
88static const symbol s_0_3[3] = { 'n', 'i', 'z' };
89static const symbol s_0_4[3] = { 'm', 'u', 'z' };
90static const symbol s_0_5[3] = { 'n', 'u', 'z' };
91static const symbol s_0_6[4] = { 'm', 0xC4, 0xB1, 'z' };
92static const symbol s_0_7[4] = { 'n', 0xC4, 0xB1, 'z' };
93static const symbol s_0_8[4] = { 'm', 0xC3, 0xBC, 'z' };
94static const symbol s_0_9[4] = { 'n', 0xC3, 0xBC, 'z' };
95static const struct among a_0[10] = {
96{ 1, s_0_0, 0, -1, 0},
97{ 1, s_0_1, 0, -1, 0},
98{ 3, s_0_2, 0, -1, 0},
99{ 3, s_0_3, 0, -1, 0},
100{ 3, s_0_4, 0, -1, 0},
101{ 3, s_0_5, 0, -1, 0},
102{ 4, s_0_6, 0, -1, 0},
103{ 4, s_0_7, 0, -1, 0},
104{ 4, s_0_8, 0, -1, 0},
105{ 4, s_0_9, 0, -1, 0}
106};
107
108static const symbol s_1_0[4] = { 'l', 'e', 'r', 'i' };
109static const symbol s_1_1[5] = { 'l', 'a', 'r', 0xC4, 0xB1 };
110static const struct among a_1[2] = {
111{ 4, s_1_0, 0, -1, 0},
112{ 5, s_1_1, 0, -1, 0}
113};
114
115static const symbol s_2_0[2] = { 'n', 'i' };
116static const symbol s_2_1[2] = { 'n', 'u' };
117static const symbol s_2_2[3] = { 'n', 0xC4, 0xB1 };
118static const symbol s_2_3[3] = { 'n', 0xC3, 0xBC };
119static const struct among a_2[4] = {
120{ 2, s_2_0, 0, -1, 0},
121{ 2, s_2_1, 0, -1, 0},
122{ 3, s_2_2, 0, -1, 0},
123{ 3, s_2_3, 0, -1, 0}
124};
125
126static const symbol s_3_0[2] = { 'i', 'n' };
127static const symbol s_3_1[2] = { 'u', 'n' };
128static const symbol s_3_2[3] = { 0xC4, 0xB1, 'n' };
129static const symbol s_3_3[3] = { 0xC3, 0xBC, 'n' };
130static const struct among a_3[4] = {
131{ 2, s_3_0, 0, -1, 0},
132{ 2, s_3_1, 0, -1, 0},
133{ 3, s_3_2, 0, -1, 0},
134{ 3, s_3_3, 0, -1, 0}
135};
136
137static const symbol s_5_0[2] = { 'n', 'a' };
138static const symbol s_5_1[2] = { 'n', 'e' };
139static const struct among a_5[2] = {
140{ 2, s_5_0, 0, -1, 0},
141{ 2, s_5_1, 0, -1, 0}
142};
143
144static const symbol s_6_0[2] = { 'd', 'a' };
145static const symbol s_6_1[2] = { 't', 'a' };
146static const symbol s_6_2[2] = { 'd', 'e' };
147static const symbol s_6_3[2] = { 't', 'e' };
148static const struct among a_6[4] = {
149{ 2, s_6_0, 0, -1, 0},
150{ 2, s_6_1, 0, -1, 0},
151{ 2, s_6_2, 0, -1, 0},
152{ 2, s_6_3, 0, -1, 0}
153};
154
155static const symbol s_7_0[3] = { 'n', 'd', 'a' };
156static const symbol s_7_1[3] = { 'n', 'd', 'e' };
157static const struct among a_7[2] = {
158{ 3, s_7_0, 0, -1, 0},
159{ 3, s_7_1, 0, -1, 0}
160};
161
162static const symbol s_8_0[3] = { 'd', 'a', 'n' };
163static const symbol s_8_1[3] = { 't', 'a', 'n' };
164static const symbol s_8_2[3] = { 'd', 'e', 'n' };
165static const symbol s_8_3[3] = { 't', 'e', 'n' };
166static const struct among a_8[4] = {
167{ 3, s_8_0, 0, -1, 0},
168{ 3, s_8_1, 0, -1, 0},
169{ 3, s_8_2, 0, -1, 0},
170{ 3, s_8_3, 0, -1, 0}
171};
172
173static const symbol s_9_0[4] = { 'n', 'd', 'a', 'n' };
174static const symbol s_9_1[4] = { 'n', 'd', 'e', 'n' };
175static const struct among a_9[2] = {
176{ 4, s_9_0, 0, -1, 0},
177{ 4, s_9_1, 0, -1, 0}
178};
179
180static const symbol s_10_0[2] = { 'l', 'a' };
181static const symbol s_10_1[2] = { 'l', 'e' };
182static const struct among a_10[2] = {
183{ 2, s_10_0, 0, -1, 0},
184{ 2, s_10_1, 0, -1, 0}
185};
186
187static const symbol s_11_0[2] = { 'c', 'a' };
188static const symbol s_11_1[2] = { 'c', 'e' };
189static const struct among a_11[2] = {
190{ 2, s_11_0, 0, -1, 0},
191{ 2, s_11_1, 0, -1, 0}
192};
193
194static const symbol s_12_0[2] = { 'i', 'm' };
195static const symbol s_12_1[2] = { 'u', 'm' };
196static const symbol s_12_2[3] = { 0xC4, 0xB1, 'm' };
197static const symbol s_12_3[3] = { 0xC3, 0xBC, 'm' };
198static const struct among a_12[4] = {
199{ 2, s_12_0, 0, -1, 0},
200{ 2, s_12_1, 0, -1, 0},
201{ 3, s_12_2, 0, -1, 0},
202{ 3, s_12_3, 0, -1, 0}
203};
204
205static const symbol s_13_0[3] = { 's', 'i', 'n' };
206static const symbol s_13_1[3] = { 's', 'u', 'n' };
207static const symbol s_13_2[4] = { 's', 0xC4, 0xB1, 'n' };
208static const symbol s_13_3[4] = { 's', 0xC3, 0xBC, 'n' };
209static const struct among a_13[4] = {
210{ 3, s_13_0, 0, -1, 0},
211{ 3, s_13_1, 0, -1, 0},
212{ 4, s_13_2, 0, -1, 0},
213{ 4, s_13_3, 0, -1, 0}
214};
215
216static const symbol s_14_0[2] = { 'i', 'z' };
217static const symbol s_14_1[2] = { 'u', 'z' };
218static const symbol s_14_2[3] = { 0xC4, 0xB1, 'z' };
219static const symbol s_14_3[3] = { 0xC3, 0xBC, 'z' };
220static const struct among a_14[4] = {
221{ 2, s_14_0, 0, -1, 0},
222{ 2, s_14_1, 0, -1, 0},
223{ 3, s_14_2, 0, -1, 0},
224{ 3, s_14_3, 0, -1, 0}
225};
226
227static const symbol s_15_0[5] = { 's', 'i', 'n', 'i', 'z' };
228static const symbol s_15_1[5] = { 's', 'u', 'n', 'u', 'z' };
229static const symbol s_15_2[7] = { 's', 0xC4, 0xB1, 'n', 0xC4, 0xB1, 'z' };
230static const symbol s_15_3[7] = { 's', 0xC3, 0xBC, 'n', 0xC3, 0xBC, 'z' };
231static const struct among a_15[4] = {
232{ 5, s_15_0, 0, -1, 0},
233{ 5, s_15_1, 0, -1, 0},
234{ 7, s_15_2, 0, -1, 0},
235{ 7, s_15_3, 0, -1, 0}
236};
237
238static const symbol s_16_0[3] = { 'l', 'a', 'r' };
239static const symbol s_16_1[3] = { 'l', 'e', 'r' };
240static const struct among a_16[2] = {
241{ 3, s_16_0, 0, -1, 0},
242{ 3, s_16_1, 0, -1, 0}
243};
244
245static const symbol s_17_0[3] = { 'n', 'i', 'z' };
246static const symbol s_17_1[3] = { 'n', 'u', 'z' };
247static const symbol s_17_2[4] = { 'n', 0xC4, 0xB1, 'z' };
248static const symbol s_17_3[4] = { 'n', 0xC3, 0xBC, 'z' };
249static const struct among a_17[4] = {
250{ 3, s_17_0, 0, -1, 0},
251{ 3, s_17_1, 0, -1, 0},
252{ 4, s_17_2, 0, -1, 0},
253{ 4, s_17_3, 0, -1, 0}
254};
255
256static const symbol s_18_0[3] = { 'd', 'i', 'r' };
257static const symbol s_18_1[3] = { 't', 'i', 'r' };
258static const symbol s_18_2[3] = { 'd', 'u', 'r' };
259static const symbol s_18_3[3] = { 't', 'u', 'r' };
260static const symbol s_18_4[4] = { 'd', 0xC4, 0xB1, 'r' };
261static const symbol s_18_5[4] = { 't', 0xC4, 0xB1, 'r' };
262static const symbol s_18_6[4] = { 'd', 0xC3, 0xBC, 'r' };
263static const symbol s_18_7[4] = { 't', 0xC3, 0xBC, 'r' };
264static const struct among a_18[8] = {
265{ 3, s_18_0, 0, -1, 0},
266{ 3, s_18_1, 0, -1, 0},
267{ 3, s_18_2, 0, -1, 0},
268{ 3, s_18_3, 0, -1, 0},
269{ 4, s_18_4, 0, -1, 0},
270{ 4, s_18_5, 0, -1, 0},
271{ 4, s_18_6, 0, -1, 0},
272{ 4, s_18_7, 0, -1, 0}
273};
274
275static const symbol s_19_0[7] = { 'c', 'a', 's', 0xC4, 0xB1, 'n', 'a' };
276static const symbol s_19_1[6] = { 'c', 'e', 's', 'i', 'n', 'e' };
277static const struct among a_19[2] = {
278{ 7, s_19_0, 0, -1, 0},
279{ 6, s_19_1, 0, -1, 0}
280};
281
282static const symbol s_20_0[2] = { 'd', 'i' };
283static const symbol s_20_1[2] = { 't', 'i' };
284static const symbol s_20_2[3] = { 'd', 'i', 'k' };
285static const symbol s_20_3[3] = { 't', 'i', 'k' };
286static const symbol s_20_4[3] = { 'd', 'u', 'k' };
287static const symbol s_20_5[3] = { 't', 'u', 'k' };
288static const symbol s_20_6[4] = { 'd', 0xC4, 0xB1, 'k' };
289static const symbol s_20_7[4] = { 't', 0xC4, 0xB1, 'k' };
290static const symbol s_20_8[4] = { 'd', 0xC3, 0xBC, 'k' };
291static const symbol s_20_9[4] = { 't', 0xC3, 0xBC, 'k' };
292static const symbol s_20_10[3] = { 'd', 'i', 'm' };
293static const symbol s_20_11[3] = { 't', 'i', 'm' };
294static const symbol s_20_12[3] = { 'd', 'u', 'm' };
295static const symbol s_20_13[3] = { 't', 'u', 'm' };
296static const symbol s_20_14[4] = { 'd', 0xC4, 0xB1, 'm' };
297static const symbol s_20_15[4] = { 't', 0xC4, 0xB1, 'm' };
298static const symbol s_20_16[4] = { 'd', 0xC3, 0xBC, 'm' };
299static const symbol s_20_17[4] = { 't', 0xC3, 0xBC, 'm' };
300static const symbol s_20_18[3] = { 'd', 'i', 'n' };
301static const symbol s_20_19[3] = { 't', 'i', 'n' };
302static const symbol s_20_20[3] = { 'd', 'u', 'n' };
303static const symbol s_20_21[3] = { 't', 'u', 'n' };
304static const symbol s_20_22[4] = { 'd', 0xC4, 0xB1, 'n' };
305static const symbol s_20_23[4] = { 't', 0xC4, 0xB1, 'n' };
306static const symbol s_20_24[4] = { 'd', 0xC3, 0xBC, 'n' };
307static const symbol s_20_25[4] = { 't', 0xC3, 0xBC, 'n' };
308static const symbol s_20_26[2] = { 'd', 'u' };
309static const symbol s_20_27[2] = { 't', 'u' };
310static const symbol s_20_28[3] = { 'd', 0xC4, 0xB1 };
311static const symbol s_20_29[3] = { 't', 0xC4, 0xB1 };
312static const symbol s_20_30[3] = { 'd', 0xC3, 0xBC };
313static const symbol s_20_31[3] = { 't', 0xC3, 0xBC };
314static const struct among a_20[32] = {
315{ 2, s_20_0, 0, -1, 0},
316{ 2, s_20_1, 0, -1, 0},
317{ 3, s_20_2, 0, -1, 0},
318{ 3, s_20_3, 0, -1, 0},
319{ 3, s_20_4, 0, -1, 0},
320{ 3, s_20_5, 0, -1, 0},
321{ 4, s_20_6, 0, -1, 0},
322{ 4, s_20_7, 0, -1, 0},
323{ 4, s_20_8, 0, -1, 0},
324{ 4, s_20_9, 0, -1, 0},
325{ 3, s_20_10, 0, -1, 0},
326{ 3, s_20_11, 0, -1, 0},
327{ 3, s_20_12, 0, -1, 0},
328{ 3, s_20_13, 0, -1, 0},
329{ 4, s_20_14, 0, -1, 0},
330{ 4, s_20_15, 0, -1, 0},
331{ 4, s_20_16, 0, -1, 0},
332{ 4, s_20_17, 0, -1, 0},
333{ 3, s_20_18, 0, -1, 0},
334{ 3, s_20_19, 0, -1, 0},
335{ 3, s_20_20, 0, -1, 0},
336{ 3, s_20_21, 0, -1, 0},
337{ 4, s_20_22, 0, -1, 0},
338{ 4, s_20_23, 0, -1, 0},
339{ 4, s_20_24, 0, -1, 0},
340{ 4, s_20_25, 0, -1, 0},
341{ 2, s_20_26, 0, -1, 0},
342{ 2, s_20_27, 0, -1, 0},
343{ 3, s_20_28, 0, -1, 0},
344{ 3, s_20_29, 0, -1, 0},
345{ 3, s_20_30, 0, -1, 0},
346{ 3, s_20_31, 0, -1, 0}
347};
348
349static const symbol s_21_0[2] = { 's', 'a' };
350static const symbol s_21_1[2] = { 's', 'e' };
351static const symbol s_21_2[3] = { 's', 'a', 'k' };
352static const symbol s_21_3[3] = { 's', 'e', 'k' };
353static const symbol s_21_4[3] = { 's', 'a', 'm' };
354static const symbol s_21_5[3] = { 's', 'e', 'm' };
355static const symbol s_21_6[3] = { 's', 'a', 'n' };
356static const symbol s_21_7[3] = { 's', 'e', 'n' };
357static const struct among a_21[8] = {
358{ 2, s_21_0, 0, -1, 0},
359{ 2, s_21_1, 0, -1, 0},
360{ 3, s_21_2, 0, -1, 0},
361{ 3, s_21_3, 0, -1, 0},
362{ 3, s_21_4, 0, -1, 0},
363{ 3, s_21_5, 0, -1, 0},
364{ 3, s_21_6, 0, -1, 0},
365{ 3, s_21_7, 0, -1, 0}
366};
367
368static const symbol s_22_0[4] = { 'm', 'i', 0xC5, 0x9F };
369static const symbol s_22_1[4] = { 'm', 'u', 0xC5, 0x9F };
370static const symbol s_22_2[5] = { 'm', 0xC4, 0xB1, 0xC5, 0x9F };
371static const symbol s_22_3[5] = { 'm', 0xC3, 0xBC, 0xC5, 0x9F };
372static const struct among a_22[4] = {
373{ 4, s_22_0, 0, -1, 0},
374{ 4, s_22_1, 0, -1, 0},
375{ 5, s_22_2, 0, -1, 0},
376{ 5, s_22_3, 0, -1, 0}
377};
378
379static const symbol s_23_0[1] = { 'b' };
380static const symbol s_23_1[1] = { 'c' };
381static const symbol s_23_2[1] = { 'd' };
382static const symbol s_23_3[2] = { 0xC4, 0x9F };
383static const struct among a_23[4] = {
384{ 1, s_23_0, 0, 1, 0},
385{ 1, s_23_1, 0, 2, 0},
386{ 1, s_23_2, 0, 3, 0},
387{ 2, s_23_3, 0, 4, 0}
388};
389
390static const unsigned char 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 };
391
392static const unsigned char 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 };
393
394static const unsigned char 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 };
395
396static const unsigned char g_vowel2[] = { 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130 };
397
398static const unsigned char 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 };
399
400static const unsigned char g_vowel4[] = { 17 };
401
402static const unsigned char g_vowel5[] = { 65 };
403
404static const unsigned char g_vowel6[] = { 65 };
405
406static int r_check_vowel_harmony(struct SN_env * z) {
407 {
408 int v_1 = z->l - z->c;
409 if (out_grouping_b_U(z, g_vowel, 97, 305, 1) < 0) return 0;
410 do {
411 int v_2 = z->l - z->c;
412 if (z->c <= z->lb || z->p[z->c - 1] != 'a') goto lab0;
413 z->c--;
414 if (out_grouping_b_U(z, g_vowel1, 97, 305, 1) < 0) goto lab0;
415 break;
416 lab0:
417 z->c = z->l - v_2;
418 if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab1;
419 z->c--;
420 if (out_grouping_b_U(z, g_vowel2, 101, 252, 1) < 0) goto lab1;
421 break;
422 lab1:
423 z->c = z->l - v_2;
424 if (!(eq_s_b(z, 2, s_0))) goto lab2;
425 if (out_grouping_b_U(z, g_vowel3, 97, 305, 1) < 0) goto lab2;
426 break;
427 lab2:
428 z->c = z->l - v_2;
429 if (z->c <= z->lb || z->p[z->c - 1] != 'i') goto lab3;
430 z->c--;
431 if (out_grouping_b_U(z, g_vowel4, 101, 105, 1) < 0) goto lab3;
432 break;
433 lab3:
434 z->c = z->l - v_2;
435 if (z->c <= z->lb || z->p[z->c - 1] != 'o') goto lab4;
436 z->c--;
437 if (out_grouping_b_U(z, g_vowel5, 111, 117, 1) < 0) goto lab4;
438 break;
439 lab4:
440 z->c = z->l - v_2;
441 if (!(eq_s_b(z, 2, s_1))) goto lab5;
442 if (out_grouping_b_U(z, g_vowel6, 246, 252, 1) < 0) goto lab5;
443 break;
444 lab5:
445 z->c = z->l - v_2;
446 if (z->c <= z->lb || z->p[z->c - 1] != 'u') goto lab6;
447 z->c--;
448 if (out_grouping_b_U(z, g_vowel5, 111, 117, 1) < 0) goto lab6;
449 break;
450 lab6:
451 z->c = z->l - v_2;
452 if (!(eq_s_b(z, 2, s_2))) return 0;
453 if (out_grouping_b_U(z, g_vowel6, 246, 252, 1) < 0) return 0;
454 } while (0);
455 z->c = z->l - v_1;
456 }
457 return 1;
458}
459
461 do {
462 int v_1 = z->l - z->c;
463 if (z->c <= z->lb || z->p[z->c - 1] != 'n') goto lab0;
464 z->c--;
465 {
466 int v_2 = z->l - z->c;
467 if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) goto lab0;
468 z->c = z->l - v_2;
469 }
470 break;
471 lab0:
472 z->c = z->l - v_1;
473 {
474 int v_3 = z->l - z->c;
475 if (z->c <= z->lb || z->p[z->c - 1] != 'n') goto lab1;
476 z->c--;
477 return 0;
478 lab1:
479 z->c = z->l - v_3;
480 }
481 {
482 int v_4 = z->l - z->c;
483 {
484 int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
485 if (ret < 0) return 0;
486 z->c = ret;
487 }
488 if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) return 0;
489 z->c = z->l - v_4;
490 }
491 } while (0);
492 return 1;
493}
494
496 do {
497 int v_1 = z->l - z->c;
498 if (z->c <= z->lb || z->p[z->c - 1] != 's') goto lab0;
499 z->c--;
500 {
501 int v_2 = z->l - z->c;
502 if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) goto lab0;
503 z->c = z->l - v_2;
504 }
505 break;
506 lab0:
507 z->c = z->l - v_1;
508 {
509 int v_3 = z->l - z->c;
510 if (z->c <= z->lb || z->p[z->c - 1] != 's') goto lab1;
511 z->c--;
512 return 0;
513 lab1:
514 z->c = z->l - v_3;
515 }
516 {
517 int v_4 = z->l - z->c;
518 {
519 int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
520 if (ret < 0) return 0;
521 z->c = ret;
522 }
523 if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) return 0;
524 z->c = z->l - v_4;
525 }
526 } while (0);
527 return 1;
528}
529
531 do {
532 int v_1 = z->l - z->c;
533 if (z->c <= z->lb || z->p[z->c - 1] != 'y') goto lab0;
534 z->c--;
535 {
536 int v_2 = z->l - z->c;
537 if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) goto lab0;
538 z->c = z->l - v_2;
539 }
540 break;
541 lab0:
542 z->c = z->l - v_1;
543 {
544 int v_3 = z->l - z->c;
545 if (z->c <= z->lb || z->p[z->c - 1] != 'y') goto lab1;
546 z->c--;
547 return 0;
548 lab1:
549 z->c = z->l - v_3;
550 }
551 {
552 int v_4 = z->l - z->c;
553 {
554 int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
555 if (ret < 0) return 0;
556 z->c = ret;
557 }
558 if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) return 0;
559 z->c = z->l - v_4;
560 }
561 } while (0);
562 return 1;
563}
564
566 do {
567 int v_1 = z->l - z->c;
568 if (in_grouping_b_U(z, g_U, 105, 305, 0)) goto lab0;
569 {
570 int v_2 = z->l - z->c;
571 if (out_grouping_b_U(z, g_vowel, 97, 305, 0)) goto lab0;
572 z->c = z->l - v_2;
573 }
574 break;
575 lab0:
576 z->c = z->l - v_1;
577 {
578 int v_3 = z->l - z->c;
579 if (in_grouping_b_U(z, g_U, 105, 305, 0)) goto lab1;
580 return 0;
581 lab1:
582 z->c = z->l - v_3;
583 }
584 {
585 int v_4 = z->l - z->c;
586 {
587 int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
588 if (ret < 0) return 0;
589 z->c = ret;
590 }
591 if (out_grouping_b_U(z, g_vowel, 97, 305, 0)) return 0;
592 z->c = z->l - v_4;
593 }
594 } while (0);
595 return 1;
596}
597
598static int r_mark_possessives(struct SN_env * z) {
599 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((67133440 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
600 if (!find_among_b(z, a_0, 10, 0)) return 0;
602}
603
604static int r_mark_sU(struct SN_env * z) {
605 {
606 int ret = r_check_vowel_harmony(z);
607 if (ret <= 0) return ret;
608 }
609 if (in_grouping_b_U(z, g_U, 105, 305, 0)) return 0;
611}
612
613static int r_mark_lArI(struct SN_env * z) {
614 if (z->c - 3 <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 177)) return 0;
615 return find_among_b(z, a_1, 2, 0) != 0;
616}
617
618static int r_mark_yU(struct SN_env * z) {
619 {
620 int ret = r_check_vowel_harmony(z);
621 if (ret <= 0) return ret;
622 }
623 if (in_grouping_b_U(z, g_U, 105, 305, 0)) return 0;
625}
626
627static int r_mark_nU(struct SN_env * z) {
628 {
629 int ret = r_check_vowel_harmony(z);
630 if (ret <= 0) return ret;
631 }
632 return find_among_b(z, a_2, 4, 0) != 0;
633}
634
635static int r_mark_nUn(struct SN_env * z) {
636 {
637 int ret = r_check_vowel_harmony(z);
638 if (ret <= 0) return ret;
639 }
640 if (z->c - 1 <= z->lb || z->p[z->c - 1] != 110) return 0;
641 if (!find_among_b(z, a_3, 4, 0)) return 0;
643}
644
645static int r_mark_yA(struct SN_env * z) {
646 {
647 int ret = r_check_vowel_harmony(z);
648 if (ret <= 0) return ret;
649 }
650 if (z->c <= z->lb || (z->p[z->c - 1] != 97 && z->p[z->c - 1] != 101)) return 0;
651 z->c--;
653}
654
655static int r_mark_nA(struct SN_env * z) {
656 {
657 int ret = r_check_vowel_harmony(z);
658 if (ret <= 0) return ret;
659 }
660 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 97 && z->p[z->c - 1] != 101)) return 0;
661 return find_among_b(z, a_5, 2, 0) != 0;
662}
663
664static int r_mark_DA(struct SN_env * z) {
665 {
666 int ret = r_check_vowel_harmony(z);
667 if (ret <= 0) return ret;
668 }
669 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 97 && z->p[z->c - 1] != 101)) return 0;
670 return find_among_b(z, a_6, 4, 0) != 0;
671}
672
673static int r_mark_ndA(struct SN_env * z) {
674 {
675 int ret = r_check_vowel_harmony(z);
676 if (ret <= 0) return ret;
677 }
678 if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 97 && z->p[z->c - 1] != 101)) return 0;
679 return find_among_b(z, a_7, 2, 0) != 0;
680}
681
682static int r_mark_DAn(struct SN_env * z) {
683 {
684 int ret = r_check_vowel_harmony(z);
685 if (ret <= 0) return ret;
686 }
687 if (z->c - 2 <= z->lb || z->p[z->c - 1] != 110) return 0;
688 return find_among_b(z, a_8, 4, 0) != 0;
689}
690
691static int r_mark_ndAn(struct SN_env * z) {
692 {
693 int ret = r_check_vowel_harmony(z);
694 if (ret <= 0) return ret;
695 }
696 if (z->c - 3 <= z->lb || z->p[z->c - 1] != 110) return 0;
697 return find_among_b(z, a_9, 2, 0) != 0;
698}
699
700static int r_mark_ylA(struct SN_env * z) {
701 {
702 int ret = r_check_vowel_harmony(z);
703 if (ret <= 0) return ret;
704 }
705 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 97 && z->p[z->c - 1] != 101)) return 0;
706 if (!find_among_b(z, a_10, 2, 0)) return 0;
708}
709
710static int r_mark_ki(struct SN_env * z) {
711 return eq_s_b(z, 2, s_3);
712}
713
714static int r_mark_ncA(struct SN_env * z) {
715 {
716 int ret = r_check_vowel_harmony(z);
717 if (ret <= 0) return ret;
718 }
719 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 97 && z->p[z->c - 1] != 101)) return 0;
720 if (!find_among_b(z, a_11, 2, 0)) return 0;
722}
723
724static int r_mark_yUm(struct SN_env * z) {
725 {
726 int ret = r_check_vowel_harmony(z);
727 if (ret <= 0) return ret;
728 }
729 if (z->c - 1 <= z->lb || z->p[z->c - 1] != 109) return 0;
730 if (!find_among_b(z, a_12, 4, 0)) return 0;
732}
733
734static int r_mark_sUn(struct SN_env * z) {
735 {
736 int ret = r_check_vowel_harmony(z);
737 if (ret <= 0) return ret;
738 }
739 if (z->c - 2 <= z->lb || z->p[z->c - 1] != 110) return 0;
740 return find_among_b(z, a_13, 4, 0) != 0;
741}
742
743static int r_mark_yUz(struct SN_env * z) {
744 {
745 int ret = r_check_vowel_harmony(z);
746 if (ret <= 0) return ret;
747 }
748 if (z->c - 1 <= z->lb || z->p[z->c - 1] != 122) return 0;
749 if (!find_among_b(z, a_14, 4, 0)) return 0;
751}
752
753static int r_mark_sUnUz(struct SN_env * z) {
754 if (z->c - 4 <= z->lb || z->p[z->c - 1] != 122) return 0;
755 return find_among_b(z, a_15, 4, 0) != 0;
756}
757
758static int r_mark_lAr(struct SN_env * z) {
759 {
760 int ret = r_check_vowel_harmony(z);
761 if (ret <= 0) return ret;
762 }
763 if (z->c - 2 <= z->lb || z->p[z->c - 1] != 114) return 0;
764 return find_among_b(z, a_16, 2, 0) != 0;
765}
766
767static int r_mark_nUz(struct SN_env * z) {
768 {
769 int ret = r_check_vowel_harmony(z);
770 if (ret <= 0) return ret;
771 }
772 if (z->c - 2 <= z->lb || z->p[z->c - 1] != 122) return 0;
773 return find_among_b(z, a_17, 4, 0) != 0;
774}
775
776static int r_mark_DUr(struct SN_env * z) {
777 {
778 int ret = r_check_vowel_harmony(z);
779 if (ret <= 0) return ret;
780 }
781 if (z->c - 2 <= z->lb || z->p[z->c - 1] != 114) return 0;
782 return find_among_b(z, a_18, 8, 0) != 0;
783}
784
785static int r_mark_cAsInA(struct SN_env * z) {
786 if (z->c - 5 <= z->lb || (z->p[z->c - 1] != 97 && z->p[z->c - 1] != 101)) return 0;
787 return find_among_b(z, a_19, 2, 0) != 0;
788}
789
790static int r_mark_yDU(struct SN_env * z) {
791 {
792 int ret = r_check_vowel_harmony(z);
793 if (ret <= 0) return ret;
794 }
795 if (!find_among_b(z, a_20, 32, 0)) return 0;
797}
798
799static int r_mark_ysA(struct SN_env * z) {
800 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((26658 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
801 if (!find_among_b(z, a_21, 8, 0)) return 0;
803}
804
805static int r_mark_ymUs_(struct SN_env * z) {
806 {
807 int ret = r_check_vowel_harmony(z);
808 if (ret <= 0) return ret;
809 }
810 if (z->c - 3 <= z->lb || z->p[z->c - 1] != 159) return 0;
811 if (!find_among_b(z, a_22, 4, 0)) return 0;
813}
814
815static int r_mark_yken(struct SN_env * z) {
816 if (!(eq_s_b(z, 3, s_4))) return 0;
818}
819
820static int r_stem_nominal_verb_suffixes(struct SN_env * z) {
821 z->ket = z->c;
822 ((SN_local *)z)->b_continue_stemming_noun_suffixes = 1;
823 do {
824 int v_1 = z->l - z->c;
825 do {
826 int v_2 = z->l - z->c;
827 {
828 int ret = r_mark_ymUs_(z);
829 if (ret == 0) goto lab1;
830 if (ret < 0) return ret;
831 }
832 break;
833 lab1:
834 z->c = z->l - v_2;
835 {
836 int ret = r_mark_yDU(z);
837 if (ret == 0) goto lab2;
838 if (ret < 0) return ret;
839 }
840 break;
841 lab2:
842 z->c = z->l - v_2;
843 {
844 int ret = r_mark_ysA(z);
845 if (ret == 0) goto lab3;
846 if (ret < 0) return ret;
847 }
848 break;
849 lab3:
850 z->c = z->l - v_2;
851 {
852 int ret = r_mark_yken(z);
853 if (ret == 0) goto lab0;
854 if (ret < 0) return ret;
855 }
856 } while (0);
857 break;
858 lab0:
859 z->c = z->l - v_1;
860 {
861 int ret = r_mark_cAsInA(z);
862 if (ret == 0) goto lab4;
863 if (ret < 0) return ret;
864 }
865 do {
866 int v_3 = z->l - z->c;
867 {
868 int ret = r_mark_sUnUz(z);
869 if (ret == 0) goto lab5;
870 if (ret < 0) return ret;
871 }
872 break;
873 lab5:
874 z->c = z->l - v_3;
875 {
876 int ret = r_mark_lAr(z);
877 if (ret == 0) goto lab6;
878 if (ret < 0) return ret;
879 }
880 break;
881 lab6:
882 z->c = z->l - v_3;
883 {
884 int ret = r_mark_yUm(z);
885 if (ret == 0) goto lab7;
886 if (ret < 0) return ret;
887 }
888 break;
889 lab7:
890 z->c = z->l - v_3;
891 {
892 int ret = r_mark_sUn(z);
893 if (ret == 0) goto lab8;
894 if (ret < 0) return ret;
895 }
896 break;
897 lab8:
898 z->c = z->l - v_3;
899 {
900 int ret = r_mark_yUz(z);
901 if (ret == 0) goto lab9;
902 if (ret < 0) return ret;
903 }
904 break;
905 lab9:
906 z->c = z->l - v_3;
907 } while (0);
908 {
909 int ret = r_mark_ymUs_(z);
910 if (ret == 0) goto lab4;
911 if (ret < 0) return ret;
912 }
913 break;
914 lab4:
915 z->c = z->l - v_1;
916 {
917 int ret = r_mark_lAr(z);
918 if (ret == 0) goto lab10;
919 if (ret < 0) return ret;
920 }
921 z->bra = z->c;
922 {
923 int ret = slice_del(z);
924 if (ret < 0) return ret;
925 }
926 {
927 int v_4 = z->l - z->c;
928 z->ket = z->c;
929 do {
930 int v_5 = z->l - z->c;
931 {
932 int ret = r_mark_DUr(z);
933 if (ret == 0) goto lab12;
934 if (ret < 0) return ret;
935 }
936 break;
937 lab12:
938 z->c = z->l - v_5;
939 {
940 int ret = r_mark_yDU(z);
941 if (ret == 0) goto lab13;
942 if (ret < 0) return ret;
943 }
944 break;
945 lab13:
946 z->c = z->l - v_5;
947 {
948 int ret = r_mark_ysA(z);
949 if (ret == 0) goto lab14;
950 if (ret < 0) return ret;
951 }
952 break;
953 lab14:
954 z->c = z->l - v_5;
955 {
956 int ret = r_mark_ymUs_(z);
957 if (ret == 0) { z->c = z->l - v_4; goto lab11; }
958 if (ret < 0) return ret;
959 }
960 } while (0);
961 lab11:
962 ;
963 }
964 ((SN_local *)z)->b_continue_stemming_noun_suffixes = 0;
965 break;
966 lab10:
967 z->c = z->l - v_1;
968 {
969 int ret = r_mark_nUz(z);
970 if (ret == 0) goto lab15;
971 if (ret < 0) return ret;
972 }
973 do {
974 int v_6 = z->l - z->c;
975 {
976 int ret = r_mark_yDU(z);
977 if (ret == 0) goto lab16;
978 if (ret < 0) return ret;
979 }
980 break;
981 lab16:
982 z->c = z->l - v_6;
983 {
984 int ret = r_mark_ysA(z);
985 if (ret == 0) goto lab15;
986 if (ret < 0) return ret;
987 }
988 } while (0);
989 break;
990 lab15:
991 z->c = z->l - v_1;
992 do {
993 int v_7 = z->l - z->c;
994 {
995 int ret = r_mark_sUnUz(z);
996 if (ret == 0) goto lab18;
997 if (ret < 0) return ret;
998 }
999 break;
1000 lab18:
1001 z->c = z->l - v_7;
1002 {
1003 int ret = r_mark_yUz(z);
1004 if (ret == 0) goto lab19;
1005 if (ret < 0) return ret;
1006 }
1007 break;
1008 lab19:
1009 z->c = z->l - v_7;
1010 {
1011 int ret = r_mark_sUn(z);
1012 if (ret == 0) goto lab20;
1013 if (ret < 0) return ret;
1014 }
1015 break;
1016 lab20:
1017 z->c = z->l - v_7;
1018 {
1019 int ret = r_mark_yUm(z);
1020 if (ret == 0) goto lab17;
1021 if (ret < 0) return ret;
1022 }
1023 } while (0);
1024 z->bra = z->c;
1025 {
1026 int ret = slice_del(z);
1027 if (ret < 0) return ret;
1028 }
1029 {
1030 int v_8 = z->l - z->c;
1031 z->ket = z->c;
1032 {
1033 int ret = r_mark_ymUs_(z);
1034 if (ret == 0) { z->c = z->l - v_8; goto lab21; }
1035 if (ret < 0) return ret;
1036 }
1037 lab21:
1038 ;
1039 }
1040 break;
1041 lab17:
1042 z->c = z->l - v_1;
1043 {
1044 int ret = r_mark_DUr(z);
1045 if (ret <= 0) return ret;
1046 }
1047 z->bra = z->c;
1048 {
1049 int ret = slice_del(z);
1050 if (ret < 0) return ret;
1051 }
1052 {
1053 int v_9 = z->l - z->c;
1054 z->ket = z->c;
1055 do {
1056 int v_10 = z->l - z->c;
1057 {
1058 int ret = r_mark_sUnUz(z);
1059 if (ret == 0) goto lab23;
1060 if (ret < 0) return ret;
1061 }
1062 break;
1063 lab23:
1064 z->c = z->l - v_10;
1065 {
1066 int ret = r_mark_lAr(z);
1067 if (ret == 0) goto lab24;
1068 if (ret < 0) return ret;
1069 }
1070 break;
1071 lab24:
1072 z->c = z->l - v_10;
1073 {
1074 int ret = r_mark_yUm(z);
1075 if (ret == 0) goto lab25;
1076 if (ret < 0) return ret;
1077 }
1078 break;
1079 lab25:
1080 z->c = z->l - v_10;
1081 {
1082 int ret = r_mark_sUn(z);
1083 if (ret == 0) goto lab26;
1084 if (ret < 0) return ret;
1085 }
1086 break;
1087 lab26:
1088 z->c = z->l - v_10;
1089 {
1090 int ret = r_mark_yUz(z);
1091 if (ret == 0) goto lab27;
1092 if (ret < 0) return ret;
1093 }
1094 break;
1095 lab27:
1096 z->c = z->l - v_10;
1097 } while (0);
1098 {
1099 int ret = r_mark_ymUs_(z);
1100 if (ret == 0) { z->c = z->l - v_9; goto lab22; }
1101 if (ret < 0) return ret;
1102 }
1103 lab22:
1104 ;
1105 }
1106 } while (0);
1107 z->bra = z->c;
1108 {
1109 int ret = slice_del(z);
1110 if (ret < 0) return ret;
1111 }
1112 return 1;
1113}
1114
1116 z->ket = z->c;
1117 {
1118 int ret = r_mark_ki(z);
1119 if (ret <= 0) return ret;
1120 }
1121 do {
1122 int v_1 = z->l - z->c;
1123 {
1124 int ret = r_mark_DA(z);
1125 if (ret == 0) goto lab0;
1126 if (ret < 0) return ret;
1127 }
1128 z->bra = z->c;
1129 {
1130 int ret = slice_del(z);
1131 if (ret < 0) return ret;
1132 }
1133 {
1134 int v_2 = z->l - z->c;
1135 z->ket = z->c;
1136 do {
1137 int v_3 = z->l - z->c;
1138 {
1139 int ret = r_mark_lAr(z);
1140 if (ret == 0) goto lab2;
1141 if (ret < 0) return ret;
1142 }
1143 z->bra = z->c;
1144 {
1145 int ret = slice_del(z);
1146 if (ret < 0) return ret;
1147 }
1148 {
1149 int v_4 = z->l - z->c;
1150 {
1151 int ret = r_stem_suffix_chain_before_ki(z);
1152 if (ret == 0) { z->c = z->l - v_4; goto lab3; }
1153 if (ret < 0) return ret;
1154 }
1155 lab3:
1156 ;
1157 }
1158 break;
1159 lab2:
1160 z->c = z->l - v_3;
1161 {
1162 int ret = r_mark_possessives(z);
1163 if (ret == 0) { z->c = z->l - v_2; goto lab1; }
1164 if (ret < 0) return ret;
1165 }
1166 z->bra = z->c;
1167 {
1168 int ret = slice_del(z);
1169 if (ret < 0) return ret;
1170 }
1171 {
1172 int v_5 = z->l - z->c;
1173 z->ket = z->c;
1174 {
1175 int ret = r_mark_lAr(z);
1176 if (ret == 0) { z->c = z->l - v_5; goto lab4; }
1177 if (ret < 0) return ret;
1178 }
1179 z->bra = z->c;
1180 {
1181 int ret = slice_del(z);
1182 if (ret < 0) return ret;
1183 }
1184 {
1185 int ret = r_stem_suffix_chain_before_ki(z);
1186 if (ret == 0) { z->c = z->l - v_5; goto lab4; }
1187 if (ret < 0) return ret;
1188 }
1189 lab4:
1190 ;
1191 }
1192 } while (0);
1193 lab1:
1194 ;
1195 }
1196 break;
1197 lab0:
1198 z->c = z->l - v_1;
1199 {
1200 int ret = r_mark_nUn(z);
1201 if (ret == 0) goto lab5;
1202 if (ret < 0) return ret;
1203 }
1204 z->bra = z->c;
1205 {
1206 int ret = slice_del(z);
1207 if (ret < 0) return ret;
1208 }
1209 {
1210 int v_6 = z->l - z->c;
1211 z->ket = z->c;
1212 do {
1213 int v_7 = z->l - z->c;
1214 {
1215 int ret = r_mark_lArI(z);
1216 if (ret == 0) goto lab7;
1217 if (ret < 0) return ret;
1218 }
1219 z->bra = z->c;
1220 {
1221 int ret = slice_del(z);
1222 if (ret < 0) return ret;
1223 }
1224 break;
1225 lab7:
1226 z->c = z->l - v_7;
1227 z->ket = z->c;
1228 do {
1229 int v_8 = z->l - z->c;
1230 {
1231 int ret = r_mark_possessives(z);
1232 if (ret == 0) goto lab9;
1233 if (ret < 0) return ret;
1234 }
1235 break;
1236 lab9:
1237 z->c = z->l - v_8;
1238 {
1239 int ret = r_mark_sU(z);
1240 if (ret == 0) goto lab8;
1241 if (ret < 0) return ret;
1242 }
1243 } while (0);
1244 z->bra = z->c;
1245 {
1246 int ret = slice_del(z);
1247 if (ret < 0) return ret;
1248 }
1249 {
1250 int v_9 = z->l - z->c;
1251 z->ket = z->c;
1252 {
1253 int ret = r_mark_lAr(z);
1254 if (ret == 0) { z->c = z->l - v_9; goto lab10; }
1255 if (ret < 0) return ret;
1256 }
1257 z->bra = z->c;
1258 {
1259 int ret = slice_del(z);
1260 if (ret < 0) return ret;
1261 }
1262 {
1263 int ret = r_stem_suffix_chain_before_ki(z);
1264 if (ret == 0) { z->c = z->l - v_9; goto lab10; }
1265 if (ret < 0) return ret;
1266 }
1267 lab10:
1268 ;
1269 }
1270 break;
1271 lab8:
1272 z->c = z->l - v_7;
1273 {
1274 int ret = r_stem_suffix_chain_before_ki(z);
1275 if (ret == 0) { z->c = z->l - v_6; goto lab6; }
1276 if (ret < 0) return ret;
1277 }
1278 } while (0);
1279 lab6:
1280 ;
1281 }
1282 break;
1283 lab5:
1284 z->c = z->l - v_1;
1285 {
1286 int ret = r_mark_ndA(z);
1287 if (ret <= 0) return ret;
1288 }
1289 do {
1290 int v_10 = z->l - z->c;
1291 {
1292 int ret = r_mark_lArI(z);
1293 if (ret == 0) goto lab11;
1294 if (ret < 0) return ret;
1295 }
1296 z->bra = z->c;
1297 {
1298 int ret = slice_del(z);
1299 if (ret < 0) return ret;
1300 }
1301 break;
1302 lab11:
1303 z->c = z->l - v_10;
1304 {
1305 int ret = r_mark_sU(z);
1306 if (ret == 0) goto lab12;
1307 if (ret < 0) return ret;
1308 }
1309 z->bra = z->c;
1310 {
1311 int ret = slice_del(z);
1312 if (ret < 0) return ret;
1313 }
1314 {
1315 int v_11 = z->l - z->c;
1316 z->ket = z->c;
1317 {
1318 int ret = r_mark_lAr(z);
1319 if (ret == 0) { z->c = z->l - v_11; goto lab13; }
1320 if (ret < 0) return ret;
1321 }
1322 z->bra = z->c;
1323 {
1324 int ret = slice_del(z);
1325 if (ret < 0) return ret;
1326 }
1327 {
1328 int ret = r_stem_suffix_chain_before_ki(z);
1329 if (ret == 0) { z->c = z->l - v_11; goto lab13; }
1330 if (ret < 0) return ret;
1331 }
1332 lab13:
1333 ;
1334 }
1335 break;
1336 lab12:
1337 z->c = z->l - v_10;
1338 {
1339 int ret = r_stem_suffix_chain_before_ki(z);
1340 if (ret <= 0) return ret;
1341 }
1342 } while (0);
1343 } while (0);
1344 return 1;
1345}
1346
1347static int r_stem_noun_suffixes(struct SN_env * z) {
1348 do {
1349 int v_1 = z->l - z->c;
1350 z->ket = z->c;
1351 {
1352 int ret = r_mark_lAr(z);
1353 if (ret == 0) goto lab0;
1354 if (ret < 0) return ret;
1355 }
1356 z->bra = z->c;
1357 {
1358 int ret = slice_del(z);
1359 if (ret < 0) return ret;
1360 }
1361 {
1362 int v_2 = z->l - z->c;
1363 {
1364 int ret = r_stem_suffix_chain_before_ki(z);
1365 if (ret == 0) { z->c = z->l - v_2; goto lab1; }
1366 if (ret < 0) return ret;
1367 }
1368 lab1:
1369 ;
1370 }
1371 break;
1372 lab0:
1373 z->c = z->l - v_1;
1374 z->ket = z->c;
1375 {
1376 int ret = r_mark_ncA(z);
1377 if (ret == 0) goto lab2;
1378 if (ret < 0) return ret;
1379 }
1380 z->bra = z->c;
1381 {
1382 int ret = slice_del(z);
1383 if (ret < 0) return ret;
1384 }
1385 {
1386 int v_3 = z->l - z->c;
1387 do {
1388 int v_4 = z->l - z->c;
1389 z->ket = z->c;
1390 {
1391 int ret = r_mark_lArI(z);
1392 if (ret == 0) goto lab4;
1393 if (ret < 0) return ret;
1394 }
1395 z->bra = z->c;
1396 {
1397 int ret = slice_del(z);
1398 if (ret < 0) return ret;
1399 }
1400 break;
1401 lab4:
1402 z->c = z->l - v_4;
1403 z->ket = z->c;
1404 do {
1405 int v_5 = z->l - z->c;
1406 {
1407 int ret = r_mark_possessives(z);
1408 if (ret == 0) goto lab6;
1409 if (ret < 0) return ret;
1410 }
1411 break;
1412 lab6:
1413 z->c = z->l - v_5;
1414 {
1415 int ret = r_mark_sU(z);
1416 if (ret == 0) goto lab5;
1417 if (ret < 0) return ret;
1418 }
1419 } while (0);
1420 z->bra = z->c;
1421 {
1422 int ret = slice_del(z);
1423 if (ret < 0) return ret;
1424 }
1425 {
1426 int v_6 = z->l - z->c;
1427 z->ket = z->c;
1428 {
1429 int ret = r_mark_lAr(z);
1430 if (ret == 0) { z->c = z->l - v_6; goto lab7; }
1431 if (ret < 0) return ret;
1432 }
1433 z->bra = z->c;
1434 {
1435 int ret = slice_del(z);
1436 if (ret < 0) return ret;
1437 }
1438 {
1439 int ret = r_stem_suffix_chain_before_ki(z);
1440 if (ret == 0) { z->c = z->l - v_6; goto lab7; }
1441 if (ret < 0) return ret;
1442 }
1443 lab7:
1444 ;
1445 }
1446 break;
1447 lab5:
1448 z->c = z->l - v_4;
1449 z->ket = z->c;
1450 {
1451 int ret = r_mark_lAr(z);
1452 if (ret == 0) { z->c = z->l - v_3; goto lab3; }
1453 if (ret < 0) return ret;
1454 }
1455 z->bra = z->c;
1456 {
1457 int ret = slice_del(z);
1458 if (ret < 0) return ret;
1459 }
1460 {
1461 int ret = r_stem_suffix_chain_before_ki(z);
1462 if (ret == 0) { z->c = z->l - v_3; goto lab3; }
1463 if (ret < 0) return ret;
1464 }
1465 } while (0);
1466 lab3:
1467 ;
1468 }
1469 break;
1470 lab2:
1471 z->c = z->l - v_1;
1472 z->ket = z->c;
1473 do {
1474 int v_7 = z->l - z->c;
1475 {
1476 int ret = r_mark_ndA(z);
1477 if (ret == 0) goto lab9;
1478 if (ret < 0) return ret;
1479 }
1480 break;
1481 lab9:
1482 z->c = z->l - v_7;
1483 {
1484 int ret = r_mark_nA(z);
1485 if (ret == 0) goto lab8;
1486 if (ret < 0) return ret;
1487 }
1488 } while (0);
1489 do {
1490 int v_8 = z->l - z->c;
1491 {
1492 int ret = r_mark_lArI(z);
1493 if (ret == 0) goto lab10;
1494 if (ret < 0) return ret;
1495 }
1496 z->bra = z->c;
1497 {
1498 int ret = slice_del(z);
1499 if (ret < 0) return ret;
1500 }
1501 break;
1502 lab10:
1503 z->c = z->l - v_8;
1504 {
1505 int ret = r_mark_sU(z);
1506 if (ret == 0) goto lab11;
1507 if (ret < 0) return ret;
1508 }
1509 z->bra = z->c;
1510 {
1511 int ret = slice_del(z);
1512 if (ret < 0) return ret;
1513 }
1514 {
1515 int v_9 = z->l - z->c;
1516 z->ket = z->c;
1517 {
1518 int ret = r_mark_lAr(z);
1519 if (ret == 0) { z->c = z->l - v_9; goto lab12; }
1520 if (ret < 0) return ret;
1521 }
1522 z->bra = z->c;
1523 {
1524 int ret = slice_del(z);
1525 if (ret < 0) return ret;
1526 }
1527 {
1528 int ret = r_stem_suffix_chain_before_ki(z);
1529 if (ret == 0) { z->c = z->l - v_9; goto lab12; }
1530 if (ret < 0) return ret;
1531 }
1532 lab12:
1533 ;
1534 }
1535 break;
1536 lab11:
1537 z->c = z->l - v_8;
1538 {
1539 int ret = r_stem_suffix_chain_before_ki(z);
1540 if (ret == 0) goto lab8;
1541 if (ret < 0) return ret;
1542 }
1543 } while (0);
1544 break;
1545 lab8:
1546 z->c = z->l - v_1;
1547 z->ket = z->c;
1548 do {
1549 int v_10 = z->l - z->c;
1550 {
1551 int ret = r_mark_ndAn(z);
1552 if (ret == 0) goto lab14;
1553 if (ret < 0) return ret;
1554 }
1555 break;
1556 lab14:
1557 z->c = z->l - v_10;
1558 {
1559 int ret = r_mark_nU(z);
1560 if (ret == 0) goto lab13;
1561 if (ret < 0) return ret;
1562 }
1563 } while (0);
1564 do {
1565 int v_11 = z->l - z->c;
1566 {
1567 int ret = r_mark_sU(z);
1568 if (ret == 0) goto lab15;
1569 if (ret < 0) return ret;
1570 }
1571 z->bra = z->c;
1572 {
1573 int ret = slice_del(z);
1574 if (ret < 0) return ret;
1575 }
1576 {
1577 int v_12 = z->l - z->c;
1578 z->ket = z->c;
1579 {
1580 int ret = r_mark_lAr(z);
1581 if (ret == 0) { z->c = z->l - v_12; goto lab16; }
1582 if (ret < 0) return ret;
1583 }
1584 z->bra = z->c;
1585 {
1586 int ret = slice_del(z);
1587 if (ret < 0) return ret;
1588 }
1589 {
1590 int ret = r_stem_suffix_chain_before_ki(z);
1591 if (ret == 0) { z->c = z->l - v_12; goto lab16; }
1592 if (ret < 0) return ret;
1593 }
1594 lab16:
1595 ;
1596 }
1597 break;
1598 lab15:
1599 z->c = z->l - v_11;
1600 {
1601 int ret = r_mark_lArI(z);
1602 if (ret == 0) goto lab13;
1603 if (ret < 0) return ret;
1604 }
1605 } while (0);
1606 break;
1607 lab13:
1608 z->c = z->l - v_1;
1609 z->ket = z->c;
1610 {
1611 int ret = r_mark_DAn(z);
1612 if (ret == 0) goto lab17;
1613 if (ret < 0) return ret;
1614 }
1615 z->bra = z->c;
1616 {
1617 int ret = slice_del(z);
1618 if (ret < 0) return ret;
1619 }
1620 {
1621 int v_13 = z->l - z->c;
1622 z->ket = z->c;
1623 do {
1624 int v_14 = z->l - z->c;
1625 {
1626 int ret = r_mark_possessives(z);
1627 if (ret == 0) goto lab19;
1628 if (ret < 0) return ret;
1629 }
1630 z->bra = z->c;
1631 {
1632 int ret = slice_del(z);
1633 if (ret < 0) return ret;
1634 }
1635 {
1636 int v_15 = z->l - z->c;
1637 z->ket = z->c;
1638 {
1639 int ret = r_mark_lAr(z);
1640 if (ret == 0) { z->c = z->l - v_15; goto lab20; }
1641 if (ret < 0) return ret;
1642 }
1643 z->bra = z->c;
1644 {
1645 int ret = slice_del(z);
1646 if (ret < 0) return ret;
1647 }
1648 {
1649 int ret = r_stem_suffix_chain_before_ki(z);
1650 if (ret == 0) { z->c = z->l - v_15; goto lab20; }
1651 if (ret < 0) return ret;
1652 }
1653 lab20:
1654 ;
1655 }
1656 break;
1657 lab19:
1658 z->c = z->l - v_14;
1659 {
1660 int ret = r_mark_lAr(z);
1661 if (ret == 0) goto lab21;
1662 if (ret < 0) return ret;
1663 }
1664 z->bra = z->c;
1665 {
1666 int ret = slice_del(z);
1667 if (ret < 0) return ret;
1668 }
1669 {
1670 int v_16 = z->l - z->c;
1671 {
1672 int ret = r_stem_suffix_chain_before_ki(z);
1673 if (ret == 0) { z->c = z->l - v_16; goto lab22; }
1674 if (ret < 0) return ret;
1675 }
1676 lab22:
1677 ;
1678 }
1679 break;
1680 lab21:
1681 z->c = z->l - v_14;
1682 {
1683 int ret = r_stem_suffix_chain_before_ki(z);
1684 if (ret == 0) { z->c = z->l - v_13; goto lab18; }
1685 if (ret < 0) return ret;
1686 }
1687 } while (0);
1688 lab18:
1689 ;
1690 }
1691 break;
1692 lab17:
1693 z->c = z->l - v_1;
1694 z->ket = z->c;
1695 do {
1696 int v_17 = z->l - z->c;
1697 {
1698 int ret = r_mark_nUn(z);
1699 if (ret == 0) goto lab24;
1700 if (ret < 0) return ret;
1701 }
1702 break;
1703 lab24:
1704 z->c = z->l - v_17;
1705 {
1706 int ret = r_mark_ylA(z);
1707 if (ret == 0) goto lab23;
1708 if (ret < 0) return ret;
1709 }
1710 } while (0);
1711 z->bra = z->c;
1712 {
1713 int ret = slice_del(z);
1714 if (ret < 0) return ret;
1715 }
1716 {
1717 int v_18 = z->l - z->c;
1718 do {
1719 int v_19 = z->l - z->c;
1720 z->ket = z->c;
1721 {
1722 int ret = r_mark_lAr(z);
1723 if (ret == 0) goto lab26;
1724 if (ret < 0) return ret;
1725 }
1726 z->bra = z->c;
1727 {
1728 int ret = slice_del(z);
1729 if (ret < 0) return ret;
1730 }
1731 {
1732 int ret = r_stem_suffix_chain_before_ki(z);
1733 if (ret == 0) goto lab26;
1734 if (ret < 0) return ret;
1735 }
1736 break;
1737 lab26:
1738 z->c = z->l - v_19;
1739 z->ket = z->c;
1740 do {
1741 int v_20 = z->l - z->c;
1742 {
1743 int ret = r_mark_possessives(z);
1744 if (ret == 0) goto lab28;
1745 if (ret < 0) return ret;
1746 }
1747 break;
1748 lab28:
1749 z->c = z->l - v_20;
1750 {
1751 int ret = r_mark_sU(z);
1752 if (ret == 0) goto lab27;
1753 if (ret < 0) return ret;
1754 }
1755 } while (0);
1756 z->bra = z->c;
1757 {
1758 int ret = slice_del(z);
1759 if (ret < 0) return ret;
1760 }
1761 {
1762 int v_21 = z->l - z->c;
1763 z->ket = z->c;
1764 {
1765 int ret = r_mark_lAr(z);
1766 if (ret == 0) { z->c = z->l - v_21; goto lab29; }
1767 if (ret < 0) return ret;
1768 }
1769 z->bra = z->c;
1770 {
1771 int ret = slice_del(z);
1772 if (ret < 0) return ret;
1773 }
1774 {
1775 int ret = r_stem_suffix_chain_before_ki(z);
1776 if (ret == 0) { z->c = z->l - v_21; goto lab29; }
1777 if (ret < 0) return ret;
1778 }
1779 lab29:
1780 ;
1781 }
1782 break;
1783 lab27:
1784 z->c = z->l - v_19;
1785 {
1786 int ret = r_stem_suffix_chain_before_ki(z);
1787 if (ret == 0) { z->c = z->l - v_18; goto lab25; }
1788 if (ret < 0) return ret;
1789 }
1790 } while (0);
1791 lab25:
1792 ;
1793 }
1794 break;
1795 lab23:
1796 z->c = z->l - v_1;
1797 z->ket = z->c;
1798 {
1799 int ret = r_mark_lArI(z);
1800 if (ret == 0) goto lab30;
1801 if (ret < 0) return ret;
1802 }
1803 z->bra = z->c;
1804 {
1805 int ret = slice_del(z);
1806 if (ret < 0) return ret;
1807 }
1808 break;
1809 lab30:
1810 z->c = z->l - v_1;
1811 {
1812 int ret = r_stem_suffix_chain_before_ki(z);
1813 if (ret == 0) goto lab31;
1814 if (ret < 0) return ret;
1815 }
1816 break;
1817 lab31:
1818 z->c = z->l - v_1;
1819 z->ket = z->c;
1820 do {
1821 int v_22 = z->l - z->c;
1822 {
1823 int ret = r_mark_DA(z);
1824 if (ret == 0) goto lab33;
1825 if (ret < 0) return ret;
1826 }
1827 break;
1828 lab33:
1829 z->c = z->l - v_22;
1830 {
1831 int ret = r_mark_yU(z);
1832 if (ret == 0) goto lab34;
1833 if (ret < 0) return ret;
1834 }
1835 break;
1836 lab34:
1837 z->c = z->l - v_22;
1838 {
1839 int ret = r_mark_yA(z);
1840 if (ret == 0) goto lab32;
1841 if (ret < 0) return ret;
1842 }
1843 } while (0);
1844 z->bra = z->c;
1845 {
1846 int ret = slice_del(z);
1847 if (ret < 0) return ret;
1848 }
1849 {
1850 int v_23 = z->l - z->c;
1851 z->ket = z->c;
1852 do {
1853 int v_24 = z->l - z->c;
1854 {
1855 int ret = r_mark_possessives(z);
1856 if (ret == 0) goto lab36;
1857 if (ret < 0) return ret;
1858 }
1859 z->bra = z->c;
1860 {
1861 int ret = slice_del(z);
1862 if (ret < 0) return ret;
1863 }
1864 {
1865 int v_25 = z->l - z->c;
1866 z->ket = z->c;
1867 {
1868 int ret = r_mark_lAr(z);
1869 if (ret == 0) { z->c = z->l - v_25; goto lab37; }
1870 if (ret < 0) return ret;
1871 }
1872 lab37:
1873 ;
1874 }
1875 break;
1876 lab36:
1877 z->c = z->l - v_24;
1878 {
1879 int ret = r_mark_lAr(z);
1880 if (ret == 0) { z->c = z->l - v_23; goto lab35; }
1881 if (ret < 0) return ret;
1882 }
1883 } while (0);
1884 z->bra = z->c;
1885 {
1886 int ret = slice_del(z);
1887 if (ret < 0) return ret;
1888 }
1889 z->ket = z->c;
1890 {
1891 int ret = r_stem_suffix_chain_before_ki(z);
1892 if (ret == 0) { z->c = z->l - v_23; goto lab35; }
1893 if (ret < 0) return ret;
1894 }
1895 lab35:
1896 ;
1897 }
1898 break;
1899 lab32:
1900 z->c = z->l - v_1;
1901 z->ket = z->c;
1902 do {
1903 int v_26 = z->l - z->c;
1904 {
1905 int ret = r_mark_possessives(z);
1906 if (ret == 0) goto lab38;
1907 if (ret < 0) return ret;
1908 }
1909 break;
1910 lab38:
1911 z->c = z->l - v_26;
1912 {
1913 int ret = r_mark_sU(z);
1914 if (ret <= 0) return ret;
1915 }
1916 } while (0);
1917 z->bra = z->c;
1918 {
1919 int ret = slice_del(z);
1920 if (ret < 0) return ret;
1921 }
1922 {
1923 int v_27 = z->l - z->c;
1924 z->ket = z->c;
1925 {
1926 int ret = r_mark_lAr(z);
1927 if (ret == 0) { z->c = z->l - v_27; goto lab39; }
1928 if (ret < 0) return ret;
1929 }
1930 z->bra = z->c;
1931 {
1932 int ret = slice_del(z);
1933 if (ret < 0) return ret;
1934 }
1935 {
1936 int ret = r_stem_suffix_chain_before_ki(z);
1937 if (ret == 0) { z->c = z->l - v_27; goto lab39; }
1938 if (ret < 0) return ret;
1939 }
1940 lab39:
1941 ;
1942 }
1943 } while (0);
1944 return 1;
1945}
1946
1948 int among_var;
1949 z->ket = z->c;
1950 among_var = find_among_b(z, a_23, 4, 0);
1951 if (!among_var) return 0;
1952 z->bra = z->c;
1953 switch (among_var) {
1954 case 1:
1955 {
1956 int ret = slice_from_s(z, 1, s_5);
1957 if (ret < 0) return ret;
1958 }
1959 break;
1960 case 2:
1961 {
1962 int ret = slice_from_s(z, 2, s_6);
1963 if (ret < 0) return ret;
1964 }
1965 break;
1966 case 3:
1967 {
1968 int ret = slice_from_s(z, 1, s_7);
1969 if (ret < 0) return ret;
1970 }
1971 break;
1972 case 4:
1973 {
1974 int ret = slice_from_s(z, 1, s_8);
1975 if (ret < 0) return ret;
1976 }
1977 break;
1978 }
1979 return 1;
1980}
1981
1983 z->ket = z->c;
1984 z->bra = z->c;
1985 do {
1986 int v_1 = z->l - z->c;
1987 if (z->c <= z->lb || z->p[z->c - 1] != 'd') goto lab0;
1988 z->c--;
1989 break;
1990 lab0:
1991 z->c = z->l - v_1;
1992 if (z->c <= z->lb || z->p[z->c - 1] != 'g') return 0;
1993 z->c--;
1994 } while (0);
1995 if (out_grouping_b_U(z, g_vowel, 97, 305, 1) < 0) return 0;
1996 do {
1997 int v_2 = z->l - z->c;
1998 do {
1999 int v_3 = z->l - z->c;
2000 if (z->c <= z->lb || z->p[z->c - 1] != 'a') goto lab2;
2001 z->c--;
2002 break;
2003 lab2:
2004 z->c = z->l - v_3;
2005 if (!(eq_s_b(z, 2, s_9))) goto lab1;
2006 } while (0);
2007 {
2008 int ret = slice_from_s(z, 2, s_10);
2009 if (ret < 0) return ret;
2010 }
2011 break;
2012 lab1:
2013 z->c = z->l - v_2;
2014 do {
2015 int v_4 = z->l - z->c;
2016 if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab4;
2017 z->c--;
2018 break;
2019 lab4:
2020 z->c = z->l - v_4;
2021 if (z->c <= z->lb || z->p[z->c - 1] != 'i') goto lab3;
2022 z->c--;
2023 } while (0);
2024 {
2025 int ret = slice_from_s(z, 1, s_11);
2026 if (ret < 0) return ret;
2027 }
2028 break;
2029 lab3:
2030 z->c = z->l - v_2;
2031 do {
2032 int v_5 = z->l - z->c;
2033 if (z->c <= z->lb || z->p[z->c - 1] != 'o') goto lab6;
2034 z->c--;
2035 break;
2036 lab6:
2037 z->c = z->l - v_5;
2038 if (z->c <= z->lb || z->p[z->c - 1] != 'u') goto lab5;
2039 z->c--;
2040 } while (0);
2041 {
2042 int ret = slice_from_s(z, 1, s_12);
2043 if (ret < 0) return ret;
2044 }
2045 break;
2046 lab5:
2047 z->c = z->l - v_2;
2048 do {
2049 int v_6 = z->l - z->c;
2050 if (!(eq_s_b(z, 2, s_13))) goto lab7;
2051 break;
2052 lab7:
2053 z->c = z->l - v_6;
2054 if (!(eq_s_b(z, 2, s_14))) return 0;
2055 } while (0);
2056 {
2057 int ret = slice_from_s(z, 2, s_15);
2058 if (ret < 0) return ret;
2059 }
2060 } while (0);
2061 return 1;
2062}
2063
2064static int r_is_reserved_word(struct SN_env * z) {
2065 if (!(eq_s_b(z, 2, s_16))) return 0;
2066 {
2067 int v_1 = z->l - z->c;
2068 if (!(eq_s_b(z, 3, s_17))) { z->c = z->l - v_1; goto lab0; }
2069 lab0:
2070 ;
2071 }
2072 if (z->c > z->lb) return 0;
2073 return 1;
2074}
2075
2076static int r_remove_proper_noun_suffix(struct SN_env * z) {
2077 {
2078 int v_1 = z->c;
2079 z->bra = z->c;
2080 while (1) {
2081 int v_2 = z->c;
2082 {
2083 int v_3 = z->c;
2084 if (z->c == z->l || z->p[z->c] != '\'') goto lab2;
2085 z->c++;
2086 goto lab1;
2087 lab2:
2088 z->c = v_3;
2089 }
2090 z->c = v_2;
2091 break;
2092 lab1:
2093 z->c = v_2;
2094 {
2095 int ret = skip_utf8(z->p, z->c, z->l, 1);
2096 if (ret < 0) goto lab0;
2097 z->c = ret;
2098 }
2099 }
2100 z->ket = z->c;
2101 {
2102 int ret = slice_del(z);
2103 if (ret < 0) return ret;
2104 }
2105 lab0:
2106 z->c = v_1;
2107 }
2108 {
2109 int v_4 = z->c;
2110 {
2111 int ret = skip_utf8(z->p, z->c, z->l, 2);
2112 if (ret < 0) goto lab3;
2113 z->c = ret;
2114 }
2115 while (1) {
2116 int v_5 = z->c;
2117 if (z->c == z->l || z->p[z->c] != '\'') goto lab4;
2118 z->c++;
2119 z->c = v_5;
2120 break;
2121 lab4:
2122 z->c = v_5;
2123 {
2124 int ret = skip_utf8(z->p, z->c, z->l, 1);
2125 if (ret < 0) goto lab3;
2126 z->c = ret;
2127 }
2128 }
2129 z->bra = z->c;
2130 z->c = z->l;
2131 z->ket = z->c;
2132 {
2133 int ret = slice_del(z);
2134 if (ret < 0) return ret;
2135 }
2136 lab3:
2137 z->c = v_4;
2138 }
2139 return 1;
2140}
2141
2143 {
2144 int v_1 = z->c;
2145 {
2146 int i; for (i = 2; i > 0; i--) {
2147 {
2148 int ret = out_grouping_U(z, g_vowel, 97, 305, 1);
2149 if (ret < 0) return 0;
2150 z->c += ret;
2151 }
2152 }
2153 }
2154 z->c = v_1;
2155 }
2156 return 1;
2157}
2158
2159static int r_postlude(struct SN_env * z) {
2160 z->lb = z->c; z->c = z->l;
2161 {
2162 int v_1 = z->l - z->c;
2163 {
2164 int ret = r_is_reserved_word(z);
2165 if (ret == 0) goto lab0;
2166 if (ret < 0) return ret;
2167 }
2168 return 0;
2169 lab0:
2170 z->c = z->l - v_1;
2171 }
2172 {
2173 int v_2 = z->l - z->c;
2174 {
2176 if (ret < 0) return ret;
2177 }
2178 z->c = z->l - v_2;
2179 }
2180 {
2181 int v_3 = z->l - z->c;
2182 {
2183 int ret = r_post_process_last_consonants(z);
2184 if (ret < 0) return ret;
2185 }
2186 z->c = z->l - v_3;
2187 }
2188 z->c = z->lb;
2189 return 1;
2190}
2191
2192extern int turkish_UTF_8_stem(struct SN_env * z) {
2193 {
2194 int ret = r_remove_proper_noun_suffix(z);
2195 if (ret < 0) return ret;
2196 }
2197 {
2198 int ret = r_more_than_one_syllable_word(z);
2199 if (ret <= 0) return ret;
2200 }
2201 z->lb = z->c; z->c = z->l;
2202 {
2203 int v_1 = z->l - z->c;
2204 {
2205 int ret = r_stem_nominal_verb_suffixes(z);
2206 if (ret < 0) return ret;
2207 }
2208 z->c = z->l - v_1;
2209 }
2210 if (!((SN_local *)z)->b_continue_stemming_noun_suffixes) return 0;
2211 {
2212 int v_2 = z->l - z->c;
2213 {
2214 int ret = r_stem_noun_suffixes(z);
2215 if (ret < 0) return ret;
2216 }
2217 z->c = z->l - v_2;
2218 }
2219 z->c = z->lb;
2220 return r_postlude(z);
2221}
2222
2223extern struct SN_env * turkish_UTF_8_create_env(void) {
2224 struct SN_env * z = SN_new_env(sizeof(SN_local));
2225 if (z) {
2226 ((SN_local *)z)->b_continue_stemming_noun_suffixes = 0;
2227 }
2228 return z;
2229}
2230
2231extern void turkish_UTF_8_close_env(struct SN_env * z) {
2232 SN_delete_env(z);
2233}
2234
void SN_delete_env(struct SN_env *z)
Definition: api.c:18
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
unsigned char symbol
Definition: api.h:4
int i
Definition: isn.c:77
static const symbol s_22_0[4]
static const symbol s_20_21[3]
static int r_mark_ymUs_(struct SN_env *z)
static int r_remove_proper_noun_suffix(struct SN_env *z)
static const symbol s_2[]
static const symbol s_13_3[4]
static int r_mark_suffix_with_optional_n_consonant(struct SN_env *z)
static int r_mark_nUz(struct SN_env *z)
static const symbol s_0_2[3]
static const symbol s_20_26[2]
static const symbol s_11_1[2]
static int r_mark_yken(struct SN_env *z)
static const symbol s_4[]
static const symbol s_20_0[2]
static int r_is_reserved_word(struct SN_env *z)
static const struct among a_8[4]
static const symbol s_3_2[3]
static const symbol s_12_0[2]
static const struct among a_19[2]
static const struct among a_12[4]
static const symbol s_20_24[4]
static const struct among a_17[4]
static const symbol s_17_3[4]
static const symbol s_15_2[7]
static const symbol s_0_5[3]
static int r_mark_suffix_with_optional_s_consonant(struct SN_env *z)
static const symbol s_20_13[3]
static const unsigned char g_vowel5[]
static int r_mark_nUn(struct SN_env *z)
static const symbol s_0_3[3]
static int r_mark_yUm(struct SN_env *z)
static const symbol s_3_1[2]
static const symbol s_13_0[3]
static const symbol s_0_0[1]
static int r_mark_sUn(struct SN_env *z)
static const symbol s_5_0[2]
static const symbol s_21_3[3]
static const struct among a_7[2]
static const symbol s_20_10[3]
static const symbol s_21_1[2]
static const symbol s_20_14[4]
static const unsigned char g_vowel2[]
static const symbol s_2_3[3]
static const symbol s_19_0[7]
static const symbol s_2_0[2]
static const struct among a_6[4]
static int r_append_U_to_stems_ending_with_d_or_g(struct SN_env *z)
static const struct among a_16[2]
static const symbol s_20_22[4]
static const symbol s_20_17[4]
static const symbol s_18_7[4]
static const struct among a_3[4]
static const symbol s_6[]
static const symbol s_21_6[3]
static int r_mark_DA(struct SN_env *z)
static const symbol s_3[]
static const symbol s_3_0[2]
static const symbol s_15_0[5]
static const symbol s_19_1[6]
static const symbol s_12_3[3]
static const symbol s_20_6[4]
static const symbol s_18_2[3]
static const symbol s_20_3[3]
static int r_mark_ylA(struct SN_env *z)
static const struct among a_22[4]
static const symbol s_20_31[3]
static int r_mark_yA(struct SN_env *z)
static const symbol s_7_1[3]
static int r_mark_ndA(struct SN_env *z)
static const symbol s_18_4[4]
static const symbol s_18_1[3]
static int r_mark_sU(struct SN_env *z)
static const struct among a_23[4]
static const symbol s_20_8[4]
static const struct among a_5[2]
static const symbol s_7[]
static const symbol s_8_0[3]
struct SN_env * turkish_UTF_8_create_env(void)
static const symbol s_13[]
static int r_mark_yU(struct SN_env *z)
static const symbol s_8_2[3]
static const symbol s_23_1[1]
static int r_mark_nA(struct SN_env *z)
static int r_mark_yUz(struct SN_env *z)
static const symbol s_20_27[2]
static const symbol s_23_2[1]
static const symbol s_18_3[3]
static const symbol s_13_1[3]
static const symbol s_20_19[3]
static const symbol s_20_30[3]
static const symbol s_17_0[3]
static const struct among a_11[2]
static const symbol s_14_0[2]
static int r_mark_cAsInA(struct SN_env *z)
static const struct among a_10[2]
static const symbol s_18_0[3]
static const symbol s_16_1[3]
static const symbol s_10_1[2]
static const symbol s_12_1[2]
static const symbol s_21_5[3]
static const symbol s_0_6[4]
static const symbol s_0_9[4]
static int r_mark_DAn(struct SN_env *z)
static const symbol s_7_0[3]
static int r_mark_lArI(struct SN_env *z)
static const symbol s_20_4[3]
static int r_check_vowel_harmony(struct SN_env *z)
static int r_mark_ndAn(struct SN_env *z)
static const struct among a_1[2]
static const symbol s_8_1[3]
static const symbol s_21_0[2]
static const symbol s_22_1[4]
void turkish_UTF_8_close_env(struct SN_env *z)
static const symbol s_6_2[2]
static int r_mark_suffix_with_optional_y_consonant(struct SN_env *z)
static const symbol s_15_3[7]
static const struct among a_14[4]
static const symbol s_20_2[3]
static const symbol s_20_23[4]
static const symbol s_20_25[4]
static const symbol s_17_2[4]
static int r_mark_ki(struct SN_env *z)
static const symbol s_16[]
static int r_postlude(struct SN_env *z)
static const symbol s_14[]
static const unsigned char g_vowel1[]
static const struct among a_20[32]
static int r_mark_DUr(struct SN_env *z)
static const symbol s_15_1[5]
static const symbol s_9_0[4]
static int r_stem_nominal_verb_suffixes(struct SN_env *z)
static const struct among a_18[8]
static const struct among a_15[4]
static const symbol s_0_7[4]
static const symbol s_10[]
static int r_mark_yDU(struct SN_env *z)
static const struct among a_2[4]
static const symbol s_1[]
static const symbol s_20_9[4]
static const symbol s_21_7[3]
static const symbol s_9_1[4]
static const symbol s_20_28[3]
static const struct among a_13[4]
static const symbol s_14_2[3]
static const symbol s_20_20[3]
static const symbol s_3_3[3]
static const struct among a_9[2]
static const symbol s_17_1[3]
static const symbol s_2_2[3]
int turkish_UTF_8_stem(struct SN_env *z)
static const symbol s_20_1[2]
static int r_mark_lAr(struct SN_env *z)
static int r_mark_ysA(struct SN_env *z)
static const symbol s_20_5[3]
static const symbol s_11[]
static const symbol s_12[]
static int r_stem_suffix_chain_before_ki(struct SN_env *z)
static const symbol s_6_1[2]
static const unsigned char g_U[]
static const symbol s_20_18[3]
static const symbol s_6_3[2]
static int r_mark_suffix_with_optional_U_vowel(struct SN_env *z)
static const unsigned char g_vowel6[]
static int r_mark_nU(struct SN_env *z)
static const struct among a_21[8]
static const symbol s_21_4[3]
static const symbol s_20_7[4]
static const symbol s_23_0[1]
static const symbol s_0_1[1]
static const symbol s_0_8[4]
static int r_more_than_one_syllable_word(struct SN_env *z)
static int r_mark_possessives(struct SN_env *z)
static const symbol s_10_0[2]
static const struct among a_0[10]
static const symbol s_22_2[5]
static int r_mark_ncA(struct SN_env *z)
static const symbol s_20_12[3]
static const symbol s_5_1[2]
static const symbol s_18_5[4]
static const symbol s_1_1[5]
static const symbol s_20_29[3]
static const symbol s_18_6[4]
static const symbol s_17[]
static const unsigned char g_vowel4[]
static int r_post_process_last_consonants(struct SN_env *z)
static int r_stem_noun_suffixes(struct SN_env *z)
static const symbol s_22_3[5]
static const symbol s_14_1[2]
static const symbol s_13_2[4]
static int r_mark_sUnUz(struct SN_env *z)
static const symbol s_16_0[3]
static const unsigned char g_vowel[]
static const symbol s_21_2[3]
static const symbol s_2_1[2]
static const symbol s_14_3[3]
static const unsigned char g_vowel3[]
static const symbol s_6_0[2]
static const symbol s_12_2[3]
static const symbol s_8[]
static const symbol s_9[]
static const symbol s_20_15[4]
static const symbol s_5[]
static const symbol s_20_16[4]
static const symbol s_20_11[3]
static const symbol s_15[]
static const symbol s_8_3[3]
static const symbol s_11_0[2]
static const symbol s_1_0[4]
static const symbol s_23_3[2]
static const symbol s_0[]
static const symbol s_0_4[3]
Definition: api.h:15
int lb
Definition: api.h:17
symbol * p
Definition: api.h:16
int ket
Definition: api.h:17
int c
Definition: api.h:17
int bra
Definition: api.h:17
int l
Definition: api.h:17
unsigned char b_continue_stemming_noun_suffixes
struct SN_env z
int out_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:157
SNOWBALL_ERR slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:432
int find_among_b(struct SN_env *z, const struct among *v, int v_size, int(*call_among_func)(struct SN_env *))
Definition: utilities.c:315
int in_grouping_b_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:145
int skip_b_utf8(const symbol *p, int c, int limit, int n)
Definition: utilities.c:68
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:236
SNOWBALL_ERR slice_del(struct SN_env *z)
Definition: utilities.c:443
int out_grouping_b_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:169
int skip_utf8(const symbol *p, int c, int limit, int n)
Definition: utilities.c:43