PostgreSQL Source Code git master
Loading...
Searching...
No Matches
stem_UTF_8_dutch_porter.c File Reference
#include "stem_UTF_8_dutch_porter.h"
#include <stddef.h>
#include "snowball_runtime.h"
Include dependency graph for stem_UTF_8_dutch_porter.c:

Go to the source code of this file.

Data Structures

struct  SN_local
 

Typedefs

typedef struct SN_local SN_local
 

Functions

int dutch_porter_UTF_8_stem (struct SN_env *z)
 
static int r_standard_suffix (struct SN_env *z)
 
static int r_undouble (struct SN_env *z)
 
static int r_R2 (struct SN_env *z)
 
static int r_R1 (struct SN_env *z)
 
static int r_mark_regions (struct SN_env *z)
 
static int r_en_ending (struct SN_env *z)
 
static int r_e_ending (struct SN_env *z)
 
static int r_postlude (struct SN_env *z)
 
static int r_prelude (struct SN_env *z)
 
struct SN_envdutch_porter_UTF_8_create_env (void)
 
void dutch_porter_UTF_8_close_env (struct SN_env *z)
 

Variables

static const symbol s_0 [] = { 'a' }
 
static const symbol s_1 [] = { 'e' }
 
static const symbol s_2 [] = { 'i' }
 
static const symbol s_3 [] = { 'o' }
 
static const symbol s_4 [] = { 'u' }
 
static const symbol s_5 [] = { 'Y' }
 
static const symbol s_6 [] = { 'I' }
 
static const symbol s_7 [] = { 'Y' }
 
static const symbol s_8 [] = { 'y' }
 
static const symbol s_9 [] = { 'i' }
 
static const symbol s_10 [] = { 'g', 'e', 'm' }
 
static const symbol s_11 [] = { 'h', 'e', 'i', 'd' }
 
static const symbol s_12 [] = { 'h', 'e', 'i', 'd' }
 
static const symbol s_13 [] = { 'e', 'n' }
 
static const symbol s_14 [] = { 'i', 'g' }
 
static const symbol s_0_1 [2] = { 0xC3, 0xA1 }
 
static const symbol s_0_2 [2] = { 0xC3, 0xA4 }
 
static const symbol s_0_3 [2] = { 0xC3, 0xA9 }
 
static const symbol s_0_4 [2] = { 0xC3, 0xAB }
 
static const symbol s_0_5 [2] = { 0xC3, 0xAD }
 
static const symbol s_0_6 [2] = { 0xC3, 0xAF }
 
static const symbol s_0_7 [2] = { 0xC3, 0xB3 }
 
static const symbol s_0_8 [2] = { 0xC3, 0xB6 }
 
static const symbol s_0_9 [2] = { 0xC3, 0xBA }
 
static const symbol s_0_10 [2] = { 0xC3, 0xBC }
 
static const struct among a_0 [11]
 
static const symbol s_1_1 [1] = { 'I' }
 
static const symbol s_1_2 [1] = { 'Y' }
 
static const struct among a_1 [3]
 
static const symbol s_2_0 [2] = { 'd', 'd' }
 
static const symbol s_2_1 [2] = { 'k', 'k' }
 
static const symbol s_2_2 [2] = { 't', 't' }
 
static const struct among a_2 [3]
 
static const symbol s_3_0 [3] = { 'e', 'n', 'e' }
 
static const symbol s_3_1 [2] = { 's', 'e' }
 
static const symbol s_3_2 [2] = { 'e', 'n' }
 
static const symbol s_3_3 [5] = { 'h', 'e', 'd', 'e', 'n' }
 
static const symbol s_3_4 [1] = { 's' }
 
static const struct among a_3 [5]
 
static const symbol s_4_0 [3] = { 'e', 'n', 'd' }
 
static const symbol s_4_1 [2] = { 'i', 'g' }
 
static const symbol s_4_2 [3] = { 'i', 'n', 'g' }
 
static const symbol s_4_3 [4] = { 'l', 'i', 'j', 'k' }
 
static const symbol s_4_4 [4] = { 'b', 'a', 'a', 'r' }
 
static const symbol s_4_5 [3] = { 'b', 'a', 'r' }
 
static const struct among a_4 [6]
 
static const symbol s_5_0 [2] = { 'a', 'a' }
 
static const symbol s_5_1 [2] = { 'e', 'e' }
 
static const symbol s_5_2 [2] = { 'o', 'o' }
 
static const symbol s_5_3 [2] = { 'u', 'u' }
 
static const struct among a_5 [4]
 
static const unsigned char g_v [] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }
 
static const unsigned char g_v_I [] = { 1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }
 
static const unsigned char g_v_j [] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }
 

Typedef Documentation

◆ SN_local

Function Documentation

◆ dutch_porter_UTF_8_close_env()

void dutch_porter_UTF_8_close_env ( struct SN_env z)
extern

Definition at line 677 of file stem_UTF_8_dutch_porter.c.

677 {
678 SN_delete_env(z);
679}
void SN_delete_env(struct SN_env *z)
Definition api.c:18

References SN_delete_env().

◆ dutch_porter_UTF_8_create_env()

struct SN_env * dutch_porter_UTF_8_create_env ( void  )
extern

Definition at line 667 of file stem_UTF_8_dutch_porter.c.

667 {
668 struct SN_env * z = SN_new_env(sizeof(SN_local));
669 if (z) {
670 ((SN_local *)z)->i_p2 = 0;
671 ((SN_local *)z)->i_p1 = 0;
672 ((SN_local *)z)->b_e_found = 0;
673 }
674 return z;
675}
struct SN_env * SN_new_env(int alloc_size)
Definition api.c:5
Definition api.h:15

References SN_new_env().

◆ dutch_porter_UTF_8_stem()

int dutch_porter_UTF_8_stem ( struct SN_env z)
extern

Definition at line 633 of file stem_UTF_8_dutch_porter.c.

633 {
634 {
635 int v_1 = z->c;
636 {
637 int ret = r_prelude(z);
638 if (ret < 0) return ret;
639 }
640 z->c = v_1;
641 }
642 {
643 int v_2 = z->c;
644 {
645 int ret = r_mark_regions(z);
646 if (ret < 0) return ret;
647 }
648 z->c = v_2;
649 }
650 z->lb = z->c; z->c = z->l;
651 {
652 int ret = r_standard_suffix(z);
653 if (ret < 0) return ret;
654 }
655 z->c = z->lb;
656 {
657 int v_3 = z->c;
658 {
659 int ret = r_postlude(z);
660 if (ret < 0) return ret;
661 }
662 z->c = v_3;
663 }
664 return 1;
665}
static int fb(int x)
static int r_standard_suffix(struct SN_env *z)
static int r_postlude(struct SN_env *z)
static int r_prelude(struct SN_env *z)
static int r_mark_regions(struct SN_env *z)
int lb
Definition api.h:17
int c
Definition api.h:17
int l
Definition api.h:17

References SN_env::c, fb(), SN_env::l, SN_env::lb, r_mark_regions(), r_postlude(), r_prelude(), and r_standard_suffix().

◆ r_e_ending()

static int r_e_ending ( struct SN_env z)
static

Definition at line 362 of file stem_UTF_8_dutch_porter.c.

362 {
363 ((SN_local *)z)->b_e_found = 0;
364 z->ket = z->c;
365 if (z->c <= z->lb || z->p[z->c - 1] != 'e') return 0;
366 z->c--;
367 z->bra = z->c;
368 {
369 int ret = r_R1(z);
370 if (ret <= 0) return ret;
371 }
372 {
373 int v_1 = z->l - z->c;
374 if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
375 z->c = z->l - v_1;
376 }
377 {
378 int ret = slice_del(z);
379 if (ret < 0) return ret;
380 }
381 ((SN_local *)z)->b_e_found = 1;
382 return r_undouble(z);
383}
static int r_undouble(struct SN_env *z)
static int r_R1(struct SN_env *z)
static const unsigned char g_v[]
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

References SN_env::bra, SN_env::c, fb(), g_v, SN_env::ket, SN_env::l, SN_env::lb, out_grouping_b_U(), SN_env::p, r_R1(), r_undouble(), and slice_del().

Referenced by r_standard_suffix().

◆ r_en_ending()

static int r_en_ending ( struct SN_env z)
static

Definition at line 385 of file stem_UTF_8_dutch_porter.c.

385 {
386 {
387 int ret = r_R1(z);
388 if (ret <= 0) return ret;
389 }
390 {
391 int v_1 = z->l - z->c;
392 if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
393 z->c = z->l - v_1;
394 {
395 int v_2 = z->l - z->c;
396 if (!(eq_s_b(z, 3, s_10))) goto lab0;
397 return 0;
398 lab0:
399 z->c = z->l - v_2;
400 }
401 }
402 {
403 int ret = slice_del(z);
404 if (ret < 0) return ret;
405 }
406 return r_undouble(z);
407}
static const symbol s_10[]
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition utilities.c:236

References SN_env::c, eq_s_b(), fb(), g_v, SN_env::l, out_grouping_b_U(), r_R1(), r_undouble(), s_10, and slice_del().

Referenced by r_standard_suffix().

◆ r_mark_regions()

static int r_mark_regions ( struct SN_env z)
static

Definition at line 254 of file stem_UTF_8_dutch_porter.c.

254 {
255 int i_x;
256 ((SN_local *)z)->i_p1 = z->l;
257 ((SN_local *)z)->i_p2 = z->l;
258 {
259 int v_1 = z->c;
260 {
261 int ret = skip_utf8(z->p, z->c, z->l, 3);
262 if (ret < 0) return 0;
263 z->c = ret;
264 }
265 i_x = z->c;
266 z->c = v_1;
267 }
268 {
269 int ret = out_grouping_U(z, g_v, 97, 232, 1);
270 if (ret < 0) return 0;
271 z->c += ret;
272 }
273 {
274 int ret = in_grouping_U(z, g_v, 97, 232, 1);
275 if (ret < 0) return 0;
276 z->c += ret;
277 }
278 ((SN_local *)z)->i_p1 = z->c;
279 if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
280 ((SN_local *)z)->i_p1 = i_x;
281lab0:
282 {
283 int ret = out_grouping_U(z, g_v, 97, 232, 1);
284 if (ret < 0) return 0;
285 z->c += ret;
286 }
287 {
288 int ret = in_grouping_U(z, g_v, 97, 232, 1);
289 if (ret < 0) return 0;
290 z->c += ret;
291 }
292 ((SN_local *)z)->i_p2 = z->c;
293 return 1;
294}
symbol * p
Definition api.h:16
int out_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:157
int in_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:133
int skip_utf8(const symbol *p, int c, int limit, int n)
Definition utilities.c:43

References SN_env::c, fb(), g_v, in_grouping_U(), SN_env::l, out_grouping_U(), SN_env::p, and skip_utf8().

Referenced by dutch_porter_UTF_8_stem().

◆ r_postlude()

static int r_postlude ( struct SN_env z)
static

Definition at line 296 of file stem_UTF_8_dutch_porter.c.

296 {
297 int among_var;
298 while (1) {
299 int v_1 = z->c;
300 z->bra = z->c;
301 if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
302 among_var = find_among(z, a_1, 3, 0);
303 z->ket = z->c;
304 switch (among_var) {
305 case 1:
306 {
307 int ret = slice_from_s(z, 1, s_8);
308 if (ret < 0) return ret;
309 }
310 break;
311 case 2:
312 {
313 int ret = slice_from_s(z, 1, s_9);
314 if (ret < 0) return ret;
315 }
316 break;
317 case 3:
318 {
319 int ret = skip_utf8(z->p, z->c, z->l, 1);
320 if (ret < 0) goto lab0;
321 z->c = ret;
322 }
323 break;
324 }
325 continue;
326 lab0:
327 z->c = v_1;
328 break;
329 }
330 return 1;
331}
static const struct among a_1[3]
static const symbol s_8[]
static const symbol s_9[]
int ket
Definition api.h:17
int bra
Definition api.h:17
SNOWBALL_ERR slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition utilities.c:432
int find_among(struct SN_env *z, const struct among *v, int v_size, int(*call_among_func)(struct SN_env *))
Definition utilities.c:249

References a_1, SN_env::bra, SN_env::c, fb(), find_among(), SN_env::ket, SN_env::l, SN_env::p, s_8, s_9, skip_utf8(), and slice_from_s().

Referenced by dutch_porter_UTF_8_stem().

◆ r_prelude()

static int r_prelude ( struct SN_env z)
static

Definition at line 138 of file stem_UTF_8_dutch_porter.c.

138 {
139 int among_var;
140 {
141 int v_1 = z->c;
142 while (1) {
143 int v_2 = z->c;
144 z->bra = z->c;
145 if (z->c + 1 >= z->l || z->p[z->c + 1] >> 5 != 5 || !((340306450 >> (z->p[z->c + 1] & 0x1f)) & 1)) among_var = 6; else
146 among_var = find_among(z, a_0, 11, 0);
147 z->ket = z->c;
148 switch (among_var) {
149 case 1:
150 {
151 int ret = slice_from_s(z, 1, s_0);
152 if (ret < 0) return ret;
153 }
154 break;
155 case 2:
156 {
157 int ret = slice_from_s(z, 1, s_1);
158 if (ret < 0) return ret;
159 }
160 break;
161 case 3:
162 {
163 int ret = slice_from_s(z, 1, s_2);
164 if (ret < 0) return ret;
165 }
166 break;
167 case 4:
168 {
169 int ret = slice_from_s(z, 1, s_3);
170 if (ret < 0) return ret;
171 }
172 break;
173 case 5:
174 {
175 int ret = slice_from_s(z, 1, s_4);
176 if (ret < 0) return ret;
177 }
178 break;
179 case 6:
180 {
181 int ret = skip_utf8(z->p, z->c, z->l, 1);
182 if (ret < 0) goto lab0;
183 z->c = ret;
184 }
185 break;
186 }
187 continue;
188 lab0:
189 z->c = v_2;
190 break;
191 }
192 z->c = v_1;
193 }
194 {
195 int v_3 = z->c;
196 z->bra = z->c;
197 if (z->c == z->l || z->p[z->c] != 'y') { z->c = v_3; goto lab1; }
198 z->c++;
199 z->ket = z->c;
200 {
201 int ret = slice_from_s(z, 1, s_5);
202 if (ret < 0) return ret;
203 }
204 lab1:
205 ;
206 }
207 while (1) {
208 int v_4 = z->c;
209 {
210 int ret = out_grouping_U(z, g_v, 97, 232, 1);
211 if (ret < 0) goto lab2;
212 z->c += ret;
213 }
214 {
215 int v_5 = z->c;
216 z->bra = z->c;
217 do {
218 int v_6 = z->c;
219 if (z->c == z->l || z->p[z->c] != 'i') goto lab4;
220 z->c++;
221 z->ket = z->c;
222 {
223 int v_7 = z->c;
224 if (in_grouping_U(z, g_v, 97, 232, 0)) goto lab5;
225 {
226 int ret = slice_from_s(z, 1, s_6);
227 if (ret < 0) return ret;
228 }
229 lab5:
230 z->c = v_7;
231 }
232 break;
233 lab4:
234 z->c = v_6;
235 if (z->c == z->l || z->p[z->c] != 'y') { z->c = v_5; goto lab3; }
236 z->c++;
237 z->ket = z->c;
238 {
239 int ret = slice_from_s(z, 1, s_7);
240 if (ret < 0) return ret;
241 }
242 } while (0);
243 lab3:
244 ;
245 }
246 continue;
247 lab2:
248 z->c = v_4;
249 break;
250 }
251 return 1;
252}
static const symbol s_2[]
static const symbol s_4[]
static const symbol s_6[]
static const symbol s_3[]
static const symbol s_7[]
static const symbol s_1[]
static const struct among a_0[11]
static const symbol s_5[]
static const symbol s_0[]

References a_0, SN_env::bra, SN_env::c, fb(), find_among(), g_v, in_grouping_U(), SN_env::ket, SN_env::l, out_grouping_U(), SN_env::p, s_0, s_1, s_2, s_3, s_4, s_5, s_6, s_7, skip_utf8(), and slice_from_s().

Referenced by dutch_porter_UTF_8_stem().

◆ r_R1()

static int r_R1 ( struct SN_env z)
static

Definition at line 333 of file stem_UTF_8_dutch_porter.c.

333 {
334 return ((SN_local *)z)->i_p1 <= z->c;
335}

References SN_env::c.

Referenced by r_e_ending(), r_en_ending(), and r_standard_suffix().

◆ r_R2()

static int r_R2 ( struct SN_env z)
static

Definition at line 337 of file stem_UTF_8_dutch_porter.c.

337 {
338 return ((SN_local *)z)->i_p2 <= z->c;
339}

References SN_env::c.

Referenced by r_standard_suffix().

◆ r_standard_suffix()

static int r_standard_suffix ( struct SN_env z)
static

Definition at line 409 of file stem_UTF_8_dutch_porter.c.

409 {
410 int among_var;
411 {
412 int v_1 = z->l - z->c;
413 z->ket = z->c;
414 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
415 among_var = find_among_b(z, a_3, 5, 0);
416 if (!among_var) goto lab0;
417 z->bra = z->c;
418 switch (among_var) {
419 case 1:
420 {
421 int ret = r_R1(z);
422 if (ret == 0) goto lab0;
423 if (ret < 0) return ret;
424 }
425 {
426 int ret = slice_from_s(z, 4, s_11);
427 if (ret < 0) return ret;
428 }
429 break;
430 case 2:
431 {
432 int ret = r_en_ending(z);
433 if (ret == 0) goto lab0;
434 if (ret < 0) return ret;
435 }
436 break;
437 case 3:
438 {
439 int ret = r_R1(z);
440 if (ret == 0) goto lab0;
441 if (ret < 0) return ret;
442 }
443 if (out_grouping_b_U(z, g_v_j, 97, 232, 0)) goto lab0;
444 {
445 int ret = slice_del(z);
446 if (ret < 0) return ret;
447 }
448 break;
449 }
450 lab0:
451 z->c = z->l - v_1;
452 }
453 {
454 int v_2 = z->l - z->c;
455 {
456 int ret = r_e_ending(z);
457 if (ret < 0) return ret;
458 }
459 z->c = z->l - v_2;
460 }
461 {
462 int v_3 = z->l - z->c;
463 z->ket = z->c;
464 if (!(eq_s_b(z, 4, s_12))) goto lab1;
465 z->bra = z->c;
466 {
467 int ret = r_R2(z);
468 if (ret == 0) goto lab1;
469 if (ret < 0) return ret;
470 }
471 {
472 int v_4 = z->l - z->c;
473 if (z->c <= z->lb || z->p[z->c - 1] != 'c') goto lab2;
474 z->c--;
475 goto lab1;
476 lab2:
477 z->c = z->l - v_4;
478 }
479 {
480 int ret = slice_del(z);
481 if (ret < 0) return ret;
482 }
483 z->ket = z->c;
484 if (!(eq_s_b(z, 2, s_13))) goto lab1;
485 z->bra = z->c;
486 {
487 int ret = r_en_ending(z);
488 if (ret == 0) goto lab1;
489 if (ret < 0) return ret;
490 }
491 lab1:
492 z->c = z->l - v_3;
493 }
494 {
495 int v_5 = z->l - z->c;
496 z->ket = z->c;
497 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
498 among_var = find_among_b(z, a_4, 6, 0);
499 if (!among_var) goto lab3;
500 z->bra = z->c;
501 switch (among_var) {
502 case 1:
503 {
504 int ret = r_R2(z);
505 if (ret == 0) goto lab3;
506 if (ret < 0) return ret;
507 }
508 {
509 int ret = slice_del(z);
510 if (ret < 0) return ret;
511 }
512 do {
513 int v_6 = z->l - z->c;
514 z->ket = z->c;
515 if (!(eq_s_b(z, 2, s_14))) goto lab4;
516 z->bra = z->c;
517 {
518 int ret = r_R2(z);
519 if (ret == 0) goto lab4;
520 if (ret < 0) return ret;
521 }
522 {
523 int v_7 = z->l - z->c;
524 if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab5;
525 z->c--;
526 goto lab4;
527 lab5:
528 z->c = z->l - v_7;
529 }
530 {
531 int ret = slice_del(z);
532 if (ret < 0) return ret;
533 }
534 break;
535 lab4:
536 z->c = z->l - v_6;
537 {
538 int ret = r_undouble(z);
539 if (ret == 0) goto lab3;
540 if (ret < 0) return ret;
541 }
542 } while (0);
543 break;
544 case 2:
545 {
546 int ret = r_R2(z);
547 if (ret == 0) goto lab3;
548 if (ret < 0) return ret;
549 }
550 {
551 int v_8 = z->l - z->c;
552 if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab6;
553 z->c--;
554 goto lab3;
555 lab6:
556 z->c = z->l - v_8;
557 }
558 {
559 int ret = slice_del(z);
560 if (ret < 0) return ret;
561 }
562 break;
563 case 3:
564 {
565 int ret = r_R2(z);
566 if (ret == 0) goto lab3;
567 if (ret < 0) return ret;
568 }
569 {
570 int ret = slice_del(z);
571 if (ret < 0) return ret;
572 }
573 {
574 int ret = r_e_ending(z);
575 if (ret == 0) goto lab3;
576 if (ret < 0) return ret;
577 }
578 break;
579 case 4:
580 {
581 int ret = r_R2(z);
582 if (ret == 0) goto lab3;
583 if (ret < 0) return ret;
584 }
585 {
586 int ret = slice_del(z);
587 if (ret < 0) return ret;
588 }
589 break;
590 case 5:
591 {
592 int ret = r_R2(z);
593 if (ret == 0) goto lab3;
594 if (ret < 0) return ret;
595 }
596 if (!((SN_local *)z)->b_e_found) goto lab3;
597 {
598 int ret = slice_del(z);
599 if (ret < 0) return ret;
600 }
601 break;
602 }
603 lab3:
604 z->c = z->l - v_5;
605 }
606 {
607 int v_9 = z->l - z->c;
608 if (out_grouping_b_U(z, g_v_I, 73, 232, 0)) goto lab7;
609 {
610 int v_10 = z->l - z->c;
611 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab7;
612 if (!find_among_b(z, a_5, 4, 0)) goto lab7;
613 if (out_grouping_b_U(z, g_v, 97, 232, 0)) goto lab7;
614 z->c = z->l - v_10;
615 }
616 z->ket = z->c;
617 {
618 int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
619 if (ret < 0) goto lab7;
620 z->c = ret;
621 }
622 z->bra = z->c;
623 {
624 int ret = slice_del(z);
625 if (ret < 0) return ret;
626 }
627 lab7:
628 z->c = z->l - v_9;
629 }
630 return 1;
631}
static const struct among a_5[4]
static const unsigned char g_v_I[]
static const unsigned char g_v_j[]
static int r_en_ending(struct SN_env *z)
static const struct among a_4[6]
static int r_R2(struct SN_env *z)
static const symbol s_13[]
static const symbol s_14[]
static const symbol s_11[]
static const symbol s_12[]
static const struct among a_3[5]
static int r_e_ending(struct SN_env *z)
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 skip_b_utf8(const symbol *p, int c, int limit, int n)
Definition utilities.c:68

References a_3, a_4, a_5, SN_env::bra, SN_env::c, eq_s_b(), fb(), find_among_b(), g_v, g_v_I, g_v_j, SN_env::ket, SN_env::l, SN_env::lb, out_grouping_b_U(), SN_env::p, r_e_ending(), r_en_ending(), r_R1(), r_R2(), r_undouble(), s_11, s_12, s_13, s_14, skip_b_utf8(), slice_del(), and slice_from_s().

Referenced by dutch_porter_UTF_8_stem().

◆ r_undouble()

static int r_undouble ( struct SN_env z)
static

Definition at line 341 of file stem_UTF_8_dutch_porter.c.

341 {
342 {
343 int v_1 = z->l - z->c;
344 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
345 if (!find_among_b(z, a_2, 3, 0)) return 0;
346 z->c = z->l - v_1;
347 }
348 z->ket = z->c;
349 {
350 int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
351 if (ret < 0) return 0;
352 z->c = ret;
353 }
354 z->bra = z->c;
355 {
356 int ret = slice_del(z);
357 if (ret < 0) return ret;
358 }
359 return 1;
360}
static const struct among a_2[3]

References a_2, SN_env::bra, SN_env::c, fb(), find_among_b(), SN_env::ket, SN_env::l, SN_env::lb, SN_env::p, skip_b_utf8(), and slice_del().

Referenced by r_e_ending(), r_en_ending(), and r_standard_suffix().

Variable Documentation

◆ a_0

const struct among a_0[11]
static
Initial value:
= {
{ 0, 0, 0, 6, 0},
{ 2, s_0_1, -1, 1, 0},
{ 2, s_0_2, -2, 1, 0},
{ 2, s_0_3, -3, 2, 0},
{ 2, s_0_4, -4, 2, 0},
{ 2, s_0_5, -5, 3, 0},
{ 2, s_0_6, -6, 3, 0},
{ 2, s_0_7, -7, 4, 0},
{ 2, s_0_8, -8, 4, 0},
{ 2, s_0_9, -9, 5, 0},
{ 2, s_0_10, -10, 5, 0}
}
static const symbol s_0_4[2]
static const symbol s_0_5[2]
static const symbol s_0_8[2]
static const symbol s_0_1[2]
static const symbol s_0_7[2]
static const symbol s_0_6[2]
static const symbol s_0_2[2]
static const symbol s_0_10[2]
static const symbol s_0_3[2]
static const symbol s_0_9[2]

Definition at line 62 of file stem_UTF_8_dutch_porter.c.

62 {
63{ 0, 0, 0, 6, 0},
64{ 2, s_0_1, -1, 1, 0},
65{ 2, s_0_2, -2, 1, 0},
66{ 2, s_0_3, -3, 2, 0},
67{ 2, s_0_4, -4, 2, 0},
68{ 2, s_0_5, -5, 3, 0},
69{ 2, s_0_6, -6, 3, 0},
70{ 2, s_0_7, -7, 4, 0},
71{ 2, s_0_8, -8, 4, 0},
72{ 2, s_0_9, -9, 5, 0},
73{ 2, s_0_10, -10, 5, 0}
74};

Referenced by r_prelude().

◆ a_1

const struct among a_1[3]
static
Initial value:
= {
{ 0, 0, 0, 3, 0},
{ 1, s_1_1, -1, 2, 0},
{ 1, s_1_2, -2, 1, 0}
}
static const symbol s_1_2[1]
static const symbol s_1_1[1]

Definition at line 78 of file stem_UTF_8_dutch_porter.c.

78 {
79{ 0, 0, 0, 3, 0},
80{ 1, s_1_1, -1, 2, 0},
81{ 1, s_1_2, -2, 1, 0}
82};

Referenced by r_postlude().

◆ a_2

const struct among a_2[3]
static
Initial value:
= {
{ 2, s_2_0, 0, -1, 0},
{ 2, s_2_1, 0, -1, 0},
{ 2, s_2_2, 0, -1, 0}
}
static const symbol s_2_2[2]
static const symbol s_2_0[2]
static const symbol s_2_1[2]

Definition at line 87 of file stem_UTF_8_dutch_porter.c.

87 {
88{ 2, s_2_0, 0, -1, 0},
89{ 2, s_2_1, 0, -1, 0},
90{ 2, s_2_2, 0, -1, 0}
91};

Referenced by r_undouble().

◆ a_3

const struct among a_3[5]
static
Initial value:
= {
{ 3, s_3_0, 0, 2, 0},
{ 2, s_3_1, 0, 3, 0},
{ 2, s_3_2, 0, 2, 0},
{ 5, s_3_3, -1, 1, 0},
{ 1, s_3_4, 0, 3, 0}
}
static const symbol s_3_1[2]
static const symbol s_3_0[3]
static const symbol s_3_3[5]
static const symbol s_3_4[1]
static const symbol s_3_2[2]

Definition at line 98 of file stem_UTF_8_dutch_porter.c.

98 {
99{ 3, s_3_0, 0, 2, 0},
100{ 2, s_3_1, 0, 3, 0},
101{ 2, s_3_2, 0, 2, 0},
102{ 5, s_3_3, -1, 1, 0},
103{ 1, s_3_4, 0, 3, 0}
104};

Referenced by r_standard_suffix().

◆ a_4

const struct among a_4[6]
static
Initial value:
= {
{ 3, s_4_0, 0, 1, 0},
{ 2, s_4_1, 0, 2, 0},
{ 3, s_4_2, 0, 1, 0},
{ 4, s_4_3, 0, 3, 0},
{ 4, s_4_4, 0, 4, 0},
{ 3, s_4_5, 0, 5, 0}
}
static const symbol s_4_3[4]
static const symbol s_4_1[2]
static const symbol s_4_4[4]
static const symbol s_4_5[3]
static const symbol s_4_2[3]
static const symbol s_4_0[3]

Definition at line 112 of file stem_UTF_8_dutch_porter.c.

112 {
113{ 3, s_4_0, 0, 1, 0},
114{ 2, s_4_1, 0, 2, 0},
115{ 3, s_4_2, 0, 1, 0},
116{ 4, s_4_3, 0, 3, 0},
117{ 4, s_4_4, 0, 4, 0},
118{ 3, s_4_5, 0, 5, 0}
119};

Referenced by r_standard_suffix().

◆ a_5

const struct among a_5[4]
static
Initial value:
= {
{ 2, s_5_0, 0, -1, 0},
{ 2, s_5_1, 0, -1, 0},
{ 2, s_5_2, 0, -1, 0},
{ 2, s_5_3, 0, -1, 0}
}
static const symbol s_5_3[2]
static const symbol s_5_0[2]
static const symbol s_5_2[2]
static const symbol s_5_1[2]

Definition at line 125 of file stem_UTF_8_dutch_porter.c.

125 {
126{ 2, s_5_0, 0, -1, 0},
127{ 2, s_5_1, 0, -1, 0},
128{ 2, s_5_2, 0, -1, 0},
129{ 2, s_5_3, 0, -1, 0}
130};

Referenced by r_standard_suffix().

◆ g_v

const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }
static

Definition at line 132 of file stem_UTF_8_dutch_porter.c.

132{ 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };

Referenced by r_e_ending(), r_en_ending(), r_mark_regions(), r_prelude(), and r_standard_suffix().

◆ g_v_I

const unsigned char g_v_I[] = { 1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }
static

Definition at line 134 of file stem_UTF_8_dutch_porter.c.

134{ 1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };

Referenced by r_standard_suffix().

◆ g_v_j

const unsigned char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 }
static

Definition at line 136 of file stem_UTF_8_dutch_porter.c.

136{ 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };

Referenced by r_standard_suffix().

◆ s_0

const symbol s_0[] = { 'a' }
static

Definition at line 36 of file stem_UTF_8_dutch_porter.c.

36{ 'a' };

Referenced by r_prelude().

◆ s_0_1

const symbol s_0_1[2] = { 0xC3, 0xA1 }
static

Definition at line 52 of file stem_UTF_8_dutch_porter.c.

52{ 0xC3, 0xA1 };

◆ s_0_10

const symbol s_0_10[2] = { 0xC3, 0xBC }
static

Definition at line 61 of file stem_UTF_8_dutch_porter.c.

61{ 0xC3, 0xBC };

◆ s_0_2

const symbol s_0_2[2] = { 0xC3, 0xA4 }
static

Definition at line 53 of file stem_UTF_8_dutch_porter.c.

53{ 0xC3, 0xA4 };

◆ s_0_3

const symbol s_0_3[2] = { 0xC3, 0xA9 }
static

Definition at line 54 of file stem_UTF_8_dutch_porter.c.

54{ 0xC3, 0xA9 };

◆ s_0_4

const symbol s_0_4[2] = { 0xC3, 0xAB }
static

Definition at line 55 of file stem_UTF_8_dutch_porter.c.

55{ 0xC3, 0xAB };

◆ s_0_5

const symbol s_0_5[2] = { 0xC3, 0xAD }
static

Definition at line 56 of file stem_UTF_8_dutch_porter.c.

56{ 0xC3, 0xAD };

◆ s_0_6

const symbol s_0_6[2] = { 0xC3, 0xAF }
static

Definition at line 57 of file stem_UTF_8_dutch_porter.c.

57{ 0xC3, 0xAF };

◆ s_0_7

const symbol s_0_7[2] = { 0xC3, 0xB3 }
static

Definition at line 58 of file stem_UTF_8_dutch_porter.c.

58{ 0xC3, 0xB3 };

◆ s_0_8

const symbol s_0_8[2] = { 0xC3, 0xB6 }
static

Definition at line 59 of file stem_UTF_8_dutch_porter.c.

59{ 0xC3, 0xB6 };

◆ s_0_9

const symbol s_0_9[2] = { 0xC3, 0xBA }
static

Definition at line 60 of file stem_UTF_8_dutch_porter.c.

60{ 0xC3, 0xBA };

◆ s_1

const symbol s_1[] = { 'e' }
static

Definition at line 37 of file stem_UTF_8_dutch_porter.c.

37{ 'e' };

Referenced by r_prelude().

◆ s_10

const symbol s_10[] = { 'g', 'e', 'm' }
static

Definition at line 46 of file stem_UTF_8_dutch_porter.c.

46{ 'g', 'e', 'm' };

Referenced by r_en_ending().

◆ s_11

const symbol s_11[] = { 'h', 'e', 'i', 'd' }
static

Definition at line 47 of file stem_UTF_8_dutch_porter.c.

47{ 'h', 'e', 'i', 'd' };

Referenced by r_standard_suffix().

◆ s_12

const symbol s_12[] = { 'h', 'e', 'i', 'd' }
static

Definition at line 48 of file stem_UTF_8_dutch_porter.c.

48{ 'h', 'e', 'i', 'd' };

Referenced by r_standard_suffix().

◆ s_13

const symbol s_13[] = { 'e', 'n' }
static

Definition at line 49 of file stem_UTF_8_dutch_porter.c.

49{ 'e', 'n' };

Referenced by r_standard_suffix().

◆ s_14

const symbol s_14[] = { 'i', 'g' }
static

Definition at line 50 of file stem_UTF_8_dutch_porter.c.

50{ 'i', 'g' };

Referenced by r_standard_suffix().

◆ s_1_1

const symbol s_1_1[1] = { 'I' }
static

Definition at line 76 of file stem_UTF_8_dutch_porter.c.

76{ 'I' };

◆ s_1_2

const symbol s_1_2[1] = { 'Y' }
static

Definition at line 77 of file stem_UTF_8_dutch_porter.c.

77{ 'Y' };

◆ s_2

const symbol s_2[] = { 'i' }
static

Definition at line 38 of file stem_UTF_8_dutch_porter.c.

38{ 'i' };

Referenced by r_prelude().

◆ s_2_0

const symbol s_2_0[2] = { 'd', 'd' }
static

Definition at line 84 of file stem_UTF_8_dutch_porter.c.

84{ 'd', 'd' };

◆ s_2_1

const symbol s_2_1[2] = { 'k', 'k' }
static

Definition at line 85 of file stem_UTF_8_dutch_porter.c.

85{ 'k', 'k' };

◆ s_2_2

const symbol s_2_2[2] = { 't', 't' }
static

Definition at line 86 of file stem_UTF_8_dutch_porter.c.

86{ 't', 't' };

◆ s_3

const symbol s_3[] = { 'o' }
static

Definition at line 39 of file stem_UTF_8_dutch_porter.c.

39{ 'o' };

Referenced by r_prelude().

◆ s_3_0

const symbol s_3_0[3] = { 'e', 'n', 'e' }
static

Definition at line 93 of file stem_UTF_8_dutch_porter.c.

93{ 'e', 'n', 'e' };

◆ s_3_1

const symbol s_3_1[2] = { 's', 'e' }
static

Definition at line 94 of file stem_UTF_8_dutch_porter.c.

94{ 's', 'e' };

◆ s_3_2

const symbol s_3_2[2] = { 'e', 'n' }
static

Definition at line 95 of file stem_UTF_8_dutch_porter.c.

95{ 'e', 'n' };

◆ s_3_3

const symbol s_3_3[5] = { 'h', 'e', 'd', 'e', 'n' }
static

Definition at line 96 of file stem_UTF_8_dutch_porter.c.

96{ 'h', 'e', 'd', 'e', 'n' };

◆ s_3_4

const symbol s_3_4[1] = { 's' }
static

Definition at line 97 of file stem_UTF_8_dutch_porter.c.

97{ 's' };

◆ s_4

const symbol s_4[] = { 'u' }
static

Definition at line 40 of file stem_UTF_8_dutch_porter.c.

40{ 'u' };

Referenced by r_prelude().

◆ s_4_0

const symbol s_4_0[3] = { 'e', 'n', 'd' }
static

Definition at line 106 of file stem_UTF_8_dutch_porter.c.

106{ 'e', 'n', 'd' };

◆ s_4_1

const symbol s_4_1[2] = { 'i', 'g' }
static

Definition at line 107 of file stem_UTF_8_dutch_porter.c.

107{ 'i', 'g' };

◆ s_4_2

const symbol s_4_2[3] = { 'i', 'n', 'g' }
static

Definition at line 108 of file stem_UTF_8_dutch_porter.c.

108{ 'i', 'n', 'g' };

◆ s_4_3

const symbol s_4_3[4] = { 'l', 'i', 'j', 'k' }
static

Definition at line 109 of file stem_UTF_8_dutch_porter.c.

109{ 'l', 'i', 'j', 'k' };

◆ s_4_4

const symbol s_4_4[4] = { 'b', 'a', 'a', 'r' }
static

Definition at line 110 of file stem_UTF_8_dutch_porter.c.

110{ 'b', 'a', 'a', 'r' };

◆ s_4_5

const symbol s_4_5[3] = { 'b', 'a', 'r' }
static

Definition at line 111 of file stem_UTF_8_dutch_porter.c.

111{ 'b', 'a', 'r' };

◆ s_5

const symbol s_5[] = { 'Y' }
static

Definition at line 41 of file stem_UTF_8_dutch_porter.c.

41{ 'Y' };

Referenced by r_prelude().

◆ s_5_0

const symbol s_5_0[2] = { 'a', 'a' }
static

Definition at line 121 of file stem_UTF_8_dutch_porter.c.

121{ 'a', 'a' };

◆ s_5_1

const symbol s_5_1[2] = { 'e', 'e' }
static

Definition at line 122 of file stem_UTF_8_dutch_porter.c.

122{ 'e', 'e' };

◆ s_5_2

const symbol s_5_2[2] = { 'o', 'o' }
static

Definition at line 123 of file stem_UTF_8_dutch_porter.c.

123{ 'o', 'o' };

◆ s_5_3

const symbol s_5_3[2] = { 'u', 'u' }
static

Definition at line 124 of file stem_UTF_8_dutch_porter.c.

124{ 'u', 'u' };

◆ s_6

const symbol s_6[] = { 'I' }
static

Definition at line 42 of file stem_UTF_8_dutch_porter.c.

42{ 'I' };

Referenced by r_prelude().

◆ s_7

const symbol s_7[] = { 'Y' }
static

Definition at line 43 of file stem_UTF_8_dutch_porter.c.

43{ 'Y' };

Referenced by r_prelude().

◆ s_8

const symbol s_8[] = { 'y' }
static

Definition at line 44 of file stem_UTF_8_dutch_porter.c.

44{ 'y' };

Referenced by r_postlude().

◆ s_9

const symbol s_9[] = { 'i' }
static

Definition at line 45 of file stem_UTF_8_dutch_porter.c.

45{ 'i' };

Referenced by r_postlude().