isomorfeus-ferret 0.12.2 → 0.12.6
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 -44
- 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_search.c +14 -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 +12 -15
- 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/index/index.rb +1 -1
- data/lib/isomorfeus/ferret/version.rb +1 -1
- metadata +43 -7
- data/ext/isomorfeus_ferret_ext/q_parser.y +0 -1366
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
/* This file was generated automatically by the Snowball to ANSI C compiler */
|
1
|
+
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
3
2
|
|
4
3
|
#include "stem_header.h"
|
5
4
|
|
@@ -49,38 +48,38 @@ static const symbol s_0_31[4] = { 'e', 'r', 'e', 't' };
|
|
49
48
|
|
50
49
|
static const struct among a_0[32] =
|
51
50
|
{
|
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
|
-
|
83
|
-
|
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}
|
84
83
|
};
|
85
84
|
|
86
85
|
static const symbol s_1_0[2] = { 'g', 'd' };
|
@@ -90,10 +89,10 @@ static const symbol s_1_3[2] = { 'k', 't' };
|
|
90
89
|
|
91
90
|
static const struct among a_1[4] =
|
92
91
|
{
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
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}
|
97
96
|
};
|
98
97
|
|
99
98
|
static const symbol s_2_0[2] = { 'i', 'g' };
|
@@ -104,13 +103,15 @@ static const symbol s_2_4[4] = { 'l', 0xF8, 's', 't' };
|
|
104
103
|
|
105
104
|
static const struct among a_2[5] =
|
106
105
|
{
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
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
|
+
{ 4, s_2_4, -1, 2, 0}
|
112
111
|
};
|
113
112
|
|
113
|
+
static const unsigned char g_c[] = { 119, 223, 119, 1 };
|
114
|
+
|
114
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 };
|
115
116
|
|
116
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 };
|
@@ -120,54 +121,49 @@ static const symbol s_1[] = { 'i', 'g' };
|
|
120
121
|
static const symbol s_2[] = { 'l', 0xF8, 's' };
|
121
122
|
|
122
123
|
static int r_mark_regions(struct SN_env * z) {
|
123
|
-
z->I[
|
124
|
-
{ int
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
z->I[1] = z->c; /* setmark x, line 33 */
|
130
|
-
z->c = c_test;
|
124
|
+
z->I[1] = z->l;
|
125
|
+
{ int c_test1 = z->c;
|
126
|
+
z->c = z->c + 3;
|
127
|
+
if (z->c > z->l) return 0;
|
128
|
+
z->I[0] = z->c;
|
129
|
+
z->c = c_test1;
|
131
130
|
}
|
132
|
-
if (out_grouping(z, g_v, 97, 248, 1) < 0) return 0;
|
133
|
-
{
|
131
|
+
if (out_grouping(z, g_v, 97, 248, 1) < 0) return 0;
|
132
|
+
{
|
134
133
|
int ret = in_grouping(z, g_v, 97, 248, 1);
|
135
134
|
if (ret < 0) return 0;
|
136
135
|
z->c += ret;
|
137
136
|
}
|
138
|
-
z->I[
|
139
|
-
|
140
|
-
if (!(z->I[
|
141
|
-
z->I[
|
137
|
+
z->I[1] = z->c;
|
138
|
+
|
139
|
+
if (!(z->I[1] < z->I[0])) goto lab0;
|
140
|
+
z->I[1] = z->I[0];
|
142
141
|
lab0:
|
143
142
|
return 1;
|
144
143
|
}
|
145
144
|
|
146
145
|
static int r_main_suffix(struct SN_env * z) {
|
147
146
|
int among_var;
|
148
|
-
|
149
|
-
|
150
|
-
if (z->c < z->I[
|
151
|
-
z->
|
152
|
-
|
153
|
-
z->c
|
154
|
-
|
155
|
-
if (
|
156
|
-
|
157
|
-
|
158
|
-
z->bra = z->c; /* ], line 41 */
|
159
|
-
z->lb = mlimit;
|
147
|
+
|
148
|
+
{ int mlimit1;
|
149
|
+
if (z->c < z->I[1]) return 0;
|
150
|
+
mlimit1 = z->lb; z->lb = z->I[1];
|
151
|
+
z->ket = z->c;
|
152
|
+
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; }
|
153
|
+
among_var = find_among_b(z, a_0, 32);
|
154
|
+
if (!(among_var)) { z->lb = mlimit1; return 0; }
|
155
|
+
z->bra = z->c;
|
156
|
+
z->lb = mlimit1;
|
160
157
|
}
|
161
|
-
switch(among_var) {
|
162
|
-
case 0: return 0;
|
158
|
+
switch (among_var) {
|
163
159
|
case 1:
|
164
|
-
{ int ret = slice_del(z);
|
160
|
+
{ int ret = slice_del(z);
|
165
161
|
if (ret < 0) return ret;
|
166
162
|
}
|
167
163
|
break;
|
168
164
|
case 2:
|
169
165
|
if (in_grouping_b(z, g_s_ending, 97, 229, 0)) return 0;
|
170
|
-
{ int ret = slice_del(z);
|
166
|
+
{ int ret = slice_del(z);
|
171
167
|
if (ret < 0) return ret;
|
172
168
|
}
|
173
169
|
break;
|
@@ -176,25 +172,23 @@ static int r_main_suffix(struct SN_env * z) {
|
|
176
172
|
}
|
177
173
|
|
178
174
|
static int r_consonant_pair(struct SN_env * z) {
|
179
|
-
{ int
|
180
|
-
|
181
|
-
|
182
|
-
if (z->c < z->I[
|
183
|
-
z->
|
184
|
-
|
185
|
-
z->c
|
186
|
-
z
|
187
|
-
|
188
|
-
|
189
|
-
z->bra = z->c; /* ], line 56 */
|
190
|
-
z->lb = mlimit;
|
175
|
+
{ int m_test1 = z->l - z->c;
|
176
|
+
|
177
|
+
{ int mlimit2;
|
178
|
+
if (z->c < z->I[1]) return 0;
|
179
|
+
mlimit2 = z->lb; z->lb = z->I[1];
|
180
|
+
z->ket = z->c;
|
181
|
+
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit2; return 0; }
|
182
|
+
if (!(find_among_b(z, a_1, 4))) { z->lb = mlimit2; return 0; }
|
183
|
+
z->bra = z->c;
|
184
|
+
z->lb = mlimit2;
|
191
185
|
}
|
192
|
-
z->c = z->l -
|
186
|
+
z->c = z->l - m_test1;
|
193
187
|
}
|
194
188
|
if (z->c <= z->lb) return 0;
|
195
|
-
z->c--;
|
196
|
-
z->bra = z->c;
|
197
|
-
{ int ret = slice_del(z);
|
189
|
+
z->c--;
|
190
|
+
z->bra = z->c;
|
191
|
+
{ int ret = slice_del(z);
|
198
192
|
if (ret < 0) return ret;
|
199
193
|
}
|
200
194
|
return 1;
|
@@ -202,47 +196,42 @@ static int r_consonant_pair(struct SN_env * z) {
|
|
202
196
|
|
203
197
|
static int r_other_suffix(struct SN_env * z) {
|
204
198
|
int among_var;
|
205
|
-
{ int m1 = z->l - z->c; (void)m1;
|
206
|
-
z->ket = z->c;
|
199
|
+
{ int m1 = z->l - z->c; (void)m1;
|
200
|
+
z->ket = z->c;
|
207
201
|
if (!(eq_s_b(z, 2, s_0))) goto lab0;
|
208
|
-
z->bra = z->c;
|
202
|
+
z->bra = z->c;
|
209
203
|
if (!(eq_s_b(z, 2, s_1))) goto lab0;
|
210
|
-
{ int ret = slice_del(z);
|
204
|
+
{ int ret = slice_del(z);
|
211
205
|
if (ret < 0) return ret;
|
212
206
|
}
|
213
207
|
lab0:
|
214
208
|
z->c = z->l - m1;
|
215
209
|
}
|
216
|
-
|
217
|
-
|
218
|
-
if (z->c < z->I[
|
219
|
-
z->
|
220
|
-
|
221
|
-
z->c
|
222
|
-
|
223
|
-
if (
|
224
|
-
|
225
|
-
|
226
|
-
z->bra = z->c; /* ], line 67 */
|
227
|
-
z->lb = mlimit;
|
210
|
+
|
211
|
+
{ int mlimit2;
|
212
|
+
if (z->c < z->I[1]) return 0;
|
213
|
+
mlimit2 = z->lb; z->lb = z->I[1];
|
214
|
+
z->ket = z->c;
|
215
|
+
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; }
|
216
|
+
among_var = find_among_b(z, a_2, 5);
|
217
|
+
if (!(among_var)) { z->lb = mlimit2; return 0; }
|
218
|
+
z->bra = z->c;
|
219
|
+
z->lb = mlimit2;
|
228
220
|
}
|
229
|
-
switch(among_var) {
|
230
|
-
case 0: return 0;
|
221
|
+
switch (among_var) {
|
231
222
|
case 1:
|
232
|
-
{ int ret = slice_del(z);
|
223
|
+
{ int ret = slice_del(z);
|
233
224
|
if (ret < 0) return ret;
|
234
225
|
}
|
235
|
-
{ int m3 = z->l - z->c; (void)m3;
|
226
|
+
{ int m3 = z->l - z->c; (void)m3;
|
236
227
|
{ int ret = r_consonant_pair(z);
|
237
|
-
if (ret == 0) goto lab1; /* call consonant_pair, line 70 */
|
238
228
|
if (ret < 0) return ret;
|
239
229
|
}
|
240
|
-
lab1:
|
241
230
|
z->c = z->l - m3;
|
242
231
|
}
|
243
232
|
break;
|
244
233
|
case 2:
|
245
|
-
{ int ret = slice_from_s(z, 3, s_2);
|
234
|
+
{ int ret = slice_from_s(z, 3, s_2);
|
246
235
|
if (ret < 0) return ret;
|
247
236
|
}
|
248
237
|
break;
|
@@ -251,74 +240,62 @@ static int r_other_suffix(struct SN_env * z) {
|
|
251
240
|
}
|
252
241
|
|
253
242
|
static int r_undouble(struct SN_env * z) {
|
254
|
-
|
255
|
-
|
256
|
-
if (z->c < z->I[
|
257
|
-
z->
|
258
|
-
|
259
|
-
z
|
260
|
-
z->
|
261
|
-
|
262
|
-
|
263
|
-
z->
|
264
|
-
if (z->S[0] == 0) return -1; /* -> ch, line 76 */
|
265
|
-
z->lb = mlimit;
|
243
|
+
|
244
|
+
{ int mlimit1;
|
245
|
+
if (z->c < z->I[1]) return 0;
|
246
|
+
mlimit1 = z->lb; z->lb = z->I[1];
|
247
|
+
z->ket = z->c;
|
248
|
+
if (in_grouping_b(z, g_c, 98, 122, 0)) { z->lb = mlimit1; return 0; }
|
249
|
+
z->bra = z->c;
|
250
|
+
z->S[0] = slice_to(z, z->S[0]);
|
251
|
+
if (z->S[0] == 0) return -1;
|
252
|
+
z->lb = mlimit1;
|
266
253
|
}
|
267
|
-
if (!(eq_v_b(z, z->S[0]))) return 0;
|
268
|
-
{ int ret = slice_del(z);
|
254
|
+
if (!(eq_v_b(z, z->S[0]))) return 0;
|
255
|
+
{ int ret = slice_del(z);
|
269
256
|
if (ret < 0) return ret;
|
270
257
|
}
|
271
258
|
return 1;
|
272
259
|
}
|
273
260
|
|
274
261
|
extern int danish_ISO_8859_1_stem(struct SN_env * z) {
|
275
|
-
{ int c1 = z->c;
|
262
|
+
{ int c1 = z->c;
|
276
263
|
{ int ret = r_mark_regions(z);
|
277
|
-
if (ret == 0) goto lab0; /* call mark_regions, line 84 */
|
278
264
|
if (ret < 0) return ret;
|
279
265
|
}
|
280
|
-
lab0:
|
281
266
|
z->c = c1;
|
282
267
|
}
|
283
|
-
z->lb = z->c; z->c = z->l;
|
268
|
+
z->lb = z->c; z->c = z->l;
|
284
269
|
|
285
|
-
{ int m2 = z->l - z->c; (void)m2;
|
270
|
+
{ int m2 = z->l - z->c; (void)m2;
|
286
271
|
{ int ret = r_main_suffix(z);
|
287
|
-
if (ret == 0) goto lab1; /* call main_suffix, line 86 */
|
288
272
|
if (ret < 0) return ret;
|
289
273
|
}
|
290
|
-
lab1:
|
291
274
|
z->c = z->l - m2;
|
292
275
|
}
|
293
|
-
{ int m3 = z->l - z->c; (void)m3;
|
276
|
+
{ int m3 = z->l - z->c; (void)m3;
|
294
277
|
{ int ret = r_consonant_pair(z);
|
295
|
-
if (ret == 0) goto lab2; /* call consonant_pair, line 87 */
|
296
278
|
if (ret < 0) return ret;
|
297
279
|
}
|
298
|
-
lab2:
|
299
280
|
z->c = z->l - m3;
|
300
281
|
}
|
301
|
-
{ int m4 = z->l - z->c; (void)m4;
|
282
|
+
{ int m4 = z->l - z->c; (void)m4;
|
302
283
|
{ int ret = r_other_suffix(z);
|
303
|
-
if (ret == 0) goto lab3; /* call other_suffix, line 88 */
|
304
284
|
if (ret < 0) return ret;
|
305
285
|
}
|
306
|
-
lab3:
|
307
286
|
z->c = z->l - m4;
|
308
287
|
}
|
309
|
-
{ int m5 = z->l - z->c; (void)m5;
|
288
|
+
{ int m5 = z->l - z->c; (void)m5;
|
310
289
|
{ int ret = r_undouble(z);
|
311
|
-
if (ret == 0) goto lab4; /* call undouble, line 89 */
|
312
290
|
if (ret < 0) return ret;
|
313
291
|
}
|
314
|
-
lab4:
|
315
292
|
z->c = z->l - m5;
|
316
293
|
}
|
317
294
|
z->c = z->lb;
|
318
295
|
return 1;
|
319
296
|
}
|
320
297
|
|
321
|
-
extern struct SN_env * danish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2
|
298
|
+
extern struct SN_env * danish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2); }
|
322
299
|
|
323
300
|
extern void danish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 1); }
|
324
301
|
|