isomorfeus-ferret 0.12.4 → 0.12.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +612 -612
- data/README.md +80 -48
- data/ext/isomorfeus_ferret_ext/bm_hash.c +9 -6
- data/ext/isomorfeus_ferret_ext/bm_micro_string.c +4 -2
- data/ext/isomorfeus_ferret_ext/frb_store.c +34 -5
- data/ext/isomorfeus_ferret_ext/frt_posh.h +11 -19
- data/ext/isomorfeus_ferret_ext/frt_q_parser.c +1844 -1911
- data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +7 -7
- data/ext/isomorfeus_ferret_ext/frt_scanner.c +1 -0
- data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +1 -0
- data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +1 -0
- data/ext/isomorfeus_ferret_ext/frt_search.h +1 -1
- data/ext/isomorfeus_ferret_ext/libstemmer.c +14 -11
- data/ext/isomorfeus_ferret_ext/libstemmer.h +4 -9
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.c +1167 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.c +1433 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +120 -143
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +1 -2
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +217 -237
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +377 -432
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +298 -342
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +1 -2
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +530 -524
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +201 -214
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.c +394 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.c +457 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +396 -439
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +104 -128
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +242 -273
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +406 -461
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +1 -2
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +405 -456
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +108 -126
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.c +849 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +373 -405
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +288 -305
- data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.c +1651 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.c +546 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.c +1171 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.c +1436 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.c +121 -141
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.c +221 -241
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.c +381 -431
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.c +300 -345
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.c +518 -511
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.c +201 -209
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.c +3660 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.c +309 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.c +306 -671
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.c +394 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.c +457 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.c +400 -442
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.c +824 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.c +408 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.c +105 -127
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.c +245 -276
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.c +409 -464
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.c +376 -408
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.c +272 -287
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.c +6530 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.c +407 -458
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.c +110 -125
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.c +1865 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.c +698 -806
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.c +1220 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_api.c +1 -9
- data/ext/isomorfeus_ferret_ext/stem_api.h +1 -3
- data/ext/isomorfeus_ferret_ext/stem_header.h +30 -26
- data/ext/isomorfeus_ferret_ext/stem_modules.h +113 -26
- data/ext/isomorfeus_ferret_ext/stem_modules.txt +18 -5
- data/ext/isomorfeus_ferret_ext/stem_utilities.c +167 -132
- data/ext/isomorfeus_ferret_ext/test.c +7 -1
- data/ext/isomorfeus_ferret_ext/test_search.c +0 -1
- data/lib/isomorfeus/ferret/version.rb +1 -1
- metadata +39 -4
- data/ext/isomorfeus_ferret_ext/q_parser.y +0 -1366
@@ -1,4 +1,4 @@
|
|
1
|
-
/*
|
1
|
+
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
2
2
|
|
3
3
|
#include "stem_header.h"
|
4
4
|
|
@@ -48,38 +48,38 @@ static const symbol s_0_31[4] = { 'e', 'r', 'e', 't' };
|
|
48
48
|
|
49
49
|
static const struct among a_0[32] =
|
50
50
|
{
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
51
|
+
{ 3, s_0_0, -1, 1, 0},
|
52
|
+
{ 5, s_0_1, 0, 1, 0},
|
53
|
+
{ 4, s_0_2, -1, 1, 0},
|
54
|
+
{ 1, s_0_3, -1, 1, 0},
|
55
|
+
{ 5, s_0_4, 3, 1, 0},
|
56
|
+
{ 4, s_0_5, 3, 1, 0},
|
57
|
+
{ 6, s_0_6, 5, 1, 0},
|
58
|
+
{ 3, s_0_7, 3, 1, 0},
|
59
|
+
{ 4, s_0_8, 3, 1, 0},
|
60
|
+
{ 3, s_0_9, 3, 1, 0},
|
61
|
+
{ 2, s_0_10, -1, 1, 0},
|
62
|
+
{ 5, s_0_11, 10, 1, 0},
|
63
|
+
{ 4, s_0_12, 10, 1, 0},
|
64
|
+
{ 2, s_0_13, -1, 1, 0},
|
65
|
+
{ 5, s_0_14, 13, 1, 0},
|
66
|
+
{ 4, s_0_15, 13, 1, 0},
|
67
|
+
{ 1, s_0_16, -1, 2, 0},
|
68
|
+
{ 4, s_0_17, 16, 1, 0},
|
69
|
+
{ 2, s_0_18, 16, 1, 0},
|
70
|
+
{ 5, s_0_19, 18, 1, 0},
|
71
|
+
{ 7, s_0_20, 19, 1, 0},
|
72
|
+
{ 4, s_0_21, 18, 1, 0},
|
73
|
+
{ 5, s_0_22, 18, 1, 0},
|
74
|
+
{ 4, s_0_23, 18, 1, 0},
|
75
|
+
{ 3, s_0_24, 16, 1, 0},
|
76
|
+
{ 6, s_0_25, 24, 1, 0},
|
77
|
+
{ 5, s_0_26, 24, 1, 0},
|
78
|
+
{ 3, s_0_27, 16, 1, 0},
|
79
|
+
{ 3, s_0_28, 16, 1, 0},
|
80
|
+
{ 5, s_0_29, 28, 1, 0},
|
81
|
+
{ 2, s_0_30, -1, 1, 0},
|
82
|
+
{ 4, s_0_31, 30, 1, 0}
|
83
83
|
};
|
84
84
|
|
85
85
|
static const symbol s_1_0[2] = { 'g', 'd' };
|
@@ -89,10 +89,10 @@ static const symbol s_1_3[2] = { 'k', 't' };
|
|
89
89
|
|
90
90
|
static const struct among a_1[4] =
|
91
91
|
{
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
92
|
+
{ 2, s_1_0, -1, -1, 0},
|
93
|
+
{ 2, s_1_1, -1, -1, 0},
|
94
|
+
{ 2, s_1_2, -1, -1, 0},
|
95
|
+
{ 2, s_1_3, -1, -1, 0}
|
96
96
|
};
|
97
97
|
|
98
98
|
static const symbol s_2_0[2] = { 'i', 'g' };
|
@@ -103,13 +103,15 @@ static const symbol s_2_4[5] = { 'l', 0xC3, 0xB8, 's', 't' };
|
|
103
103
|
|
104
104
|
static const struct among a_2[5] =
|
105
105
|
{
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
106
|
+
{ 2, s_2_0, -1, 1, 0},
|
107
|
+
{ 3, s_2_1, 0, 1, 0},
|
108
|
+
{ 4, s_2_2, 1, 1, 0},
|
109
|
+
{ 3, s_2_3, -1, 1, 0},
|
110
|
+
{ 5, s_2_4, -1, 2, 0}
|
111
111
|
};
|
112
112
|
|
113
|
+
static const unsigned char g_c[] = { 119, 223, 119, 1 };
|
114
|
+
|
113
115
|
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 };
|
114
116
|
|
115
117
|
static const unsigned char g_s_ending[] = { 239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 };
|
@@ -119,54 +121,51 @@ static const symbol s_1[] = { 'i', 'g' };
|
|
119
121
|
static const symbol s_2[] = { 'l', 0xC3, 0xB8, 's' };
|
120
122
|
|
121
123
|
static int r_mark_regions(struct SN_env * z) {
|
122
|
-
z->I[
|
123
|
-
{ int
|
124
|
-
{ int ret = skip_utf8(z->p, z->c,
|
124
|
+
z->I[1] = z->l;
|
125
|
+
{ int c_test1 = z->c;
|
126
|
+
{ int ret = skip_utf8(z->p, z->c, z->l, 3);
|
125
127
|
if (ret < 0) return 0;
|
126
|
-
z->c = ret;
|
128
|
+
z->c = ret;
|
127
129
|
}
|
128
|
-
z->I[
|
129
|
-
z->c =
|
130
|
+
z->I[0] = z->c;
|
131
|
+
z->c = c_test1;
|
130
132
|
}
|
131
|
-
if (out_grouping_U(z, g_v, 97, 248, 1) < 0) return 0;
|
132
|
-
{
|
133
|
+
if (out_grouping_U(z, g_v, 97, 248, 1) < 0) return 0;
|
134
|
+
{
|
133
135
|
int ret = in_grouping_U(z, g_v, 97, 248, 1);
|
134
136
|
if (ret < 0) return 0;
|
135
137
|
z->c += ret;
|
136
138
|
}
|
137
|
-
z->I[
|
138
|
-
|
139
|
-
if (!(z->I[
|
140
|
-
z->I[
|
139
|
+
z->I[1] = z->c;
|
140
|
+
|
141
|
+
if (!(z->I[1] < z->I[0])) goto lab0;
|
142
|
+
z->I[1] = z->I[0];
|
141
143
|
lab0:
|
142
144
|
return 1;
|
143
145
|
}
|
144
146
|
|
145
147
|
static int r_main_suffix(struct SN_env * z) {
|
146
148
|
int among_var;
|
147
|
-
|
148
|
-
|
149
|
-
if (z->c < z->I[
|
150
|
-
z->
|
151
|
-
|
152
|
-
z->c
|
153
|
-
|
154
|
-
if (
|
155
|
-
|
156
|
-
|
157
|
-
z->bra = z->c; /* ], line 41 */
|
158
|
-
z->lb = mlimit;
|
149
|
+
|
150
|
+
{ int mlimit1;
|
151
|
+
if (z->c < z->I[1]) return 0;
|
152
|
+
mlimit1 = z->lb; z->lb = z->I[1];
|
153
|
+
z->ket = z->c;
|
154
|
+
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851440 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
|
155
|
+
among_var = find_among_b(z, a_0, 32);
|
156
|
+
if (!(among_var)) { z->lb = mlimit1; return 0; }
|
157
|
+
z->bra = z->c;
|
158
|
+
z->lb = mlimit1;
|
159
159
|
}
|
160
|
-
switch(among_var) {
|
161
|
-
case 0: return 0;
|
160
|
+
switch (among_var) {
|
162
161
|
case 1:
|
163
|
-
{ int ret = slice_del(z);
|
162
|
+
{ int ret = slice_del(z);
|
164
163
|
if (ret < 0) return ret;
|
165
164
|
}
|
166
165
|
break;
|
167
166
|
case 2:
|
168
167
|
if (in_grouping_b_U(z, g_s_ending, 97, 229, 0)) return 0;
|
169
|
-
{ int ret = slice_del(z);
|
168
|
+
{ int ret = slice_del(z);
|
170
169
|
if (ret < 0) return ret;
|
171
170
|
}
|
172
171
|
break;
|
@@ -175,27 +174,25 @@ static int r_main_suffix(struct SN_env * z) {
|
|
175
174
|
}
|
176
175
|
|
177
176
|
static int r_consonant_pair(struct SN_env * z) {
|
178
|
-
{ int
|
179
|
-
|
180
|
-
|
181
|
-
if (z->c < z->I[
|
182
|
-
z->
|
183
|
-
|
184
|
-
z->c
|
185
|
-
z
|
186
|
-
|
187
|
-
|
188
|
-
z->bra = z->c; /* ], line 56 */
|
189
|
-
z->lb = mlimit;
|
177
|
+
{ int m_test1 = z->l - z->c;
|
178
|
+
|
179
|
+
{ int mlimit2;
|
180
|
+
if (z->c < z->I[1]) return 0;
|
181
|
+
mlimit2 = z->lb; z->lb = z->I[1];
|
182
|
+
z->ket = z->c;
|
183
|
+
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit2; return 0; }
|
184
|
+
if (!(find_among_b(z, a_1, 4))) { z->lb = mlimit2; return 0; }
|
185
|
+
z->bra = z->c;
|
186
|
+
z->lb = mlimit2;
|
190
187
|
}
|
191
|
-
z->c = z->l -
|
188
|
+
z->c = z->l - m_test1;
|
192
189
|
}
|
193
|
-
{ int ret =
|
190
|
+
{ int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
|
194
191
|
if (ret < 0) return 0;
|
195
|
-
z->c = ret;
|
192
|
+
z->c = ret;
|
196
193
|
}
|
197
|
-
z->bra = z->c;
|
198
|
-
{ int ret = slice_del(z);
|
194
|
+
z->bra = z->c;
|
195
|
+
{ int ret = slice_del(z);
|
199
196
|
if (ret < 0) return ret;
|
200
197
|
}
|
201
198
|
return 1;
|
@@ -203,47 +200,42 @@ static int r_consonant_pair(struct SN_env * z) {
|
|
203
200
|
|
204
201
|
static int r_other_suffix(struct SN_env * z) {
|
205
202
|
int among_var;
|
206
|
-
{ int m1 = z->l - z->c; (void)m1;
|
207
|
-
z->ket = z->c;
|
203
|
+
{ int m1 = z->l - z->c; (void)m1;
|
204
|
+
z->ket = z->c;
|
208
205
|
if (!(eq_s_b(z, 2, s_0))) goto lab0;
|
209
|
-
z->bra = z->c;
|
206
|
+
z->bra = z->c;
|
210
207
|
if (!(eq_s_b(z, 2, s_1))) goto lab0;
|
211
|
-
{ int ret = slice_del(z);
|
208
|
+
{ int ret = slice_del(z);
|
212
209
|
if (ret < 0) return ret;
|
213
210
|
}
|
214
211
|
lab0:
|
215
212
|
z->c = z->l - m1;
|
216
213
|
}
|
217
|
-
|
218
|
-
|
219
|
-
if (z->c < z->I[
|
220
|
-
z->
|
221
|
-
|
222
|
-
z->c
|
223
|
-
|
224
|
-
if (
|
225
|
-
|
226
|
-
|
227
|
-
z->bra = z->c; /* ], line 67 */
|
228
|
-
z->lb = mlimit;
|
214
|
+
|
215
|
+
{ int mlimit2;
|
216
|
+
if (z->c < z->I[1]) return 0;
|
217
|
+
mlimit2 = z->lb; z->lb = z->I[1];
|
218
|
+
z->ket = z->c;
|
219
|
+
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit2; return 0; }
|
220
|
+
among_var = find_among_b(z, a_2, 5);
|
221
|
+
if (!(among_var)) { z->lb = mlimit2; return 0; }
|
222
|
+
z->bra = z->c;
|
223
|
+
z->lb = mlimit2;
|
229
224
|
}
|
230
|
-
switch(among_var) {
|
231
|
-
case 0: return 0;
|
225
|
+
switch (among_var) {
|
232
226
|
case 1:
|
233
|
-
{ int ret = slice_del(z);
|
227
|
+
{ int ret = slice_del(z);
|
234
228
|
if (ret < 0) return ret;
|
235
229
|
}
|
236
|
-
{ int m3 = z->l - z->c; (void)m3;
|
230
|
+
{ int m3 = z->l - z->c; (void)m3;
|
237
231
|
{ int ret = r_consonant_pair(z);
|
238
|
-
if (ret == 0) goto lab1; /* call consonant_pair, line 70 */
|
239
232
|
if (ret < 0) return ret;
|
240
233
|
}
|
241
|
-
lab1:
|
242
234
|
z->c = z->l - m3;
|
243
235
|
}
|
244
236
|
break;
|
245
237
|
case 2:
|
246
|
-
{ int ret = slice_from_s(z, 4, s_2);
|
238
|
+
{ int ret = slice_from_s(z, 4, s_2);
|
247
239
|
if (ret < 0) return ret;
|
248
240
|
}
|
249
241
|
break;
|
@@ -252,74 +244,62 @@ static int r_other_suffix(struct SN_env * z) {
|
|
252
244
|
}
|
253
245
|
|
254
246
|
static int r_undouble(struct SN_env * z) {
|
255
|
-
|
256
|
-
|
257
|
-
if (z->c < z->I[
|
258
|
-
z->
|
259
|
-
|
260
|
-
z
|
261
|
-
z->
|
262
|
-
|
263
|
-
|
264
|
-
z->
|
265
|
-
if (z->S[0] == 0) return -1; /* -> ch, line 76 */
|
266
|
-
z->lb = mlimit;
|
247
|
+
|
248
|
+
{ int mlimit1;
|
249
|
+
if (z->c < z->I[1]) return 0;
|
250
|
+
mlimit1 = z->lb; z->lb = z->I[1];
|
251
|
+
z->ket = z->c;
|
252
|
+
if (in_grouping_b_U(z, g_c, 98, 122, 0)) { z->lb = mlimit1; return 0; }
|
253
|
+
z->bra = z->c;
|
254
|
+
z->S[0] = slice_to(z, z->S[0]);
|
255
|
+
if (z->S[0] == 0) return -1;
|
256
|
+
z->lb = mlimit1;
|
267
257
|
}
|
268
|
-
if (!(eq_v_b(z, z->S[0]))) return 0;
|
269
|
-
{ int ret = slice_del(z);
|
258
|
+
if (!(eq_v_b(z, z->S[0]))) return 0;
|
259
|
+
{ int ret = slice_del(z);
|
270
260
|
if (ret < 0) return ret;
|
271
261
|
}
|
272
262
|
return 1;
|
273
263
|
}
|
274
264
|
|
275
265
|
extern int danish_UTF_8_stem(struct SN_env * z) {
|
276
|
-
{ int c1 = z->c;
|
266
|
+
{ int c1 = z->c;
|
277
267
|
{ int ret = r_mark_regions(z);
|
278
|
-
if (ret == 0) goto lab0; /* call mark_regions, line 84 */
|
279
268
|
if (ret < 0) return ret;
|
280
269
|
}
|
281
|
-
lab0:
|
282
270
|
z->c = c1;
|
283
271
|
}
|
284
|
-
z->lb = z->c; z->c = z->l;
|
272
|
+
z->lb = z->c; z->c = z->l;
|
285
273
|
|
286
|
-
{ int m2 = z->l - z->c; (void)m2;
|
274
|
+
{ int m2 = z->l - z->c; (void)m2;
|
287
275
|
{ int ret = r_main_suffix(z);
|
288
|
-
if (ret == 0) goto lab1; /* call main_suffix, line 86 */
|
289
276
|
if (ret < 0) return ret;
|
290
277
|
}
|
291
|
-
lab1:
|
292
278
|
z->c = z->l - m2;
|
293
279
|
}
|
294
|
-
{ int m3 = z->l - z->c; (void)m3;
|
280
|
+
{ int m3 = z->l - z->c; (void)m3;
|
295
281
|
{ int ret = r_consonant_pair(z);
|
296
|
-
if (ret == 0) goto lab2; /* call consonant_pair, line 87 */
|
297
282
|
if (ret < 0) return ret;
|
298
283
|
}
|
299
|
-
lab2:
|
300
284
|
z->c = z->l - m3;
|
301
285
|
}
|
302
|
-
{ int m4 = z->l - z->c; (void)m4;
|
286
|
+
{ int m4 = z->l - z->c; (void)m4;
|
303
287
|
{ int ret = r_other_suffix(z);
|
304
|
-
if (ret == 0) goto lab3; /* call other_suffix, line 88 */
|
305
288
|
if (ret < 0) return ret;
|
306
289
|
}
|
307
|
-
lab3:
|
308
290
|
z->c = z->l - m4;
|
309
291
|
}
|
310
|
-
{ int m5 = z->l - z->c; (void)m5;
|
292
|
+
{ int m5 = z->l - z->c; (void)m5;
|
311
293
|
{ int ret = r_undouble(z);
|
312
|
-
if (ret == 0) goto lab4; /* call undouble, line 89 */
|
313
294
|
if (ret < 0) return ret;
|
314
295
|
}
|
315
|
-
lab4:
|
316
296
|
z->c = z->l - m5;
|
317
297
|
}
|
318
298
|
z->c = z->lb;
|
319
299
|
return 1;
|
320
300
|
}
|
321
301
|
|
322
|
-
extern struct SN_env * danish_UTF_8_create_env(void) { return SN_create_env(1, 2
|
302
|
+
extern struct SN_env * danish_UTF_8_create_env(void) { return SN_create_env(1, 2); }
|
323
303
|
|
324
304
|
extern void danish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 1); }
|
325
305
|
|