Go to the source code of this file.
Functions | |
struct SN_env * | swedish_UTF_8_create_env (void) |
void | swedish_UTF_8_close_env (struct SN_env *z) |
int | swedish_UTF_8_stem (struct SN_env *z) |
void swedish_UTF_8_close_env | ( | struct SN_env * | z | ) |
Definition at line 308 of file stem_UTF_8_swedish.c.
References SN_close_env().
{ SN_close_env(z, 0); }
struct SN_env* swedish_UTF_8_create_env | ( | void | ) | [read] |
Definition at line 306 of file stem_UTF_8_swedish.c.
References SN_create_env().
{ return SN_create_env(0, 2, 0); }
int swedish_UTF_8_stem | ( | struct SN_env * | z | ) |
Definition at line 267 of file stem_UTF_8_swedish.c.
References SN_env::c, SN_env::l, SN_env::lb, r_consonant_pair(), r_main_suffix(), r_mark_regions(), and r_other_suffix().
{ { int c1 = z->c; /* do, line 66 */ { int ret = r_mark_regions(z); if (ret == 0) goto lab0; /* call mark_regions, line 66 */ if (ret < 0) return ret; } lab0: z->c = c1; } z->lb = z->c; z->c = z->l; /* backwards, line 67 */ { int m2 = z->l - z->c; (void)m2; /* do, line 68 */ { int ret = r_main_suffix(z); if (ret == 0) goto lab1; /* call main_suffix, line 68 */ if (ret < 0) return ret; } lab1: z->c = z->l - m2; } { int m3 = z->l - z->c; (void)m3; /* do, line 69 */ { int ret = r_consonant_pair(z); if (ret == 0) goto lab2; /* call consonant_pair, line 69 */ if (ret < 0) return ret; } lab2: z->c = z->l - m3; } { int m4 = z->l - z->c; (void)m4; /* do, line 70 */ { int ret = r_other_suffix(z); if (ret == 0) goto lab3; /* call other_suffix, line 70 */ if (ret < 0) return ret; } lab3: z->c = z->l - m4; } z->c = z->lb; return 1; }