sdsykes-ferret 0.11.6.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. data/CHANGELOG +24 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README +102 -0
  4. data/Rakefile +338 -0
  5. data/TODO +17 -0
  6. data/TUTORIAL +231 -0
  7. data/bin/ferret-browser +79 -0
  8. data/ext/analysis.c +1555 -0
  9. data/ext/analysis.h +219 -0
  10. data/ext/api.c +69 -0
  11. data/ext/api.h +27 -0
  12. data/ext/array.c +123 -0
  13. data/ext/array.h +53 -0
  14. data/ext/bitvector.c +540 -0
  15. data/ext/bitvector.h +272 -0
  16. data/ext/compound_io.c +383 -0
  17. data/ext/config.h +42 -0
  18. data/ext/document.c +156 -0
  19. data/ext/document.h +53 -0
  20. data/ext/except.c +120 -0
  21. data/ext/except.h +168 -0
  22. data/ext/extconf.rb +14 -0
  23. data/ext/ferret.c +402 -0
  24. data/ext/ferret.h +91 -0
  25. data/ext/filter.c +156 -0
  26. data/ext/fs_store.c +483 -0
  27. data/ext/global.c +418 -0
  28. data/ext/global.h +117 -0
  29. data/ext/hash.c +567 -0
  30. data/ext/hash.h +473 -0
  31. data/ext/hashset.c +170 -0
  32. data/ext/hashset.h +187 -0
  33. data/ext/header.h +58 -0
  34. data/ext/helper.c +62 -0
  35. data/ext/helper.h +13 -0
  36. data/ext/inc/lang.h +48 -0
  37. data/ext/inc/threading.h +31 -0
  38. data/ext/index.c +6425 -0
  39. data/ext/index.h +961 -0
  40. data/ext/lang.h +66 -0
  41. data/ext/libstemmer.c +92 -0
  42. data/ext/libstemmer.h +79 -0
  43. data/ext/mempool.c +87 -0
  44. data/ext/mempool.h +35 -0
  45. data/ext/modules.h +162 -0
  46. data/ext/multimapper.c +310 -0
  47. data/ext/multimapper.h +51 -0
  48. data/ext/posh.c +1006 -0
  49. data/ext/posh.h +1007 -0
  50. data/ext/priorityqueue.c +151 -0
  51. data/ext/priorityqueue.h +143 -0
  52. data/ext/q_boolean.c +1608 -0
  53. data/ext/q_const_score.c +161 -0
  54. data/ext/q_filtered_query.c +209 -0
  55. data/ext/q_fuzzy.c +268 -0
  56. data/ext/q_match_all.c +148 -0
  57. data/ext/q_multi_term.c +677 -0
  58. data/ext/q_parser.c +2825 -0
  59. data/ext/q_phrase.c +1126 -0
  60. data/ext/q_prefix.c +100 -0
  61. data/ext/q_range.c +350 -0
  62. data/ext/q_span.c +2402 -0
  63. data/ext/q_term.c +337 -0
  64. data/ext/q_wildcard.c +171 -0
  65. data/ext/r_analysis.c +2575 -0
  66. data/ext/r_index.c +3472 -0
  67. data/ext/r_qparser.c +585 -0
  68. data/ext/r_search.c +4105 -0
  69. data/ext/r_store.c +513 -0
  70. data/ext/r_utils.c +963 -0
  71. data/ext/ram_store.c +471 -0
  72. data/ext/search.c +1741 -0
  73. data/ext/search.h +885 -0
  74. data/ext/similarity.c +150 -0
  75. data/ext/similarity.h +82 -0
  76. data/ext/sort.c +983 -0
  77. data/ext/stem_ISO_8859_1_danish.c +338 -0
  78. data/ext/stem_ISO_8859_1_danish.h +16 -0
  79. data/ext/stem_ISO_8859_1_dutch.c +635 -0
  80. data/ext/stem_ISO_8859_1_dutch.h +16 -0
  81. data/ext/stem_ISO_8859_1_english.c +1156 -0
  82. data/ext/stem_ISO_8859_1_english.h +16 -0
  83. data/ext/stem_ISO_8859_1_finnish.c +792 -0
  84. data/ext/stem_ISO_8859_1_finnish.h +16 -0
  85. data/ext/stem_ISO_8859_1_french.c +1276 -0
  86. data/ext/stem_ISO_8859_1_french.h +16 -0
  87. data/ext/stem_ISO_8859_1_german.c +512 -0
  88. data/ext/stem_ISO_8859_1_german.h +16 -0
  89. data/ext/stem_ISO_8859_1_italian.c +1091 -0
  90. data/ext/stem_ISO_8859_1_italian.h +16 -0
  91. data/ext/stem_ISO_8859_1_norwegian.c +296 -0
  92. data/ext/stem_ISO_8859_1_norwegian.h +16 -0
  93. data/ext/stem_ISO_8859_1_porter.c +776 -0
  94. data/ext/stem_ISO_8859_1_porter.h +16 -0
  95. data/ext/stem_ISO_8859_1_portuguese.c +1035 -0
  96. data/ext/stem_ISO_8859_1_portuguese.h +16 -0
  97. data/ext/stem_ISO_8859_1_spanish.c +1119 -0
  98. data/ext/stem_ISO_8859_1_spanish.h +16 -0
  99. data/ext/stem_ISO_8859_1_swedish.c +307 -0
  100. data/ext/stem_ISO_8859_1_swedish.h +16 -0
  101. data/ext/stem_KOI8_R_russian.c +701 -0
  102. data/ext/stem_KOI8_R_russian.h +16 -0
  103. data/ext/stem_UTF_8_danish.c +344 -0
  104. data/ext/stem_UTF_8_danish.h +16 -0
  105. data/ext/stem_UTF_8_dutch.c +653 -0
  106. data/ext/stem_UTF_8_dutch.h +16 -0
  107. data/ext/stem_UTF_8_english.c +1176 -0
  108. data/ext/stem_UTF_8_english.h +16 -0
  109. data/ext/stem_UTF_8_finnish.c +808 -0
  110. data/ext/stem_UTF_8_finnish.h +16 -0
  111. data/ext/stem_UTF_8_french.c +1296 -0
  112. data/ext/stem_UTF_8_french.h +16 -0
  113. data/ext/stem_UTF_8_german.c +526 -0
  114. data/ext/stem_UTF_8_german.h +16 -0
  115. data/ext/stem_UTF_8_italian.c +1113 -0
  116. data/ext/stem_UTF_8_italian.h +16 -0
  117. data/ext/stem_UTF_8_norwegian.c +302 -0
  118. data/ext/stem_UTF_8_norwegian.h +16 -0
  119. data/ext/stem_UTF_8_porter.c +794 -0
  120. data/ext/stem_UTF_8_porter.h +16 -0
  121. data/ext/stem_UTF_8_portuguese.c +1055 -0
  122. data/ext/stem_UTF_8_portuguese.h +16 -0
  123. data/ext/stem_UTF_8_russian.c +709 -0
  124. data/ext/stem_UTF_8_russian.h +16 -0
  125. data/ext/stem_UTF_8_spanish.c +1137 -0
  126. data/ext/stem_UTF_8_spanish.h +16 -0
  127. data/ext/stem_UTF_8_swedish.c +313 -0
  128. data/ext/stem_UTF_8_swedish.h +16 -0
  129. data/ext/stopwords.c +401 -0
  130. data/ext/store.c +692 -0
  131. data/ext/store.h +777 -0
  132. data/ext/term_vectors.c +352 -0
  133. data/ext/threading.h +31 -0
  134. data/ext/utilities.c +446 -0
  135. data/ext/win32.h +54 -0
  136. data/lib/ferret.rb +29 -0
  137. data/lib/ferret/browser.rb +246 -0
  138. data/lib/ferret/browser/s/global.js +192 -0
  139. data/lib/ferret/browser/s/style.css +148 -0
  140. data/lib/ferret/browser/views/document/list.rhtml +49 -0
  141. data/lib/ferret/browser/views/document/show.rhtml +27 -0
  142. data/lib/ferret/browser/views/error/index.rhtml +7 -0
  143. data/lib/ferret/browser/views/help/index.rhtml +8 -0
  144. data/lib/ferret/browser/views/home/index.rhtml +29 -0
  145. data/lib/ferret/browser/views/layout.rhtml +22 -0
  146. data/lib/ferret/browser/views/term-vector/index.rhtml +4 -0
  147. data/lib/ferret/browser/views/term/index.rhtml +199 -0
  148. data/lib/ferret/browser/views/term/termdocs.rhtml +1 -0
  149. data/lib/ferret/browser/webrick.rb +14 -0
  150. data/lib/ferret/document.rb +130 -0
  151. data/lib/ferret/field_infos.rb +44 -0
  152. data/lib/ferret/index.rb +786 -0
  153. data/lib/ferret/number_tools.rb +157 -0
  154. data/lib/ferret_version.rb +3 -0
  155. data/setup.rb +1555 -0
  156. data/test/test_all.rb +5 -0
  157. data/test/test_helper.rb +24 -0
  158. data/test/threading/number_to_spoken.rb +132 -0
  159. data/test/threading/thread_safety_index_test.rb +79 -0
  160. data/test/threading/thread_safety_read_write_test.rb +76 -0
  161. data/test/threading/thread_safety_test.rb +133 -0
  162. data/test/unit/analysis/tc_analyzer.rb +548 -0
  163. data/test/unit/analysis/tc_token_stream.rb +646 -0
  164. data/test/unit/index/tc_index.rb +762 -0
  165. data/test/unit/index/tc_index_reader.rb +699 -0
  166. data/test/unit/index/tc_index_writer.rb +437 -0
  167. data/test/unit/index/th_doc.rb +315 -0
  168. data/test/unit/largefile/tc_largefile.rb +46 -0
  169. data/test/unit/query_parser/tc_query_parser.rb +238 -0
  170. data/test/unit/search/tc_filter.rb +135 -0
  171. data/test/unit/search/tc_fuzzy_query.rb +147 -0
  172. data/test/unit/search/tc_index_searcher.rb +61 -0
  173. data/test/unit/search/tc_multi_searcher.rb +128 -0
  174. data/test/unit/search/tc_multiple_search_requests.rb +58 -0
  175. data/test/unit/search/tc_search_and_sort.rb +179 -0
  176. data/test/unit/search/tc_sort.rb +49 -0
  177. data/test/unit/search/tc_sort_field.rb +27 -0
  178. data/test/unit/search/tc_spans.rb +190 -0
  179. data/test/unit/search/tm_searcher.rb +384 -0
  180. data/test/unit/store/tc_fs_store.rb +77 -0
  181. data/test/unit/store/tc_ram_store.rb +35 -0
  182. data/test/unit/store/tm_store.rb +34 -0
  183. data/test/unit/store/tm_store_lock.rb +68 -0
  184. data/test/unit/tc_document.rb +81 -0
  185. data/test/unit/ts_analysis.rb +2 -0
  186. data/test/unit/ts_index.rb +2 -0
  187. data/test/unit/ts_largefile.rb +4 -0
  188. data/test/unit/ts_query_parser.rb +2 -0
  189. data/test/unit/ts_search.rb +2 -0
  190. data/test/unit/ts_store.rb +2 -0
  191. data/test/unit/ts_utils.rb +2 -0
  192. data/test/unit/utils/tc_bit_vector.rb +295 -0
  193. data/test/unit/utils/tc_number_tools.rb +117 -0
  194. data/test/unit/utils/tc_priority_queue.rb +106 -0
  195. metadata +285 -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_ISO_8859_1_create_env(void);
9
+ extern void french_ISO_8859_1_close_env(struct SN_env * z);
10
+
11
+ extern int french_ISO_8859_1_stem(struct SN_env * z);
12
+
13
+ #ifdef __cplusplus
14
+ }
15
+ #endif
16
+
@@ -0,0 +1,512 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "header.h"
5
+
6
+ extern int german_ISO_8859_1_stem(struct SN_env * z);
7
+ static int r_standard_suffix(struct SN_env * z);
8
+ static int r_R2(struct SN_env * z);
9
+ static int r_R1(struct SN_env * z);
10
+ static int r_mark_regions(struct SN_env * z);
11
+ static int r_postlude(struct SN_env * z);
12
+ static int r_prelude(struct SN_env * z);
13
+
14
+ extern struct SN_env * german_ISO_8859_1_create_env(void);
15
+ extern void german_ISO_8859_1_close_env(struct SN_env * z);
16
+
17
+ static symbol s_0_1[1] = { 'U' };
18
+ static symbol s_0_2[1] = { 'Y' };
19
+ static symbol s_0_3[1] = { 0xE4 };
20
+ static symbol s_0_4[1] = { 0xF6 };
21
+ static symbol s_0_5[1] = { 0xFC };
22
+
23
+ static struct among a_0[6] =
24
+ {
25
+ /* 0 */ { 0, 0, -1, 6, 0},
26
+ /* 1 */ { 1, s_0_1, 0, 2, 0},
27
+ /* 2 */ { 1, s_0_2, 0, 1, 0},
28
+ /* 3 */ { 1, s_0_3, 0, 3, 0},
29
+ /* 4 */ { 1, s_0_4, 0, 4, 0},
30
+ /* 5 */ { 1, s_0_5, 0, 5, 0}
31
+ };
32
+
33
+ static symbol s_1_0[1] = { 'e' };
34
+ static symbol s_1_1[2] = { 'e', 'm' };
35
+ static symbol s_1_2[2] = { 'e', 'n' };
36
+ static symbol s_1_3[3] = { 'e', 'r', 'n' };
37
+ static symbol s_1_4[2] = { 'e', 'r' };
38
+ static symbol s_1_5[1] = { 's' };
39
+ static symbol s_1_6[2] = { 'e', 's' };
40
+
41
+ static struct among a_1[7] =
42
+ {
43
+ /* 0 */ { 1, s_1_0, -1, 1, 0},
44
+ /* 1 */ { 2, s_1_1, -1, 1, 0},
45
+ /* 2 */ { 2, s_1_2, -1, 1, 0},
46
+ /* 3 */ { 3, s_1_3, -1, 1, 0},
47
+ /* 4 */ { 2, s_1_4, -1, 1, 0},
48
+ /* 5 */ { 1, s_1_5, -1, 2, 0},
49
+ /* 6 */ { 2, s_1_6, 5, 1, 0}
50
+ };
51
+
52
+ static symbol s_2_0[2] = { 'e', 'n' };
53
+ static symbol s_2_1[2] = { 'e', 'r' };
54
+ static symbol s_2_2[2] = { 's', 't' };
55
+ static symbol s_2_3[3] = { 'e', 's', 't' };
56
+
57
+ static struct among a_2[4] =
58
+ {
59
+ /* 0 */ { 2, s_2_0, -1, 1, 0},
60
+ /* 1 */ { 2, s_2_1, -1, 1, 0},
61
+ /* 2 */ { 2, s_2_2, -1, 2, 0},
62
+ /* 3 */ { 3, s_2_3, 2, 1, 0}
63
+ };
64
+
65
+ static symbol s_3_0[2] = { 'i', 'g' };
66
+ static symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
67
+
68
+ static struct among a_3[2] =
69
+ {
70
+ /* 0 */ { 2, s_3_0, -1, 1, 0},
71
+ /* 1 */ { 4, s_3_1, -1, 1, 0}
72
+ };
73
+
74
+ static symbol s_4_0[3] = { 'e', 'n', 'd' };
75
+ static symbol s_4_1[2] = { 'i', 'g' };
76
+ static symbol s_4_2[3] = { 'u', 'n', 'g' };
77
+ static symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };
78
+ static symbol s_4_4[4] = { 'i', 's', 'c', 'h' };
79
+ static symbol s_4_5[2] = { 'i', 'k' };
80
+ static symbol s_4_6[4] = { 'h', 'e', 'i', 't' };
81
+ static symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
82
+
83
+ static struct among a_4[8] =
84
+ {
85
+ /* 0 */ { 3, s_4_0, -1, 1, 0},
86
+ /* 1 */ { 2, s_4_1, -1, 2, 0},
87
+ /* 2 */ { 3, s_4_2, -1, 1, 0},
88
+ /* 3 */ { 4, s_4_3, -1, 3, 0},
89
+ /* 4 */ { 4, s_4_4, -1, 2, 0},
90
+ /* 5 */ { 2, s_4_5, -1, 2, 0},
91
+ /* 6 */ { 4, s_4_6, -1, 3, 0},
92
+ /* 7 */ { 4, s_4_7, -1, 4, 0}
93
+ };
94
+
95
+ static unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
96
+
97
+ static unsigned char g_s_ending[] = { 117, 30, 5 };
98
+
99
+ static unsigned char g_st_ending[] = { 117, 30, 4 };
100
+
101
+ static symbol s_0[] = { 0xDF };
102
+ static symbol s_1[] = { 's', 's' };
103
+ static symbol s_2[] = { 'u' };
104
+ static symbol s_3[] = { 'U' };
105
+ static symbol s_4[] = { 'y' };
106
+ static symbol s_5[] = { 'Y' };
107
+ static symbol s_6[] = { 'y' };
108
+ static symbol s_7[] = { 'u' };
109
+ static symbol s_8[] = { 'a' };
110
+ static symbol s_9[] = { 'o' };
111
+ static symbol s_10[] = { 'u' };
112
+ static symbol s_11[] = { 'i', 'g' };
113
+ static symbol s_12[] = { 'e' };
114
+ static symbol s_13[] = { 'e' };
115
+ static symbol s_14[] = { 'e', 'r' };
116
+ static symbol s_15[] = { 'e', 'n' };
117
+
118
+ static int r_prelude(struct SN_env * z) {
119
+ { int c_test = z->c; /* test, line 30 */
120
+ while(1) { /* repeat, line 30 */
121
+ int c = z->c;
122
+ { int c = z->c; /* or, line 33 */
123
+ z->bra = z->c; /* [, line 32 */
124
+ if (!(eq_s(z, 1, s_0))) goto lab2;
125
+ z->ket = z->c; /* ], line 32 */
126
+ { int ret;
127
+ ret = slice_from_s(z, 2, s_1); /* <-, line 32 */
128
+ if (ret < 0) return ret;
129
+ }
130
+ goto lab1;
131
+ lab2:
132
+ z->c = c;
133
+ if (z->c >= z->l) goto lab0;
134
+ z->c++; /* next, line 33 */
135
+ }
136
+ lab1:
137
+ continue;
138
+ lab0:
139
+ z->c = c;
140
+ break;
141
+ }
142
+ z->c = c_test;
143
+ }
144
+ while(1) { /* repeat, line 36 */
145
+ int c = z->c;
146
+ while(1) { /* goto, line 36 */
147
+ int c = z->c;
148
+ if (!(in_grouping(z, g_v, 97, 252))) goto lab4;
149
+ z->bra = z->c; /* [, line 37 */
150
+ { int c = z->c; /* or, line 37 */
151
+ if (!(eq_s(z, 1, s_2))) goto lab6;
152
+ z->ket = z->c; /* ], line 37 */
153
+ if (!(in_grouping(z, g_v, 97, 252))) goto lab6;
154
+ { int ret;
155
+ ret = slice_from_s(z, 1, s_3); /* <-, line 37 */
156
+ if (ret < 0) return ret;
157
+ }
158
+ goto lab5;
159
+ lab6:
160
+ z->c = c;
161
+ if (!(eq_s(z, 1, s_4))) goto lab4;
162
+ z->ket = z->c; /* ], line 38 */
163
+ if (!(in_grouping(z, g_v, 97, 252))) goto lab4;
164
+ { int ret;
165
+ ret = slice_from_s(z, 1, s_5); /* <-, line 38 */
166
+ if (ret < 0) return ret;
167
+ }
168
+ }
169
+ lab5:
170
+ z->c = c;
171
+ break;
172
+ lab4:
173
+ z->c = c;
174
+ if (z->c >= z->l) goto lab3;
175
+ z->c++; /* goto, line 36 */
176
+ }
177
+ continue;
178
+ lab3:
179
+ z->c = c;
180
+ break;
181
+ }
182
+ return 1;
183
+ }
184
+
185
+ static int r_mark_regions(struct SN_env * z) {
186
+ z->I[0] = z->l;
187
+ z->I[1] = z->l;
188
+ { int c_test = z->c; /* test, line 47 */
189
+ { int c = z->c + 3;
190
+ if (0 > c || c > z->l) return 0;
191
+ z->c = c; /* hop, line 47 */
192
+ }
193
+ z->I[2] = z->c; /* setmark x, line 47 */
194
+ z->c = c_test;
195
+ }
196
+ while(1) { /* gopast, line 49 */
197
+ if (!(in_grouping(z, g_v, 97, 252))) goto lab0;
198
+ break;
199
+ lab0:
200
+ if (z->c >= z->l) return 0;
201
+ z->c++; /* gopast, line 49 */
202
+ }
203
+ while(1) { /* gopast, line 49 */
204
+ if (!(out_grouping(z, g_v, 97, 252))) goto lab1;
205
+ break;
206
+ lab1:
207
+ if (z->c >= z->l) return 0;
208
+ z->c++; /* gopast, line 49 */
209
+ }
210
+ z->I[0] = z->c; /* setmark p1, line 49 */
211
+ /* try, line 50 */
212
+ if (!(z->I[0] < z->I[2])) goto lab2;
213
+ z->I[0] = z->I[2];
214
+ lab2:
215
+ while(1) { /* gopast, line 51 */
216
+ if (!(in_grouping(z, g_v, 97, 252))) goto lab3;
217
+ break;
218
+ lab3:
219
+ if (z->c >= z->l) return 0;
220
+ z->c++; /* gopast, line 51 */
221
+ }
222
+ while(1) { /* gopast, line 51 */
223
+ if (!(out_grouping(z, g_v, 97, 252))) goto lab4;
224
+ break;
225
+ lab4:
226
+ if (z->c >= z->l) return 0;
227
+ z->c++; /* gopast, line 51 */
228
+ }
229
+ z->I[1] = z->c; /* setmark p2, line 51 */
230
+ return 1;
231
+ }
232
+
233
+ static int r_postlude(struct SN_env * z) {
234
+ int among_var;
235
+ while(1) { /* repeat, line 55 */
236
+ int c = z->c;
237
+ z->bra = z->c; /* [, line 57 */
238
+ among_var = find_among(z, a_0, 6); /* substring, line 57 */
239
+ if (!(among_var)) goto lab0;
240
+ z->ket = z->c; /* ], line 57 */
241
+ switch(among_var) {
242
+ case 0: goto lab0;
243
+ case 1:
244
+ { int ret;
245
+ ret = slice_from_s(z, 1, s_6); /* <-, line 58 */
246
+ if (ret < 0) return ret;
247
+ }
248
+ break;
249
+ case 2:
250
+ { int ret;
251
+ ret = slice_from_s(z, 1, s_7); /* <-, line 59 */
252
+ if (ret < 0) return ret;
253
+ }
254
+ break;
255
+ case 3:
256
+ { int ret;
257
+ ret = slice_from_s(z, 1, s_8); /* <-, line 60 */
258
+ if (ret < 0) return ret;
259
+ }
260
+ break;
261
+ case 4:
262
+ { int ret;
263
+ ret = slice_from_s(z, 1, s_9); /* <-, line 61 */
264
+ if (ret < 0) return ret;
265
+ }
266
+ break;
267
+ case 5:
268
+ { int ret;
269
+ ret = slice_from_s(z, 1, s_10); /* <-, line 62 */
270
+ if (ret < 0) return ret;
271
+ }
272
+ break;
273
+ case 6:
274
+ if (z->c >= z->l) goto lab0;
275
+ z->c++; /* next, line 63 */
276
+ break;
277
+ }
278
+ continue;
279
+ lab0:
280
+ z->c = c;
281
+ break;
282
+ }
283
+ return 1;
284
+ }
285
+
286
+ static int r_R1(struct SN_env * z) {
287
+ if (!(z->I[0] <= z->c)) return 0;
288
+ return 1;
289
+ }
290
+
291
+ static int r_R2(struct SN_env * z) {
292
+ if (!(z->I[1] <= z->c)) return 0;
293
+ return 1;
294
+ }
295
+
296
+ static int r_standard_suffix(struct SN_env * z) {
297
+ int among_var;
298
+ { int m = z->l - z->c; (void) m; /* do, line 74 */
299
+ z->ket = z->c; /* [, line 75 */
300
+ among_var = find_among_b(z, a_1, 7); /* substring, line 75 */
301
+ if (!(among_var)) goto lab0;
302
+ z->bra = z->c; /* ], line 75 */
303
+ { int ret = r_R1(z);
304
+ if (ret == 0) goto lab0; /* call R1, line 75 */
305
+ if (ret < 0) return ret;
306
+ }
307
+ switch(among_var) {
308
+ case 0: goto lab0;
309
+ case 1:
310
+ { int ret;
311
+ ret = slice_del(z); /* delete, line 77 */
312
+ if (ret < 0) return ret;
313
+ }
314
+ break;
315
+ case 2:
316
+ if (!(in_grouping_b(z, g_s_ending, 98, 116))) goto lab0;
317
+ { int ret;
318
+ ret = slice_del(z); /* delete, line 80 */
319
+ if (ret < 0) return ret;
320
+ }
321
+ break;
322
+ }
323
+ lab0:
324
+ z->c = z->l - m;
325
+ }
326
+ { int m = z->l - z->c; (void) m; /* do, line 84 */
327
+ z->ket = z->c; /* [, line 85 */
328
+ among_var = find_among_b(z, a_2, 4); /* substring, line 85 */
329
+ if (!(among_var)) goto lab1;
330
+ z->bra = z->c; /* ], line 85 */
331
+ { int ret = r_R1(z);
332
+ if (ret == 0) goto lab1; /* call R1, line 85 */
333
+ if (ret < 0) return ret;
334
+ }
335
+ switch(among_var) {
336
+ case 0: goto lab1;
337
+ case 1:
338
+ { int ret;
339
+ ret = slice_del(z); /* delete, line 87 */
340
+ if (ret < 0) return ret;
341
+ }
342
+ break;
343
+ case 2:
344
+ if (!(in_grouping_b(z, g_st_ending, 98, 116))) goto lab1;
345
+ { int c = z->c - 3;
346
+ if (z->lb > c || c > z->l) goto lab1;
347
+ z->c = c; /* hop, line 90 */
348
+ }
349
+ { int ret;
350
+ ret = slice_del(z); /* delete, line 90 */
351
+ if (ret < 0) return ret;
352
+ }
353
+ break;
354
+ }
355
+ lab1:
356
+ z->c = z->l - m;
357
+ }
358
+ { int m = z->l - z->c; (void) m; /* do, line 94 */
359
+ z->ket = z->c; /* [, line 95 */
360
+ among_var = find_among_b(z, a_4, 8); /* substring, line 95 */
361
+ if (!(among_var)) goto lab2;
362
+ z->bra = z->c; /* ], line 95 */
363
+ { int ret = r_R2(z);
364
+ if (ret == 0) goto lab2; /* call R2, line 95 */
365
+ if (ret < 0) return ret;
366
+ }
367
+ switch(among_var) {
368
+ case 0: goto lab2;
369
+ case 1:
370
+ { int ret;
371
+ ret = slice_del(z); /* delete, line 97 */
372
+ if (ret < 0) return ret;
373
+ }
374
+ { int m = z->l - z->c; (void) m; /* try, line 98 */
375
+ z->ket = z->c; /* [, line 98 */
376
+ if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m; goto lab3; }
377
+ z->bra = z->c; /* ], line 98 */
378
+ { int m = z->l - z->c; (void) m; /* not, line 98 */
379
+ if (!(eq_s_b(z, 1, s_12))) goto lab4;
380
+ { z->c = z->l - m; goto lab3; }
381
+ lab4:
382
+ z->c = z->l - m;
383
+ }
384
+ { int ret = r_R2(z);
385
+ if (ret == 0) { z->c = z->l - m; goto lab3; } /* call R2, line 98 */
386
+ if (ret < 0) return ret;
387
+ }
388
+ { int ret;
389
+ ret = slice_del(z); /* delete, line 98 */
390
+ if (ret < 0) return ret;
391
+ }
392
+ lab3:
393
+ ;
394
+ }
395
+ break;
396
+ case 2:
397
+ { int m = z->l - z->c; (void) m; /* not, line 101 */
398
+ if (!(eq_s_b(z, 1, s_13))) goto lab5;
399
+ goto lab2;
400
+ lab5:
401
+ z->c = z->l - m;
402
+ }
403
+ { int ret;
404
+ ret = slice_del(z); /* delete, line 101 */
405
+ if (ret < 0) return ret;
406
+ }
407
+ break;
408
+ case 3:
409
+ { int ret;
410
+ ret = slice_del(z); /* delete, line 104 */
411
+ if (ret < 0) return ret;
412
+ }
413
+ { int m = z->l - z->c; (void) m; /* try, line 105 */
414
+ z->ket = z->c; /* [, line 106 */
415
+ { int m = z->l - z->c; (void) m; /* or, line 106 */
416
+ if (!(eq_s_b(z, 2, s_14))) goto lab8;
417
+ goto lab7;
418
+ lab8:
419
+ z->c = z->l - m;
420
+ if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m; goto lab6; }
421
+ }
422
+ lab7:
423
+ z->bra = z->c; /* ], line 106 */
424
+ { int ret = r_R1(z);
425
+ if (ret == 0) { z->c = z->l - m; goto lab6; } /* call R1, line 106 */
426
+ if (ret < 0) return ret;
427
+ }
428
+ { int ret;
429
+ ret = slice_del(z); /* delete, line 106 */
430
+ if (ret < 0) return ret;
431
+ }
432
+ lab6:
433
+ ;
434
+ }
435
+ break;
436
+ case 4:
437
+ { int ret;
438
+ ret = slice_del(z); /* delete, line 110 */
439
+ if (ret < 0) return ret;
440
+ }
441
+ { int m = z->l - z->c; (void) m; /* try, line 111 */
442
+ z->ket = z->c; /* [, line 112 */
443
+ among_var = find_among_b(z, a_3, 2); /* substring, line 112 */
444
+ if (!(among_var)) { z->c = z->l - m; goto lab9; }
445
+ z->bra = z->c; /* ], line 112 */
446
+ { int ret = r_R2(z);
447
+ if (ret == 0) { z->c = z->l - m; goto lab9; } /* call R2, line 112 */
448
+ if (ret < 0) return ret;
449
+ }
450
+ switch(among_var) {
451
+ case 0: { z->c = z->l - m; goto lab9; }
452
+ case 1:
453
+ { int ret;
454
+ ret = slice_del(z); /* delete, line 114 */
455
+ if (ret < 0) return ret;
456
+ }
457
+ break;
458
+ }
459
+ lab9:
460
+ ;
461
+ }
462
+ break;
463
+ }
464
+ lab2:
465
+ z->c = z->l - m;
466
+ }
467
+ return 1;
468
+ }
469
+
470
+ extern int german_ISO_8859_1_stem(struct SN_env * z) {
471
+ { int c = z->c; /* do, line 125 */
472
+ { int ret = r_prelude(z);
473
+ if (ret == 0) goto lab0; /* call prelude, line 125 */
474
+ if (ret < 0) return ret;
475
+ }
476
+ lab0:
477
+ z->c = c;
478
+ }
479
+ { int c = z->c; /* do, line 126 */
480
+ { int ret = r_mark_regions(z);
481
+ if (ret == 0) goto lab1; /* call mark_regions, line 126 */
482
+ if (ret < 0) return ret;
483
+ }
484
+ lab1:
485
+ z->c = c;
486
+ }
487
+ z->lb = z->c; z->c = z->l; /* backwards, line 127 */
488
+
489
+ { int m = z->l - z->c; (void) m; /* do, line 128 */
490
+ { int ret = r_standard_suffix(z);
491
+ if (ret == 0) goto lab2; /* call standard_suffix, line 128 */
492
+ if (ret < 0) return ret;
493
+ }
494
+ lab2:
495
+ z->c = z->l - m;
496
+ }
497
+ z->c = z->lb;
498
+ { int c = z->c; /* do, line 129 */
499
+ { int ret = r_postlude(z);
500
+ if (ret == 0) goto lab3; /* call postlude, line 129 */
501
+ if (ret < 0) return ret;
502
+ }
503
+ lab3:
504
+ z->c = c;
505
+ }
506
+ return 1;
507
+ }
508
+
509
+ extern struct SN_env * german_ISO_8859_1_create_env(void) { return SN_create_env(0, 3, 0); }
510
+
511
+ extern void german_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z); }
512
+