📄 stem_utf_8_turkish.c
字号:
/* 12 */ { 3, s_20_12, -1, -1, 0},/* 13 */ { 3, s_20_13, -1, -1, 0},/* 14 */ { 4, s_20_14, -1, -1, 0},/* 15 */ { 4, s_20_15, -1, -1, 0},/* 16 */ { 4, s_20_16, -1, -1, 0},/* 17 */ { 4, s_20_17, -1, -1, 0},/* 18 */ { 3, s_20_18, -1, -1, 0},/* 19 */ { 3, s_20_19, -1, -1, 0},/* 20 */ { 3, s_20_20, -1, -1, 0},/* 21 */ { 3, s_20_21, -1, -1, 0},/* 22 */ { 4, s_20_22, -1, -1, 0},/* 23 */ { 4, s_20_23, -1, -1, 0},/* 24 */ { 4, s_20_24, -1, -1, 0},/* 25 */ { 4, s_20_25, -1, -1, 0},/* 26 */ { 2, s_20_26, -1, -1, 0},/* 27 */ { 2, s_20_27, -1, -1, 0},/* 28 */ { 3, s_20_28, -1, -1, 0},/* 29 */ { 3, s_20_29, -1, -1, 0},/* 30 */ { 3, s_20_30, -1, -1, 0},/* 31 */ { 3, s_20_31, -1, -1, 0}};static const symbol s_21_0[2] = { 's', 'a' };static const symbol s_21_1[2] = { 's', 'e' };static const symbol s_21_2[3] = { 's', 'a', 'k' };static const symbol s_21_3[3] = { 's', 'e', 'k' };static const symbol s_21_4[3] = { 's', 'a', 'm' };static const symbol s_21_5[3] = { 's', 'e', 'm' };static const symbol s_21_6[3] = { 's', 'a', 'n' };static const symbol s_21_7[3] = { 's', 'e', 'n' };static const struct among a_21[8] ={/* 0 */ { 2, s_21_0, -1, -1, 0},/* 1 */ { 2, s_21_1, -1, -1, 0},/* 2 */ { 3, s_21_2, -1, -1, 0},/* 3 */ { 3, s_21_3, -1, -1, 0},/* 4 */ { 3, s_21_4, -1, -1, 0},/* 5 */ { 3, s_21_5, -1, -1, 0},/* 6 */ { 3, s_21_6, -1, -1, 0},/* 7 */ { 3, s_21_7, -1, -1, 0}};static const symbol s_22_0[4] = { 'm', 'i', 0xC5, 0x9F };static const symbol s_22_1[4] = { 'm', 'u', 0xC5, 0x9F };static const symbol s_22_2[5] = { 'm', 0xC4, 0xB1, 0xC5, 0x9F };static const symbol s_22_3[5] = { 'm', 0xC3, 0xBC, 0xC5, 0x9F };static const struct among a_22[4] ={/* 0 */ { 4, s_22_0, -1, -1, 0},/* 1 */ { 4, s_22_1, -1, -1, 0},/* 2 */ { 5, s_22_2, -1, -1, 0},/* 3 */ { 5, s_22_3, -1, -1, 0}};static const symbol s_23_0[1] = { 'b' };static const symbol s_23_1[1] = { 'c' };static const symbol s_23_2[1] = { 'd' };static const symbol s_23_3[2] = { 0xC4, 0x9F };static const struct among a_23[4] ={/* 0 */ { 1, s_23_0, -1, 1, 0},/* 1 */ { 1, s_23_1, -1, 2, 0},/* 2 */ { 1, s_23_2, -1, 3, 0},/* 3 */ { 2, s_23_3, -1, 4, 0}};static 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 };static 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 };static 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 };static const unsigned char g_vowel2[] = { 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130 };static 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 };static const unsigned char g_vowel4[] = { 17 };static const unsigned char g_vowel5[] = { 65 };static const unsigned char g_vowel6[] = { 65 };static const symbol s_0[] = { 'a' };static const symbol s_1[] = { 'e' };static const symbol s_2[] = { 0xC4, 0xB1 };static const symbol s_3[] = { 'i' };static const symbol s_4[] = { 'o' };static const symbol s_5[] = { 0xC3, 0xB6 };static const symbol s_6[] = { 'u' };static const symbol s_7[] = { 0xC3, 0xBC };static const symbol s_8[] = { 'n' };static const symbol s_9[] = { 'n' };static const symbol s_10[] = { 's' };static const symbol s_11[] = { 's' };static const symbol s_12[] = { 'y' };static const symbol s_13[] = { 'y' };static const symbol s_14[] = { 'k', 'i' };static const symbol s_15[] = { 'k', 'e', 'n' };static const symbol s_16[] = { 'p' };static const symbol s_17[] = { 0xC3, 0xA7 };static const symbol s_18[] = { 't' };static const symbol s_19[] = { 'k' };static const symbol s_20[] = { 'd' };static const symbol s_21[] = { 'g' };static const symbol s_22[] = { 'a' };static const symbol s_23[] = { 0xC4, 0xB1 };static const symbol s_24[] = { 0xC4, 0xB1 };static const symbol s_25[] = { 'e' };static const symbol s_26[] = { 'i' };static const symbol s_27[] = { 'i' };static const symbol s_28[] = { 'o' };static const symbol s_29[] = { 'u' };static const symbol s_30[] = { 'u' };static const symbol s_31[] = { 0xC3, 0xB6 };static const symbol s_32[] = { 0xC3, 0xBC };static const symbol s_33[] = { 0xC3, 0xBC };static const symbol s_34[] = { 'a', 'd' };static const symbol s_35[] = { 's', 'o', 'y', 'a', 'd' };static int r_check_vowel_harmony(struct SN_env * z) { { int m_test = z->l - z->c; /* test, line 112 */ if (out_grouping_b_U(z, g_vowel, 97, 305, 1) < 0) return 0; /* goto */ /* grouping vowel, line 114 */ { int m1 = z->l - z->c; (void)m1; /* or, line 116 */ if (!(eq_s_b(z, 1, s_0))) goto lab1; if (out_grouping_b_U(z, g_vowel1, 97, 305, 1) < 0) goto lab1; /* goto */ /* grouping vowel1, line 116 */ goto lab0; lab1: z->c = z->l - m1; if (!(eq_s_b(z, 1, s_1))) goto lab2; if (out_grouping_b_U(z, g_vowel2, 101, 252, 1) < 0) goto lab2; /* goto */ /* grouping vowel2, line 117 */ goto lab0; lab2: z->c = z->l - m1; if (!(eq_s_b(z, 2, s_2))) goto lab3; if (out_grouping_b_U(z, g_vowel3, 97, 305, 1) < 0) goto lab3; /* goto */ /* grouping vowel3, line 118 */ goto lab0; lab3: z->c = z->l - m1; if (!(eq_s_b(z, 1, s_3))) goto lab4; if (out_grouping_b_U(z, g_vowel4, 101, 105, 1) < 0) goto lab4; /* goto */ /* grouping vowel4, line 119 */ goto lab0; lab4: z->c = z->l - m1; if (!(eq_s_b(z, 1, s_4))) goto lab5; if (out_grouping_b_U(z, g_vowel5, 111, 117, 1) < 0) goto lab5; /* goto */ /* grouping vowel5, line 120 */ goto lab0; lab5: z->c = z->l - m1; if (!(eq_s_b(z, 2, s_5))) goto lab6; if (out_grouping_b_U(z, g_vowel6, 246, 252, 1) < 0) goto lab6; /* goto */ /* grouping vowel6, line 121 */ goto lab0; lab6: z->c = z->l - m1; if (!(eq_s_b(z, 1, s_6))) goto lab7; if (out_grouping_b_U(z, g_vowel5, 111, 117, 1) < 0) goto lab7; /* goto */ /* grouping vowel5, line 122 */ goto lab0; lab7: z->c = z->l - m1; if (!(eq_s_b(z, 2, s_7))) return 0; if (out_grouping_b_U(z, g_vowel6, 246, 252, 1) < 0) return 0; /* goto */ /* grouping vowel6, line 123 */ } lab0: z->c = z->l - m_test; } return 1;}static int r_mark_suffix_with_optional_n_consonant(struct SN_env * z) { { int m1 = z->l - z->c; (void)m1; /* or, line 134 */ { int m_test = z->l - z->c; /* test, line 133 */ if (!(eq_s_b(z, 1, s_8))) goto lab1; z->c = z->l - m_test; } { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1); if (ret < 0) goto lab1; z->c = ret; /* next, line 133 */ } { int m_test = z->l - z->c; /* test, line 133 */ if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) goto lab1; z->c = z->l - m_test; } goto lab0; lab1: z->c = z->l - m1; { int m2 = z->l - z->c; (void)m2; /* not, line 135 */ { int m_test = z->l - z->c; /* test, line 135 */ if (!(eq_s_b(z, 1, s_9))) goto lab2; z->c = z->l - m_test; } return 0; lab2: z->c = z->l - m2; } { int m_test = z->l - z->c; /* test, line 135 */ { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1); if (ret < 0) return 0; z->c = ret; /* next, line 135 */ } { int m_test = z->l - z->c; /* test, line 135 */ if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) return 0; z->c = z->l - m_test; } z->c = z->l - m_test; } }lab0: return 1;}static int r_mark_suffix_with_optional_s_consonant(struct SN_env * z) { { int m1 = z->l - z->c; (void)m1; /* or, line 145 */ { int m_test = z->l - z->c; /* test, line 144 */ if (!(eq_s_b(z, 1, s_10))) goto lab1; z->c = z->l - m_test; } { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1); if (ret < 0) goto lab1; z->c = ret; /* next, line 144 */ } { int m_test = z->l - z->c; /* test, line 144 */ if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) goto lab1; z->c = z->l - m_test; } goto lab0; lab1: z->c = z->l - m1; { int m2 = z->l - z->c; (void)m2; /* not, line 146 */ { int m_test = z->l - z->c; /* test, line 146 */ if (!(eq_s_b(z, 1, s_11))) goto lab2; z->c = z->l - m_test; } return 0; lab2: z->c = z->l - m2; } { int m_test = z->l - z->c; /* test, line 146 */ { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1); if (ret < 0) return 0; z->c = ret; /* next, line 146 */ } { int m_test = z->l - z->c; /* test, line 146 */ if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) return 0; z->c = z->l - m_test; } z->c = z->l - m_test; } }lab0: return 1;}static int r_mark_suffix_with_optional_y_consonant(struct SN_env * z) { { int m1 = z->l - z->c; (void)m1; /* or, line 155 */ { int m_test = z->l - z->c; /* test, line 154 */ if (!(eq_s_b(z, 1, s_12))) goto lab1; z->c = z->l - m_test; } { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1); if (ret < 0) goto lab1; z->c = ret; /* next, line 154 */ } { int m_test = z->l - z->c; /* test, line 154 */ if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) goto lab1; z->c = z->l - m_test; } goto lab0; lab1: z->c = z->l - m1; { int m2 = z->l - z->c; (void)m2; /* not, line 156 */ { int m_test = z->l - z->c; /* test, line 156 */ if (!(eq_s_b(z, 1, s_13))) goto lab2; z->c = z->l - m_test; } return 0; lab2: z->c = z->l - m2; } { int m_test = z->l - z->c; /* test, line 156 */ { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1); if (ret < 0) return 0; z->c = ret; /* next, line 156 */ } { int m_test = z->l - z->c; /* test, line 156 */ if (in_grouping_b_U(z, g_vowel, 97, 305, 0)) return 0; z->c = z->l - m_test; } z->c = z->l - m_test; } }lab0: return 1;}static int r_mark_suffix_with_optional_U_vowel(struct SN_env * z) { { int m1 = z->l - z->c; (void)m1; /* or, line 161 */ { int m_test = z->l - z->c; /* test, line 160 */ if (in_grouping_b_U(z, g_U, 105, 305, 0)) goto lab1; z->c = z->l - m_test; } { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1); if (ret < 0) goto lab1; z->c = ret; /* next, line 160 */ } { int m_test = z->l - z->c; /* test, line 160 */ if (out_grouping_b_U(z, g_vowel, 97, 305, 0)) goto lab1; z->c = z->l - m_test; } goto lab0; lab1: z->c = z->l - m1; { int m2 = z->l - z->c; (void)m2; /* not, line 162 */ { int m_test = z->l - z->c; /* test, line 162 */ if (in_grouping_b_U(z, g_U, 105, 305, 0)) goto lab2; z->c = z->l - m_test; } return 0; lab2: z->c = z->l - m2; } { int m_test = z->l - z->c; /* test, line 162 */ { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1); if (ret < 0) return 0; z->c = ret; /* next, line 162 */ } { int m_test = z->l - z->c; /* test, line 162 */ if (out_grouping_b_U(z, g_vowel, 97, 305, 0)) return 0; z->c = z->l - m_test; } z->c = z->l - m_test; } }lab0: return 1;}static int r_mark_possessives(struct SN_env * z) { if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((67133440 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; if (!(find_among_b(z, a_0, 10))) return 0; /* among, line 167 */ { int ret = r_mark_suffix_with_optional_U_vowel(z); if (ret == 0) return 0; /* call mark_suffix_with_optional_U_vowel, line 169 */ if (ret < 0) return ret; } return 1;}static int r_mark_sU(struct SN_env * z) { { int ret = r_check_vowel_harmony(z); if (ret == 0) return 0; /* call check_vowel_harmony, line 173 */ if (ret < 0) return ret; } if (in_grouping_b_U(z, g_U, 105, 305, 0)) return 0; { int ret = r_mark_suffix_with_optional_s_consonant(z);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -