chipper 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. data/README.rdoc +51 -0
  2. data/ext/extconf.rb +58 -0
  3. data/ext/libstemmer_c/Makefile +10 -0
  4. data/ext/libstemmer_c/examples/stemwords.c +209 -0
  5. data/ext/libstemmer_c/include/libstemmer.h +79 -0
  6. data/ext/libstemmer_c/libstemmer/libstemmer.c +95 -0
  7. data/ext/libstemmer_c/libstemmer/libstemmer_utf8.c +95 -0
  8. data/ext/libstemmer_c/libstemmer/modules.h +190 -0
  9. data/ext/libstemmer_c/libstemmer/modules_utf8.h +121 -0
  10. data/ext/libstemmer_c/mkinc.mak +82 -0
  11. data/ext/libstemmer_c/mkinc_utf8.mak +52 -0
  12. data/ext/libstemmer_c/runtime/api.c +66 -0
  13. data/ext/libstemmer_c/runtime/api.h +26 -0
  14. data/ext/libstemmer_c/runtime/header.h +58 -0
  15. data/ext/libstemmer_c/runtime/utilities.c +478 -0
  16. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_danish.c +337 -0
  17. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_danish.h +16 -0
  18. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_dutch.c +624 -0
  19. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_dutch.h +16 -0
  20. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_english.c +1117 -0
  21. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_english.h +16 -0
  22. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_finnish.c +762 -0
  23. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_finnish.h +16 -0
  24. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_french.c +1246 -0
  25. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_french.h +16 -0
  26. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_german.c +521 -0
  27. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_german.h +16 -0
  28. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_hungarian.c +1230 -0
  29. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_hungarian.h +16 -0
  30. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_italian.c +1065 -0
  31. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_italian.h +16 -0
  32. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_norwegian.c +297 -0
  33. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_norwegian.h +16 -0
  34. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_porter.c +749 -0
  35. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_porter.h +16 -0
  36. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_portuguese.c +1017 -0
  37. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_portuguese.h +16 -0
  38. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_spanish.c +1093 -0
  39. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_spanish.h +16 -0
  40. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_swedish.c +307 -0
  41. data/ext/libstemmer_c/src_c/stem_ISO_8859_1_swedish.h +16 -0
  42. data/ext/libstemmer_c/src_c/stem_ISO_8859_2_romanian.c +998 -0
  43. data/ext/libstemmer_c/src_c/stem_ISO_8859_2_romanian.h +16 -0
  44. data/ext/libstemmer_c/src_c/stem_KOI8_R_russian.c +700 -0
  45. data/ext/libstemmer_c/src_c/stem_KOI8_R_russian.h +16 -0
  46. data/ext/libstemmer_c/src_c/stem_UTF_8_danish.c +339 -0
  47. data/ext/libstemmer_c/src_c/stem_UTF_8_danish.h +16 -0
  48. data/ext/libstemmer_c/src_c/stem_UTF_8_dutch.c +634 -0
  49. data/ext/libstemmer_c/src_c/stem_UTF_8_dutch.h +16 -0
  50. data/ext/libstemmer_c/src_c/stem_UTF_8_english.c +1125 -0
  51. data/ext/libstemmer_c/src_c/stem_UTF_8_english.h +16 -0
  52. data/ext/libstemmer_c/src_c/stem_UTF_8_finnish.c +768 -0
  53. data/ext/libstemmer_c/src_c/stem_UTF_8_finnish.h +16 -0
  54. data/ext/libstemmer_c/src_c/stem_UTF_8_french.c +1256 -0
  55. data/ext/libstemmer_c/src_c/stem_UTF_8_french.h +16 -0
  56. data/ext/libstemmer_c/src_c/stem_UTF_8_german.c +527 -0
  57. data/ext/libstemmer_c/src_c/stem_UTF_8_german.h +16 -0
  58. data/ext/libstemmer_c/src_c/stem_UTF_8_hungarian.c +1234 -0
  59. data/ext/libstemmer_c/src_c/stem_UTF_8_hungarian.h +16 -0
  60. data/ext/libstemmer_c/src_c/stem_UTF_8_italian.c +1073 -0
  61. data/ext/libstemmer_c/src_c/stem_UTF_8_italian.h +16 -0
  62. data/ext/libstemmer_c/src_c/stem_UTF_8_norwegian.c +299 -0
  63. data/ext/libstemmer_c/src_c/stem_UTF_8_norwegian.h +16 -0
  64. data/ext/libstemmer_c/src_c/stem_UTF_8_porter.c +755 -0
  65. data/ext/libstemmer_c/src_c/stem_UTF_8_porter.h +16 -0
  66. data/ext/libstemmer_c/src_c/stem_UTF_8_portuguese.c +1023 -0
  67. data/ext/libstemmer_c/src_c/stem_UTF_8_portuguese.h +16 -0
  68. data/ext/libstemmer_c/src_c/stem_UTF_8_romanian.c +1004 -0
  69. data/ext/libstemmer_c/src_c/stem_UTF_8_romanian.h +16 -0
  70. data/ext/libstemmer_c/src_c/stem_UTF_8_russian.c +694 -0
  71. data/ext/libstemmer_c/src_c/stem_UTF_8_russian.h +16 -0
  72. data/ext/libstemmer_c/src_c/stem_UTF_8_spanish.c +1097 -0
  73. data/ext/libstemmer_c/src_c/stem_UTF_8_spanish.h +16 -0
  74. data/ext/libstemmer_c/src_c/stem_UTF_8_swedish.c +309 -0
  75. data/ext/libstemmer_c/src_c/stem_UTF_8_swedish.h +16 -0
  76. data/ext/libstemmer_c/src_c/stem_UTF_8_turkish.c +2205 -0
  77. data/ext/libstemmer_c/src_c/stem_UTF_8_turkish.h +16 -0
  78. data/ext/re2/bitstate.cc +378 -0
  79. data/ext/re2/compile.cc +1138 -0
  80. data/ext/re2/dfa.cc +2086 -0
  81. data/ext/re2/filtered_re2.cc +100 -0
  82. data/ext/re2/filtered_re2.h +99 -0
  83. data/ext/re2/hash.cc +231 -0
  84. data/ext/re2/mimics_pcre.cc +185 -0
  85. data/ext/re2/nfa.cc +709 -0
  86. data/ext/re2/onepass.cc +614 -0
  87. data/ext/re2/parse.cc +2202 -0
  88. data/ext/re2/perl_groups.cc +119 -0
  89. data/ext/re2/prefilter.cc +671 -0
  90. data/ext/re2/prefilter.h +105 -0
  91. data/ext/re2/prefilter_tree.cc +398 -0
  92. data/ext/re2/prefilter_tree.h +130 -0
  93. data/ext/re2/prog.cc +341 -0
  94. data/ext/re2/prog.h +376 -0
  95. data/ext/re2/re2.cc +1180 -0
  96. data/ext/re2/re2.h +837 -0
  97. data/ext/re2/regexp.cc +920 -0
  98. data/ext/re2/regexp.h +632 -0
  99. data/ext/re2/rune.cc +258 -0
  100. data/ext/re2/set.cc +113 -0
  101. data/ext/re2/set.h +55 -0
  102. data/ext/re2/simplify.cc +393 -0
  103. data/ext/re2/stringpiece.cc +87 -0
  104. data/ext/re2/stringpiece.h +182 -0
  105. data/ext/re2/tostring.cc +341 -0
  106. data/ext/re2/unicode_casefold.cc +469 -0
  107. data/ext/re2/unicode_casefold.h +75 -0
  108. data/ext/re2/unicode_groups.cc +4851 -0
  109. data/ext/re2/unicode_groups.h +64 -0
  110. data/ext/re2/valgrind.cc +24 -0
  111. data/ext/re2/variadic_function.h +346 -0
  112. data/ext/re2/walker-inl.h +244 -0
  113. data/ext/src/chipper.cc +626 -0
  114. data/ext/src/version.h +1 -0
  115. data/ext/stemmer.rb +40 -0
  116. data/ext/util/arena.h +103 -0
  117. data/ext/util/atomicops.h +79 -0
  118. data/ext/util/benchmark.h +41 -0
  119. data/ext/util/flags.h +27 -0
  120. data/ext/util/logging.h +78 -0
  121. data/ext/util/mutex.h +190 -0
  122. data/ext/util/pcre.h +679 -0
  123. data/ext/util/random.h +29 -0
  124. data/ext/util/sparse_array.h +451 -0
  125. data/ext/util/sparse_set.h +177 -0
  126. data/ext/util/test.h +57 -0
  127. data/ext/util/thread.h +26 -0
  128. data/ext/util/utf.h +43 -0
  129. data/ext/util/util.h +127 -0
  130. data/ext/util/valgrind.h +4517 -0
  131. data/test/helper.rb +5 -0
  132. data/test/test_entities.rb +57 -0
  133. data/test/test_tokens.rb +118 -0
  134. metadata +199 -0
@@ -0,0 +1,16 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ extern struct SN_env * french_UTF_8_create_env(void);
9
+ extern void french_UTF_8_close_env(struct SN_env * z);
10
+
11
+ extern int french_UTF_8_stem(struct SN_env * z);
12
+
13
+ #ifdef __cplusplus
14
+ }
15
+ #endif
16
+
@@ -0,0 +1,527 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "../runtime/header.h"
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+ extern int german_UTF_8_stem(struct SN_env * z);
10
+ #ifdef __cplusplus
11
+ }
12
+ #endif
13
+ static int r_standard_suffix(struct SN_env * z);
14
+ static int r_R2(struct SN_env * z);
15
+ static int r_R1(struct SN_env * z);
16
+ static int r_mark_regions(struct SN_env * z);
17
+ static int r_postlude(struct SN_env * z);
18
+ static int r_prelude(struct SN_env * z);
19
+ #ifdef __cplusplus
20
+ extern "C" {
21
+ #endif
22
+
23
+
24
+ extern struct SN_env * german_UTF_8_create_env(void);
25
+ extern void german_UTF_8_close_env(struct SN_env * z);
26
+
27
+
28
+ #ifdef __cplusplus
29
+ }
30
+ #endif
31
+ static const symbol s_0_1[1] = { 'U' };
32
+ static const symbol s_0_2[1] = { 'Y' };
33
+ static const symbol s_0_3[2] = { 0xC3, 0xA4 };
34
+ static const symbol s_0_4[2] = { 0xC3, 0xB6 };
35
+ static const symbol s_0_5[2] = { 0xC3, 0xBC };
36
+
37
+ static const struct among a_0[6] =
38
+ {
39
+ /* 0 */ { 0, 0, -1, 6, 0},
40
+ /* 1 */ { 1, s_0_1, 0, 2, 0},
41
+ /* 2 */ { 1, s_0_2, 0, 1, 0},
42
+ /* 3 */ { 2, s_0_3, 0, 3, 0},
43
+ /* 4 */ { 2, s_0_4, 0, 4, 0},
44
+ /* 5 */ { 2, s_0_5, 0, 5, 0}
45
+ };
46
+
47
+ static const symbol s_1_0[1] = { 'e' };
48
+ static const symbol s_1_1[2] = { 'e', 'm' };
49
+ static const symbol s_1_2[2] = { 'e', 'n' };
50
+ static const symbol s_1_3[3] = { 'e', 'r', 'n' };
51
+ static const symbol s_1_4[2] = { 'e', 'r' };
52
+ static const symbol s_1_5[1] = { 's' };
53
+ static const symbol s_1_6[2] = { 'e', 's' };
54
+
55
+ static const struct among a_1[7] =
56
+ {
57
+ /* 0 */ { 1, s_1_0, -1, 2, 0},
58
+ /* 1 */ { 2, s_1_1, -1, 1, 0},
59
+ /* 2 */ { 2, s_1_2, -1, 2, 0},
60
+ /* 3 */ { 3, s_1_3, -1, 1, 0},
61
+ /* 4 */ { 2, s_1_4, -1, 1, 0},
62
+ /* 5 */ { 1, s_1_5, -1, 3, 0},
63
+ /* 6 */ { 2, s_1_6, 5, 2, 0}
64
+ };
65
+
66
+ static const symbol s_2_0[2] = { 'e', 'n' };
67
+ static const symbol s_2_1[2] = { 'e', 'r' };
68
+ static const symbol s_2_2[2] = { 's', 't' };
69
+ static const symbol s_2_3[3] = { 'e', 's', 't' };
70
+
71
+ static const struct among a_2[4] =
72
+ {
73
+ /* 0 */ { 2, s_2_0, -1, 1, 0},
74
+ /* 1 */ { 2, s_2_1, -1, 1, 0},
75
+ /* 2 */ { 2, s_2_2, -1, 2, 0},
76
+ /* 3 */ { 3, s_2_3, 2, 1, 0}
77
+ };
78
+
79
+ static const symbol s_3_0[2] = { 'i', 'g' };
80
+ static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
81
+
82
+ static const struct among a_3[2] =
83
+ {
84
+ /* 0 */ { 2, s_3_0, -1, 1, 0},
85
+ /* 1 */ { 4, s_3_1, -1, 1, 0}
86
+ };
87
+
88
+ static const symbol s_4_0[3] = { 'e', 'n', 'd' };
89
+ static const symbol s_4_1[2] = { 'i', 'g' };
90
+ static const symbol s_4_2[3] = { 'u', 'n', 'g' };
91
+ static const symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };
92
+ static const symbol s_4_4[4] = { 'i', 's', 'c', 'h' };
93
+ static const symbol s_4_5[2] = { 'i', 'k' };
94
+ static const symbol s_4_6[4] = { 'h', 'e', 'i', 't' };
95
+ static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
96
+
97
+ static const struct among a_4[8] =
98
+ {
99
+ /* 0 */ { 3, s_4_0, -1, 1, 0},
100
+ /* 1 */ { 2, s_4_1, -1, 2, 0},
101
+ /* 2 */ { 3, s_4_2, -1, 1, 0},
102
+ /* 3 */ { 4, s_4_3, -1, 3, 0},
103
+ /* 4 */ { 4, s_4_4, -1, 2, 0},
104
+ /* 5 */ { 2, s_4_5, -1, 2, 0},
105
+ /* 6 */ { 4, s_4_6, -1, 3, 0},
106
+ /* 7 */ { 4, s_4_7, -1, 4, 0}
107
+ };
108
+
109
+ static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
110
+
111
+ static const unsigned char g_s_ending[] = { 117, 30, 5 };
112
+
113
+ static const unsigned char g_st_ending[] = { 117, 30, 4 };
114
+
115
+ static const symbol s_0[] = { 0xC3, 0x9F };
116
+ static const symbol s_1[] = { 's', 's' };
117
+ static const symbol s_2[] = { 'u' };
118
+ static const symbol s_3[] = { 'U' };
119
+ static const symbol s_4[] = { 'y' };
120
+ static const symbol s_5[] = { 'Y' };
121
+ static const symbol s_6[] = { 'y' };
122
+ static const symbol s_7[] = { 'u' };
123
+ static const symbol s_8[] = { 'a' };
124
+ static const symbol s_9[] = { 'o' };
125
+ static const symbol s_10[] = { 'u' };
126
+ static const symbol s_11[] = { 's' };
127
+ static const symbol s_12[] = { 'n', 'i', 's' };
128
+ static const symbol s_13[] = { 'i', 'g' };
129
+ static const symbol s_14[] = { 'e' };
130
+ static const symbol s_15[] = { 'e' };
131
+ static const symbol s_16[] = { 'e', 'r' };
132
+ static const symbol s_17[] = { 'e', 'n' };
133
+
134
+ static int r_prelude(struct SN_env * z) {
135
+ { int c_test = z->c; /* test, line 35 */
136
+ while(1) { /* repeat, line 35 */
137
+ int c1 = z->c;
138
+ { int c2 = z->c; /* or, line 38 */
139
+ z->bra = z->c; /* [, line 37 */
140
+ if (!(eq_s(z, 2, s_0))) goto lab2;
141
+ z->ket = z->c; /* ], line 37 */
142
+ { int ret = slice_from_s(z, 2, s_1); /* <-, line 37 */
143
+ if (ret < 0) return ret;
144
+ }
145
+ goto lab1;
146
+ lab2:
147
+ z->c = c2;
148
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
149
+ if (ret < 0) goto lab0;
150
+ z->c = ret; /* next, line 38 */
151
+ }
152
+ }
153
+ lab1:
154
+ continue;
155
+ lab0:
156
+ z->c = c1;
157
+ break;
158
+ }
159
+ z->c = c_test;
160
+ }
161
+ while(1) { /* repeat, line 41 */
162
+ int c3 = z->c;
163
+ while(1) { /* goto, line 41 */
164
+ int c4 = z->c;
165
+ if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
166
+ z->bra = z->c; /* [, line 42 */
167
+ { int c5 = z->c; /* or, line 42 */
168
+ if (!(eq_s(z, 1, s_2))) goto lab6;
169
+ z->ket = z->c; /* ], line 42 */
170
+ if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab6;
171
+ { int ret = slice_from_s(z, 1, s_3); /* <-, line 42 */
172
+ if (ret < 0) return ret;
173
+ }
174
+ goto lab5;
175
+ lab6:
176
+ z->c = c5;
177
+ if (!(eq_s(z, 1, s_4))) goto lab4;
178
+ z->ket = z->c; /* ], line 43 */
179
+ if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
180
+ { int ret = slice_from_s(z, 1, s_5); /* <-, line 43 */
181
+ if (ret < 0) return ret;
182
+ }
183
+ }
184
+ lab5:
185
+ z->c = c4;
186
+ break;
187
+ lab4:
188
+ z->c = c4;
189
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
190
+ if (ret < 0) goto lab3;
191
+ z->c = ret; /* goto, line 41 */
192
+ }
193
+ }
194
+ continue;
195
+ lab3:
196
+ z->c = c3;
197
+ break;
198
+ }
199
+ return 1;
200
+ }
201
+
202
+ static int r_mark_regions(struct SN_env * z) {
203
+ z->I[0] = z->l;
204
+ z->I[1] = z->l;
205
+ { int c_test = z->c; /* test, line 52 */
206
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
207
+ if (ret < 0) return 0;
208
+ z->c = ret; /* hop, line 52 */
209
+ }
210
+ z->I[2] = z->c; /* setmark x, line 52 */
211
+ z->c = c_test;
212
+ }
213
+ { /* gopast */ /* grouping v, line 54 */
214
+ int ret = out_grouping_U(z, g_v, 97, 252, 1);
215
+ if (ret < 0) return 0;
216
+ z->c += ret;
217
+ }
218
+ { /* gopast */ /* non v, line 54 */
219
+ int ret = in_grouping_U(z, g_v, 97, 252, 1);
220
+ if (ret < 0) return 0;
221
+ z->c += ret;
222
+ }
223
+ z->I[0] = z->c; /* setmark p1, line 54 */
224
+ /* try, line 55 */
225
+ if (!(z->I[0] < z->I[2])) goto lab0;
226
+ z->I[0] = z->I[2];
227
+ lab0:
228
+ { /* gopast */ /* grouping v, line 56 */
229
+ int ret = out_grouping_U(z, g_v, 97, 252, 1);
230
+ if (ret < 0) return 0;
231
+ z->c += ret;
232
+ }
233
+ { /* gopast */ /* non v, line 56 */
234
+ int ret = in_grouping_U(z, g_v, 97, 252, 1);
235
+ if (ret < 0) return 0;
236
+ z->c += ret;
237
+ }
238
+ z->I[1] = z->c; /* setmark p2, line 56 */
239
+ return 1;
240
+ }
241
+
242
+ static int r_postlude(struct SN_env * z) {
243
+ int among_var;
244
+ while(1) { /* repeat, line 60 */
245
+ int c1 = z->c;
246
+ z->bra = z->c; /* [, line 62 */
247
+ among_var = find_among(z, a_0, 6); /* substring, line 62 */
248
+ if (!(among_var)) goto lab0;
249
+ z->ket = z->c; /* ], line 62 */
250
+ switch(among_var) {
251
+ case 0: goto lab0;
252
+ case 1:
253
+ { int ret = slice_from_s(z, 1, s_6); /* <-, line 63 */
254
+ if (ret < 0) return ret;
255
+ }
256
+ break;
257
+ case 2:
258
+ { int ret = slice_from_s(z, 1, s_7); /* <-, line 64 */
259
+ if (ret < 0) return ret;
260
+ }
261
+ break;
262
+ case 3:
263
+ { int ret = slice_from_s(z, 1, s_8); /* <-, line 65 */
264
+ if (ret < 0) return ret;
265
+ }
266
+ break;
267
+ case 4:
268
+ { int ret = slice_from_s(z, 1, s_9); /* <-, line 66 */
269
+ if (ret < 0) return ret;
270
+ }
271
+ break;
272
+ case 5:
273
+ { int ret = slice_from_s(z, 1, s_10); /* <-, line 67 */
274
+ if (ret < 0) return ret;
275
+ }
276
+ break;
277
+ case 6:
278
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
279
+ if (ret < 0) goto lab0;
280
+ z->c = ret; /* next, line 68 */
281
+ }
282
+ break;
283
+ }
284
+ continue;
285
+ lab0:
286
+ z->c = c1;
287
+ break;
288
+ }
289
+ return 1;
290
+ }
291
+
292
+ static int r_R1(struct SN_env * z) {
293
+ if (!(z->I[0] <= z->c)) return 0;
294
+ return 1;
295
+ }
296
+
297
+ static int r_R2(struct SN_env * z) {
298
+ if (!(z->I[1] <= z->c)) return 0;
299
+ return 1;
300
+ }
301
+
302
+ static int r_standard_suffix(struct SN_env * z) {
303
+ int among_var;
304
+ { int m1 = z->l - z->c; (void)m1; /* do, line 79 */
305
+ z->ket = z->c; /* [, line 80 */
306
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
307
+ among_var = find_among_b(z, a_1, 7); /* substring, line 80 */
308
+ if (!(among_var)) goto lab0;
309
+ z->bra = z->c; /* ], line 80 */
310
+ { int ret = r_R1(z);
311
+ if (ret == 0) goto lab0; /* call R1, line 80 */
312
+ if (ret < 0) return ret;
313
+ }
314
+ switch(among_var) {
315
+ case 0: goto lab0;
316
+ case 1:
317
+ { int ret = slice_del(z); /* delete, line 82 */
318
+ if (ret < 0) return ret;
319
+ }
320
+ break;
321
+ case 2:
322
+ { int ret = slice_del(z); /* delete, line 85 */
323
+ if (ret < 0) return ret;
324
+ }
325
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 86 */
326
+ z->ket = z->c; /* [, line 86 */
327
+ if (!(eq_s_b(z, 1, s_11))) { z->c = z->l - m_keep; goto lab1; }
328
+ z->bra = z->c; /* ], line 86 */
329
+ if (!(eq_s_b(z, 3, s_12))) { z->c = z->l - m_keep; goto lab1; }
330
+ { int ret = slice_del(z); /* delete, line 86 */
331
+ if (ret < 0) return ret;
332
+ }
333
+ lab1:
334
+ ;
335
+ }
336
+ break;
337
+ case 3:
338
+ if (in_grouping_b_U(z, g_s_ending, 98, 116, 0)) goto lab0;
339
+ { int ret = slice_del(z); /* delete, line 89 */
340
+ if (ret < 0) return ret;
341
+ }
342
+ break;
343
+ }
344
+ lab0:
345
+ z->c = z->l - m1;
346
+ }
347
+ { int m2 = z->l - z->c; (void)m2; /* do, line 93 */
348
+ z->ket = z->c; /* [, line 94 */
349
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
350
+ among_var = find_among_b(z, a_2, 4); /* substring, line 94 */
351
+ if (!(among_var)) goto lab2;
352
+ z->bra = z->c; /* ], line 94 */
353
+ { int ret = r_R1(z);
354
+ if (ret == 0) goto lab2; /* call R1, line 94 */
355
+ if (ret < 0) return ret;
356
+ }
357
+ switch(among_var) {
358
+ case 0: goto lab2;
359
+ case 1:
360
+ { int ret = slice_del(z); /* delete, line 96 */
361
+ if (ret < 0) return ret;
362
+ }
363
+ break;
364
+ case 2:
365
+ if (in_grouping_b_U(z, g_st_ending, 98, 116, 0)) goto lab2;
366
+ { int ret = skip_utf8(z->p, z->c, z->lb, z->l, - 3);
367
+ if (ret < 0) goto lab2;
368
+ z->c = ret; /* hop, line 99 */
369
+ }
370
+ { int ret = slice_del(z); /* delete, line 99 */
371
+ if (ret < 0) return ret;
372
+ }
373
+ break;
374
+ }
375
+ lab2:
376
+ z->c = z->l - m2;
377
+ }
378
+ { int m3 = z->l - z->c; (void)m3; /* do, line 103 */
379
+ z->ket = z->c; /* [, line 104 */
380
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
381
+ among_var = find_among_b(z, a_4, 8); /* substring, line 104 */
382
+ if (!(among_var)) goto lab3;
383
+ z->bra = z->c; /* ], line 104 */
384
+ { int ret = r_R2(z);
385
+ if (ret == 0) goto lab3; /* call R2, line 104 */
386
+ if (ret < 0) return ret;
387
+ }
388
+ switch(among_var) {
389
+ case 0: goto lab3;
390
+ case 1:
391
+ { int ret = slice_del(z); /* delete, line 106 */
392
+ if (ret < 0) return ret;
393
+ }
394
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 107 */
395
+ z->ket = z->c; /* [, line 107 */
396
+ if (!(eq_s_b(z, 2, s_13))) { z->c = z->l - m_keep; goto lab4; }
397
+ z->bra = z->c; /* ], line 107 */
398
+ { int m4 = z->l - z->c; (void)m4; /* not, line 107 */
399
+ if (!(eq_s_b(z, 1, s_14))) goto lab5;
400
+ { z->c = z->l - m_keep; goto lab4; }
401
+ lab5:
402
+ z->c = z->l - m4;
403
+ }
404
+ { int ret = r_R2(z);
405
+ if (ret == 0) { z->c = z->l - m_keep; goto lab4; } /* call R2, line 107 */
406
+ if (ret < 0) return ret;
407
+ }
408
+ { int ret = slice_del(z); /* delete, line 107 */
409
+ if (ret < 0) return ret;
410
+ }
411
+ lab4:
412
+ ;
413
+ }
414
+ break;
415
+ case 2:
416
+ { int m5 = z->l - z->c; (void)m5; /* not, line 110 */
417
+ if (!(eq_s_b(z, 1, s_15))) goto lab6;
418
+ goto lab3;
419
+ lab6:
420
+ z->c = z->l - m5;
421
+ }
422
+ { int ret = slice_del(z); /* delete, line 110 */
423
+ if (ret < 0) return ret;
424
+ }
425
+ break;
426
+ case 3:
427
+ { int ret = slice_del(z); /* delete, line 113 */
428
+ if (ret < 0) return ret;
429
+ }
430
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 114 */
431
+ z->ket = z->c; /* [, line 115 */
432
+ { int m6 = z->l - z->c; (void)m6; /* or, line 115 */
433
+ if (!(eq_s_b(z, 2, s_16))) goto lab9;
434
+ goto lab8;
435
+ lab9:
436
+ z->c = z->l - m6;
437
+ if (!(eq_s_b(z, 2, s_17))) { z->c = z->l - m_keep; goto lab7; }
438
+ }
439
+ lab8:
440
+ z->bra = z->c; /* ], line 115 */
441
+ { int ret = r_R1(z);
442
+ if (ret == 0) { z->c = z->l - m_keep; goto lab7; } /* call R1, line 115 */
443
+ if (ret < 0) return ret;
444
+ }
445
+ { int ret = slice_del(z); /* delete, line 115 */
446
+ if (ret < 0) return ret;
447
+ }
448
+ lab7:
449
+ ;
450
+ }
451
+ break;
452
+ case 4:
453
+ { int ret = slice_del(z); /* delete, line 119 */
454
+ if (ret < 0) return ret;
455
+ }
456
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 120 */
457
+ z->ket = z->c; /* [, line 121 */
458
+ if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m_keep; goto lab10; }
459
+ among_var = find_among_b(z, a_3, 2); /* substring, line 121 */
460
+ if (!(among_var)) { z->c = z->l - m_keep; goto lab10; }
461
+ z->bra = z->c; /* ], line 121 */
462
+ { int ret = r_R2(z);
463
+ if (ret == 0) { z->c = z->l - m_keep; goto lab10; } /* call R2, line 121 */
464
+ if (ret < 0) return ret;
465
+ }
466
+ switch(among_var) {
467
+ case 0: { z->c = z->l - m_keep; goto lab10; }
468
+ case 1:
469
+ { int ret = slice_del(z); /* delete, line 123 */
470
+ if (ret < 0) return ret;
471
+ }
472
+ break;
473
+ }
474
+ lab10:
475
+ ;
476
+ }
477
+ break;
478
+ }
479
+ lab3:
480
+ z->c = z->l - m3;
481
+ }
482
+ return 1;
483
+ }
484
+
485
+ extern int german_UTF_8_stem(struct SN_env * z) {
486
+ { int c1 = z->c; /* do, line 134 */
487
+ { int ret = r_prelude(z);
488
+ if (ret == 0) goto lab0; /* call prelude, line 134 */
489
+ if (ret < 0) return ret;
490
+ }
491
+ lab0:
492
+ z->c = c1;
493
+ }
494
+ { int c2 = z->c; /* do, line 135 */
495
+ { int ret = r_mark_regions(z);
496
+ if (ret == 0) goto lab1; /* call mark_regions, line 135 */
497
+ if (ret < 0) return ret;
498
+ }
499
+ lab1:
500
+ z->c = c2;
501
+ }
502
+ z->lb = z->c; z->c = z->l; /* backwards, line 136 */
503
+
504
+ { int m3 = z->l - z->c; (void)m3; /* do, line 137 */
505
+ { int ret = r_standard_suffix(z);
506
+ if (ret == 0) goto lab2; /* call standard_suffix, line 137 */
507
+ if (ret < 0) return ret;
508
+ }
509
+ lab2:
510
+ z->c = z->l - m3;
511
+ }
512
+ z->c = z->lb;
513
+ { int c4 = z->c; /* do, line 138 */
514
+ { int ret = r_postlude(z);
515
+ if (ret == 0) goto lab3; /* call postlude, line 138 */
516
+ if (ret < 0) return ret;
517
+ }
518
+ lab3:
519
+ z->c = c4;
520
+ }
521
+ return 1;
522
+ }
523
+
524
+ extern struct SN_env * german_UTF_8_create_env(void) { return SN_create_env(0, 3, 0); }
525
+
526
+ extern void german_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
527
+
@@ -0,0 +1,16 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ extern struct SN_env * german_UTF_8_create_env(void);
9
+ extern void german_UTF_8_close_env(struct SN_env * z);
10
+
11
+ extern int german_UTF_8_stem(struct SN_env * z);
12
+
13
+ #ifdef __cplusplus
14
+ }
15
+ #endif
16
+