isomorfeus-ferret 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (222) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +612 -0
  3. data/README.md +44 -0
  4. data/ext/isomorfeus_ferret_ext/benchmark.c +223 -0
  5. data/ext/isomorfeus_ferret_ext/benchmark.h +45 -0
  6. data/ext/isomorfeus_ferret_ext/benchmarks_all.h +25 -0
  7. data/ext/isomorfeus_ferret_ext/bm_bitvector.c +123 -0
  8. data/ext/isomorfeus_ferret_ext/bm_hash.c +118 -0
  9. data/ext/isomorfeus_ferret_ext/bm_micro_string.c +40 -0
  10. data/ext/isomorfeus_ferret_ext/bm_store.c +93 -0
  11. data/ext/isomorfeus_ferret_ext/email.rl +21 -0
  12. data/ext/isomorfeus_ferret_ext/extconf.rb +5 -0
  13. data/ext/isomorfeus_ferret_ext/fio_tmpfile.h +53 -0
  14. data/ext/isomorfeus_ferret_ext/frb_analysis.c +2577 -0
  15. data/ext/isomorfeus_ferret_ext/frb_index.c +3457 -0
  16. data/ext/isomorfeus_ferret_ext/frb_lang.c +9 -0
  17. data/ext/isomorfeus_ferret_ext/frb_lang.h +17 -0
  18. data/ext/isomorfeus_ferret_ext/frb_qparser.c +629 -0
  19. data/ext/isomorfeus_ferret_ext/frb_search.c +4460 -0
  20. data/ext/isomorfeus_ferret_ext/frb_store.c +515 -0
  21. data/ext/isomorfeus_ferret_ext/frb_threading.h +30 -0
  22. data/ext/isomorfeus_ferret_ext/frb_utils.c +1127 -0
  23. data/ext/isomorfeus_ferret_ext/frt_analysis.c +1644 -0
  24. data/ext/isomorfeus_ferret_ext/frt_analysis.h +247 -0
  25. data/ext/isomorfeus_ferret_ext/frt_array.c +124 -0
  26. data/ext/isomorfeus_ferret_ext/frt_array.h +54 -0
  27. data/ext/isomorfeus_ferret_ext/frt_bitvector.c +95 -0
  28. data/ext/isomorfeus_ferret_ext/frt_bitvector.h +586 -0
  29. data/ext/isomorfeus_ferret_ext/frt_compound_io.c +374 -0
  30. data/ext/isomorfeus_ferret_ext/frt_config.h +44 -0
  31. data/ext/isomorfeus_ferret_ext/frt_document.c +134 -0
  32. data/ext/isomorfeus_ferret_ext/frt_document.h +52 -0
  33. data/ext/isomorfeus_ferret_ext/frt_except.c +95 -0
  34. data/ext/isomorfeus_ferret_ext/frt_except.h +188 -0
  35. data/ext/isomorfeus_ferret_ext/frt_field_index.c +233 -0
  36. data/ext/isomorfeus_ferret_ext/frt_field_index.h +42 -0
  37. data/ext/isomorfeus_ferret_ext/frt_filter.c +157 -0
  38. data/ext/isomorfeus_ferret_ext/frt_fs_store.c +502 -0
  39. data/ext/isomorfeus_ferret_ext/frt_global.c +427 -0
  40. data/ext/isomorfeus_ferret_ext/frt_global.h +290 -0
  41. data/ext/isomorfeus_ferret_ext/frt_hash.c +518 -0
  42. data/ext/isomorfeus_ferret_ext/frt_hash.h +466 -0
  43. data/ext/isomorfeus_ferret_ext/frt_hashset.c +191 -0
  44. data/ext/isomorfeus_ferret_ext/frt_hashset.h +206 -0
  45. data/ext/isomorfeus_ferret_ext/frt_helper.c +62 -0
  46. data/ext/isomorfeus_ferret_ext/frt_helper.h +13 -0
  47. data/ext/isomorfeus_ferret_ext/frt_ind.c +353 -0
  48. data/ext/isomorfeus_ferret_ext/frt_ind.h +54 -0
  49. data/ext/isomorfeus_ferret_ext/frt_index.c +6377 -0
  50. data/ext/isomorfeus_ferret_ext/frt_index.h +880 -0
  51. data/ext/isomorfeus_ferret_ext/frt_lang.c +104 -0
  52. data/ext/isomorfeus_ferret_ext/frt_lang.h +44 -0
  53. data/ext/isomorfeus_ferret_ext/frt_mempool.c +87 -0
  54. data/ext/isomorfeus_ferret_ext/frt_mempool.h +33 -0
  55. data/ext/isomorfeus_ferret_ext/frt_multimapper.c +349 -0
  56. data/ext/isomorfeus_ferret_ext/frt_multimapper.h +52 -0
  57. data/ext/isomorfeus_ferret_ext/frt_posh.c +1006 -0
  58. data/ext/isomorfeus_ferret_ext/frt_posh.h +973 -0
  59. data/ext/isomorfeus_ferret_ext/frt_priorityqueue.c +147 -0
  60. data/ext/isomorfeus_ferret_ext/frt_priorityqueue.h +147 -0
  61. data/ext/isomorfeus_ferret_ext/frt_q_boolean.c +1612 -0
  62. data/ext/isomorfeus_ferret_ext/frt_q_const_score.c +157 -0
  63. data/ext/isomorfeus_ferret_ext/frt_q_filtered_query.c +209 -0
  64. data/ext/isomorfeus_ferret_ext/frt_q_fuzzy.c +281 -0
  65. data/ext/isomorfeus_ferret_ext/frt_q_match_all.c +147 -0
  66. data/ext/isomorfeus_ferret_ext/frt_q_multi_term.c +672 -0
  67. data/ext/isomorfeus_ferret_ext/frt_q_parser.c +3084 -0
  68. data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +1182 -0
  69. data/ext/isomorfeus_ferret_ext/frt_q_prefix.c +98 -0
  70. data/ext/isomorfeus_ferret_ext/frt_q_range.c +665 -0
  71. data/ext/isomorfeus_ferret_ext/frt_q_span.c +2386 -0
  72. data/ext/isomorfeus_ferret_ext/frt_q_term.c +311 -0
  73. data/ext/isomorfeus_ferret_ext/frt_q_wildcard.c +166 -0
  74. data/ext/isomorfeus_ferret_ext/frt_ram_store.c +460 -0
  75. data/ext/isomorfeus_ferret_ext/frt_scanner.c +899 -0
  76. data/ext/isomorfeus_ferret_ext/frt_scanner.h +28 -0
  77. data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +6705 -0
  78. data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +4419 -0
  79. data/ext/isomorfeus_ferret_ext/frt_search.c +1824 -0
  80. data/ext/isomorfeus_ferret_ext/frt_search.h +924 -0
  81. data/ext/isomorfeus_ferret_ext/frt_similarity.c +150 -0
  82. data/ext/isomorfeus_ferret_ext/frt_similarity.h +79 -0
  83. data/ext/isomorfeus_ferret_ext/frt_sort.c +796 -0
  84. data/ext/isomorfeus_ferret_ext/frt_stopwords.c +395 -0
  85. data/ext/isomorfeus_ferret_ext/frt_store.c +680 -0
  86. data/ext/isomorfeus_ferret_ext/frt_store.h +789 -0
  87. data/ext/isomorfeus_ferret_ext/frt_term_vectors.c +72 -0
  88. data/ext/isomorfeus_ferret_ext/frt_threading.h +23 -0
  89. data/ext/isomorfeus_ferret_ext/frt_win32.h +54 -0
  90. data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.c +409 -0
  91. data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.h +95 -0
  92. data/ext/isomorfeus_ferret_ext/libstemmer.c +93 -0
  93. data/ext/isomorfeus_ferret_ext/libstemmer.h +73 -0
  94. data/ext/isomorfeus_ferret_ext/q_parser.y +1366 -0
  95. data/ext/isomorfeus_ferret_ext/scanner.h +28 -0
  96. data/ext/isomorfeus_ferret_ext/scanner.in +43 -0
  97. data/ext/isomorfeus_ferret_ext/scanner.rl +84 -0
  98. data/ext/isomorfeus_ferret_ext/scanner_mb.rl +200 -0
  99. data/ext/isomorfeus_ferret_ext/scanner_utf8.rl +85 -0
  100. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +324 -0
  101. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +7 -0
  102. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +610 -0
  103. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +6 -0
  104. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +1104 -0
  105. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +6 -0
  106. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +749 -0
  107. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +7 -0
  108. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +1233 -0
  109. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +6 -0
  110. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +490 -0
  111. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +6 -0
  112. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +1217 -0
  113. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.h +7 -0
  114. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +1052 -0
  115. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +6 -0
  116. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +283 -0
  117. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +6 -0
  118. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +735 -0
  119. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +6 -0
  120. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +1003 -0
  121. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +7 -0
  122. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +1079 -0
  123. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +6 -0
  124. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +293 -0
  125. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +6 -0
  126. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +984 -0
  127. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +6 -0
  128. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +686 -0
  129. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +6 -0
  130. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.c +325 -0
  131. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.h +6 -0
  132. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.c +620 -0
  133. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.h +6 -0
  134. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.c +1111 -0
  135. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.h +6 -0
  136. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.c +754 -0
  137. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.h +6 -0
  138. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.c +1242 -0
  139. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.h +6 -0
  140. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.c +495 -0
  141. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.h +6 -0
  142. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.c +1220 -0
  143. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.h +6 -0
  144. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.c +1059 -0
  145. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.h +6 -0
  146. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.c +285 -0
  147. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.h +6 -0
  148. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.c +741 -0
  149. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.h +6 -0
  150. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.c +1009 -0
  151. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.h +6 -0
  152. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.c +990 -0
  153. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.h +6 -0
  154. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.c +680 -0
  155. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.h +6 -0
  156. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.c +1083 -0
  157. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.h +6 -0
  158. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.c +294 -0
  159. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.h +6 -0
  160. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.c +2191 -0
  161. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.h +6 -0
  162. data/ext/isomorfeus_ferret_ext/stem_api.c +66 -0
  163. data/ext/isomorfeus_ferret_ext/stem_api.h +26 -0
  164. data/ext/isomorfeus_ferret_ext/stem_header.h +57 -0
  165. data/ext/isomorfeus_ferret_ext/stem_modules.h +190 -0
  166. data/ext/isomorfeus_ferret_ext/stem_modules.txt +50 -0
  167. data/ext/isomorfeus_ferret_ext/stem_utilities.c +478 -0
  168. data/ext/isomorfeus_ferret_ext/test.c +850 -0
  169. data/ext/isomorfeus_ferret_ext/test.h +416 -0
  170. data/ext/isomorfeus_ferret_ext/test_1710.c +63 -0
  171. data/ext/isomorfeus_ferret_ext/test_analysis.c +1221 -0
  172. data/ext/isomorfeus_ferret_ext/test_array.c +272 -0
  173. data/ext/isomorfeus_ferret_ext/test_bitvector.c +600 -0
  174. data/ext/isomorfeus_ferret_ext/test_compound_io.c +170 -0
  175. data/ext/isomorfeus_ferret_ext/test_document.c +156 -0
  176. data/ext/isomorfeus_ferret_ext/test_except.c +244 -0
  177. data/ext/isomorfeus_ferret_ext/test_fields.c +522 -0
  178. data/ext/isomorfeus_ferret_ext/test_file_deleter.c +185 -0
  179. data/ext/isomorfeus_ferret_ext/test_filter.c +331 -0
  180. data/ext/isomorfeus_ferret_ext/test_fs_store.c +25 -0
  181. data/ext/isomorfeus_ferret_ext/test_global.c +299 -0
  182. data/ext/isomorfeus_ferret_ext/test_hash.c +485 -0
  183. data/ext/isomorfeus_ferret_ext/test_hashset.c +288 -0
  184. data/ext/isomorfeus_ferret_ext/test_helper.c +47 -0
  185. data/ext/isomorfeus_ferret_ext/test_highlighter.c +548 -0
  186. data/ext/isomorfeus_ferret_ext/test_index.c +2323 -0
  187. data/ext/isomorfeus_ferret_ext/test_lang.c +74 -0
  188. data/ext/isomorfeus_ferret_ext/test_mempool.c +102 -0
  189. data/ext/isomorfeus_ferret_ext/test_multimapper.c +64 -0
  190. data/ext/isomorfeus_ferret_ext/test_priorityqueue.c +213 -0
  191. data/ext/isomorfeus_ferret_ext/test_q_const_score.c +84 -0
  192. data/ext/isomorfeus_ferret_ext/test_q_filtered.c +61 -0
  193. data/ext/isomorfeus_ferret_ext/test_q_fuzzy.c +241 -0
  194. data/ext/isomorfeus_ferret_ext/test_q_parser.c +464 -0
  195. data/ext/isomorfeus_ferret_ext/test_q_span.c +575 -0
  196. data/ext/isomorfeus_ferret_ext/test_ram_store.c +77 -0
  197. data/ext/isomorfeus_ferret_ext/test_search.c +1874 -0
  198. data/ext/isomorfeus_ferret_ext/test_segments.c +167 -0
  199. data/ext/isomorfeus_ferret_ext/test_similarity.c +25 -0
  200. data/ext/isomorfeus_ferret_ext/test_sort.c +333 -0
  201. data/ext/isomorfeus_ferret_ext/test_store.c +591 -0
  202. data/ext/isomorfeus_ferret_ext/test_store.h +3 -0
  203. data/ext/isomorfeus_ferret_ext/test_term.c +351 -0
  204. data/ext/isomorfeus_ferret_ext/test_term_vectors.c +373 -0
  205. data/ext/isomorfeus_ferret_ext/test_test.c +83 -0
  206. data/ext/isomorfeus_ferret_ext/test_threading.c +188 -0
  207. data/ext/isomorfeus_ferret_ext/testhelper.c +561 -0
  208. data/ext/isomorfeus_ferret_ext/testhelper.h +25 -0
  209. data/ext/isomorfeus_ferret_ext/tests_all.h +87 -0
  210. data/ext/isomorfeus_ferret_ext/uchar-ucs4.rl +1854 -0
  211. data/ext/isomorfeus_ferret_ext/uchar-utf8.rl +1999 -0
  212. data/ext/isomorfeus_ferret_ext/url.rl +27 -0
  213. data/ext/isomorfeus_ferret_ext/word_list.h +15156 -0
  214. data/lib/isomorfeus/ferret/document.rb +132 -0
  215. data/lib/isomorfeus/ferret/field_symbol.rb +85 -0
  216. data/lib/isomorfeus/ferret/index/field_infos.rb +48 -0
  217. data/lib/isomorfeus/ferret/index/index.rb +970 -0
  218. data/lib/isomorfeus/ferret/monitor.rb +323 -0
  219. data/lib/isomorfeus/ferret/stdlib_patches.rb +151 -0
  220. data/lib/isomorfeus/ferret/version.rb +5 -0
  221. data/lib/isomorfeus-ferret.rb +8 -0
  222. metadata +307 -0
@@ -0,0 +1,6 @@
1
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
2
+
3
+ extern struct SN_env * french_ISO_8859_1_create_env(void);
4
+ extern void french_ISO_8859_1_close_env(struct SN_env * z);
5
+
6
+ extern int french_ISO_8859_1_stem(struct SN_env * z);
@@ -0,0 +1,490 @@
1
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
2
+
3
+ #include "stem_header.h"
4
+
5
+
6
+ extern int german_ISO_8859_1_stem(struct SN_env * z);
7
+
8
+ static int r_standard_suffix(struct SN_env * z);
9
+ static int r_R2(struct SN_env * z);
10
+ static int r_R1(struct SN_env * z);
11
+ static int r_mark_regions(struct SN_env * z);
12
+ static int r_postlude(struct SN_env * z);
13
+ static int r_prelude(struct SN_env * z);
14
+
15
+ extern struct SN_env * german_ISO_8859_1_create_env(void);
16
+ extern void german_ISO_8859_1_close_env(struct SN_env * z);
17
+
18
+ static const symbol s_0_1[1] = { 'U' };
19
+ static const symbol s_0_2[1] = { 'Y' };
20
+ static const symbol s_0_3[1] = { 0xE4 };
21
+ static const symbol s_0_4[1] = { 0xF6 };
22
+ static const symbol s_0_5[1] = { 0xFC };
23
+
24
+ static const struct among a_0[6] =
25
+ {
26
+ /* 0 */ { 0, 0, -1, 6, 0},
27
+ /* 1 */ { 1, s_0_1, 0, 2, 0},
28
+ /* 2 */ { 1, s_0_2, 0, 1, 0},
29
+ /* 3 */ { 1, s_0_3, 0, 3, 0},
30
+ /* 4 */ { 1, s_0_4, 0, 4, 0},
31
+ /* 5 */ { 1, s_0_5, 0, 5, 0}
32
+ };
33
+
34
+ static const symbol s_1_0[1] = { 'e' };
35
+ static const symbol s_1_1[2] = { 'e', 'm' };
36
+ static const symbol s_1_2[2] = { 'e', 'n' };
37
+ static const symbol s_1_3[3] = { 'e', 'r', 'n' };
38
+ static const symbol s_1_4[2] = { 'e', 'r' };
39
+ static const symbol s_1_5[1] = { 's' };
40
+ static const symbol s_1_6[2] = { 'e', 's' };
41
+
42
+ static const struct among a_1[7] =
43
+ {
44
+ /* 0 */ { 1, s_1_0, -1, 1, 0},
45
+ /* 1 */ { 2, s_1_1, -1, 1, 0},
46
+ /* 2 */ { 2, s_1_2, -1, 1, 0},
47
+ /* 3 */ { 3, s_1_3, -1, 1, 0},
48
+ /* 4 */ { 2, s_1_4, -1, 1, 0},
49
+ /* 5 */ { 1, s_1_5, -1, 2, 0},
50
+ /* 6 */ { 2, s_1_6, 5, 1, 0}
51
+ };
52
+
53
+ static const symbol s_2_0[2] = { 'e', 'n' };
54
+ static const symbol s_2_1[2] = { 'e', 'r' };
55
+ static const symbol s_2_2[2] = { 's', 't' };
56
+ static const symbol s_2_3[3] = { 'e', 's', 't' };
57
+
58
+ static const struct among a_2[4] =
59
+ {
60
+ /* 0 */ { 2, s_2_0, -1, 1, 0},
61
+ /* 1 */ { 2, s_2_1, -1, 1, 0},
62
+ /* 2 */ { 2, s_2_2, -1, 2, 0},
63
+ /* 3 */ { 3, s_2_3, 2, 1, 0}
64
+ };
65
+
66
+ static const symbol s_3_0[2] = { 'i', 'g' };
67
+ static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
68
+
69
+ static const struct among a_3[2] =
70
+ {
71
+ /* 0 */ { 2, s_3_0, -1, 1, 0},
72
+ /* 1 */ { 4, s_3_1, -1, 1, 0}
73
+ };
74
+
75
+ static const symbol s_4_0[3] = { 'e', 'n', 'd' };
76
+ static const symbol s_4_1[2] = { 'i', 'g' };
77
+ static const symbol s_4_2[3] = { 'u', 'n', 'g' };
78
+ static const symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };
79
+ static const symbol s_4_4[4] = { 'i', 's', 'c', 'h' };
80
+ static const symbol s_4_5[2] = { 'i', 'k' };
81
+ static const symbol s_4_6[4] = { 'h', 'e', 'i', 't' };
82
+ static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
83
+
84
+ static const struct among a_4[8] =
85
+ {
86
+ /* 0 */ { 3, s_4_0, -1, 1, 0},
87
+ /* 1 */ { 2, s_4_1, -1, 2, 0},
88
+ /* 2 */ { 3, s_4_2, -1, 1, 0},
89
+ /* 3 */ { 4, s_4_3, -1, 3, 0},
90
+ /* 4 */ { 4, s_4_4, -1, 2, 0},
91
+ /* 5 */ { 2, s_4_5, -1, 2, 0},
92
+ /* 6 */ { 4, s_4_6, -1, 3, 0},
93
+ /* 7 */ { 4, s_4_7, -1, 4, 0}
94
+ };
95
+
96
+ 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 };
97
+
98
+ static const unsigned char g_s_ending[] = { 117, 30, 5 };
99
+
100
+ static const unsigned char g_st_ending[] = { 117, 30, 4 };
101
+
102
+ static const symbol s_0[] = { 0xDF };
103
+ static const symbol s_1[] = { 's', 's' };
104
+ static const symbol s_2[] = { 'u' };
105
+ static const symbol s_3[] = { 'U' };
106
+ static const symbol s_4[] = { 'y' };
107
+ static const symbol s_5[] = { 'Y' };
108
+ static const symbol s_6[] = { 'y' };
109
+ static const symbol s_7[] = { 'u' };
110
+ static const symbol s_8[] = { 'a' };
111
+ static const symbol s_9[] = { 'o' };
112
+ static const symbol s_10[] = { 'u' };
113
+ static const symbol s_11[] = { 'i', 'g' };
114
+ static const symbol s_12[] = { 'e' };
115
+ static const symbol s_13[] = { 'e' };
116
+ static const symbol s_14[] = { 'e', 'r' };
117
+ static const symbol s_15[] = { 'e', 'n' };
118
+
119
+ static int r_prelude(struct SN_env * z) {
120
+ { int c_test = z->c; /* test, line 30 */
121
+ while(1) { /* repeat, line 30 */
122
+ int c1 = z->c;
123
+ { int c2 = z->c; /* or, line 33 */
124
+ z->bra = z->c; /* [, line 32 */
125
+ if (!(eq_s(z, 1, s_0))) goto lab2;
126
+ z->ket = z->c; /* ], line 32 */
127
+ { int 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 = c2;
133
+ if (z->c >= z->l) goto lab0;
134
+ z->c++; /* next, line 33 */
135
+ }
136
+ lab1:
137
+ continue;
138
+ lab0:
139
+ z->c = c1;
140
+ break;
141
+ }
142
+ z->c = c_test;
143
+ }
144
+ while(1) { /* repeat, line 36 */
145
+ int c3 = z->c;
146
+ while(1) { /* goto, line 36 */
147
+ int c4 = z->c;
148
+ if (in_grouping(z, g_v, 97, 252, 0)) goto lab4;
149
+ z->bra = z->c; /* [, line 37 */
150
+ { int c5 = 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, 0)) goto lab6;
154
+ { int ret = slice_from_s(z, 1, s_3); /* <-, line 37 */
155
+ if (ret < 0) return ret;
156
+ }
157
+ goto lab5;
158
+ lab6:
159
+ z->c = c5;
160
+ if (!(eq_s(z, 1, s_4))) goto lab4;
161
+ z->ket = z->c; /* ], line 38 */
162
+ if (in_grouping(z, g_v, 97, 252, 0)) goto lab4;
163
+ { int ret = slice_from_s(z, 1, s_5); /* <-, line 38 */
164
+ if (ret < 0) return ret;
165
+ }
166
+ }
167
+ lab5:
168
+ z->c = c4;
169
+ break;
170
+ lab4:
171
+ z->c = c4;
172
+ if (z->c >= z->l) goto lab3;
173
+ z->c++; /* goto, line 36 */
174
+ }
175
+ continue;
176
+ lab3:
177
+ z->c = c3;
178
+ break;
179
+ }
180
+ return 1;
181
+ }
182
+
183
+ static int r_mark_regions(struct SN_env * z) {
184
+ z->I[0] = z->l;
185
+ z->I[1] = z->l;
186
+ { int c_test = z->c; /* test, line 47 */
187
+ { int ret = z->c + 3;
188
+ if (0 > ret || ret > z->l) return 0;
189
+ z->c = ret; /* hop, line 47 */
190
+ }
191
+ z->I[2] = z->c; /* setmark x, line 47 */
192
+ z->c = c_test;
193
+ }
194
+ { /* gopast */ /* grouping v, line 49 */
195
+ int ret = out_grouping(z, g_v, 97, 252, 1);
196
+ if (ret < 0) return 0;
197
+ z->c += ret;
198
+ }
199
+ { /* gopast */ /* non v, line 49 */
200
+ int ret = in_grouping(z, g_v, 97, 252, 1);
201
+ if (ret < 0) return 0;
202
+ z->c += ret;
203
+ }
204
+ z->I[0] = z->c; /* setmark p1, line 49 */
205
+ /* try, line 50 */
206
+ if (!(z->I[0] < z->I[2])) goto lab0;
207
+ z->I[0] = z->I[2];
208
+ lab0:
209
+ { /* gopast */ /* grouping v, line 51 */
210
+ int ret = out_grouping(z, g_v, 97, 252, 1);
211
+ if (ret < 0) return 0;
212
+ z->c += ret;
213
+ }
214
+ { /* gopast */ /* non v, line 51 */
215
+ int ret = in_grouping(z, g_v, 97, 252, 1);
216
+ if (ret < 0) return 0;
217
+ z->c += ret;
218
+ }
219
+ z->I[1] = z->c; /* setmark p2, line 51 */
220
+ return 1;
221
+ }
222
+
223
+ static int r_postlude(struct SN_env * z) {
224
+ int among_var;
225
+ while(1) { /* repeat, line 55 */
226
+ int c1 = z->c;
227
+ z->bra = z->c; /* [, line 57 */
228
+ among_var = find_among(z, a_0, 6); /* substring, line 57 */
229
+ if (!(among_var)) goto lab0;
230
+ z->ket = z->c; /* ], line 57 */
231
+ switch(among_var) {
232
+ case 0: goto lab0;
233
+ case 1:
234
+ { int ret = slice_from_s(z, 1, s_6); /* <-, line 58 */
235
+ if (ret < 0) return ret;
236
+ }
237
+ break;
238
+ case 2:
239
+ { int ret = slice_from_s(z, 1, s_7); /* <-, line 59 */
240
+ if (ret < 0) return ret;
241
+ }
242
+ break;
243
+ case 3:
244
+ { int ret = slice_from_s(z, 1, s_8); /* <-, line 60 */
245
+ if (ret < 0) return ret;
246
+ }
247
+ break;
248
+ case 4:
249
+ { int ret = slice_from_s(z, 1, s_9); /* <-, line 61 */
250
+ if (ret < 0) return ret;
251
+ }
252
+ break;
253
+ case 5:
254
+ { int ret = slice_from_s(z, 1, s_10); /* <-, line 62 */
255
+ if (ret < 0) return ret;
256
+ }
257
+ break;
258
+ case 6:
259
+ if (z->c >= z->l) goto lab0;
260
+ z->c++; /* next, line 63 */
261
+ break;
262
+ }
263
+ continue;
264
+ lab0:
265
+ z->c = c1;
266
+ break;
267
+ }
268
+ return 1;
269
+ }
270
+
271
+ static int r_R1(struct SN_env * z) {
272
+ if (!(z->I[0] <= z->c)) return 0;
273
+ return 1;
274
+ }
275
+
276
+ static int r_R2(struct SN_env * z) {
277
+ if (!(z->I[1] <= z->c)) return 0;
278
+ return 1;
279
+ }
280
+
281
+ static int r_standard_suffix(struct SN_env * z) {
282
+ int among_var;
283
+ { int m1 = z->l - z->c; (void)m1; /* do, line 74 */
284
+ z->ket = z->c; /* [, line 75 */
285
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
286
+ among_var = find_among_b(z, a_1, 7); /* substring, line 75 */
287
+ if (!(among_var)) goto lab0;
288
+ z->bra = z->c; /* ], line 75 */
289
+ { int ret = r_R1(z);
290
+ if (ret == 0) goto lab0; /* call R1, line 75 */
291
+ if (ret < 0) return ret;
292
+ }
293
+ switch(among_var) {
294
+ case 0: goto lab0;
295
+ case 1:
296
+ { int ret = slice_del(z); /* delete, line 77 */
297
+ if (ret < 0) return ret;
298
+ }
299
+ break;
300
+ case 2:
301
+ if (in_grouping_b(z, g_s_ending, 98, 116, 0)) goto lab0;
302
+ { int ret = slice_del(z); /* delete, line 80 */
303
+ if (ret < 0) return ret;
304
+ }
305
+ break;
306
+ }
307
+ lab0:
308
+ z->c = z->l - m1;
309
+ }
310
+ { int m2 = z->l - z->c; (void)m2; /* do, line 84 */
311
+ z->ket = z->c; /* [, line 85 */
312
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
313
+ among_var = find_among_b(z, a_2, 4); /* substring, line 85 */
314
+ if (!(among_var)) goto lab1;
315
+ z->bra = z->c; /* ], line 85 */
316
+ { int ret = r_R1(z);
317
+ if (ret == 0) goto lab1; /* call R1, line 85 */
318
+ if (ret < 0) return ret;
319
+ }
320
+ switch(among_var) {
321
+ case 0: goto lab1;
322
+ case 1:
323
+ { int ret = slice_del(z); /* delete, line 87 */
324
+ if (ret < 0) return ret;
325
+ }
326
+ break;
327
+ case 2:
328
+ if (in_grouping_b(z, g_st_ending, 98, 116, 0)) goto lab1;
329
+ { int ret = z->c - 3;
330
+ if (z->lb > ret || ret > z->l) goto lab1;
331
+ z->c = ret; /* hop, line 90 */
332
+ }
333
+ { int ret = slice_del(z); /* delete, line 90 */
334
+ if (ret < 0) return ret;
335
+ }
336
+ break;
337
+ }
338
+ lab1:
339
+ z->c = z->l - m2;
340
+ }
341
+ { int m3 = z->l - z->c; (void)m3; /* do, line 94 */
342
+ z->ket = z->c; /* [, line 95 */
343
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
344
+ among_var = find_among_b(z, a_4, 8); /* substring, line 95 */
345
+ if (!(among_var)) goto lab2;
346
+ z->bra = z->c; /* ], line 95 */
347
+ { int ret = r_R2(z);
348
+ if (ret == 0) goto lab2; /* call R2, line 95 */
349
+ if (ret < 0) return ret;
350
+ }
351
+ switch(among_var) {
352
+ case 0: goto lab2;
353
+ case 1:
354
+ { int ret = slice_del(z); /* delete, line 97 */
355
+ if (ret < 0) return ret;
356
+ }
357
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 98 */
358
+ z->ket = z->c; /* [, line 98 */
359
+ if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m_keep; goto lab3; }
360
+ z->bra = z->c; /* ], line 98 */
361
+ { int m4 = z->l - z->c; (void)m4; /* not, line 98 */
362
+ if (!(eq_s_b(z, 1, s_12))) goto lab4;
363
+ { z->c = z->l - m_keep; goto lab3; }
364
+ lab4:
365
+ z->c = z->l - m4;
366
+ }
367
+ { int ret = r_R2(z);
368
+ if (ret == 0) { z->c = z->l - m_keep; goto lab3; } /* call R2, line 98 */
369
+ if (ret < 0) return ret;
370
+ }
371
+ { int ret = slice_del(z); /* delete, line 98 */
372
+ if (ret < 0) return ret;
373
+ }
374
+ lab3:
375
+ ;
376
+ }
377
+ break;
378
+ case 2:
379
+ { int m5 = z->l - z->c; (void)m5; /* not, line 101 */
380
+ if (!(eq_s_b(z, 1, s_13))) goto lab5;
381
+ goto lab2;
382
+ lab5:
383
+ z->c = z->l - m5;
384
+ }
385
+ { int ret = slice_del(z); /* delete, line 101 */
386
+ if (ret < 0) return ret;
387
+ }
388
+ break;
389
+ case 3:
390
+ { int ret = slice_del(z); /* delete, line 104 */
391
+ if (ret < 0) return ret;
392
+ }
393
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 105 */
394
+ z->ket = z->c; /* [, line 106 */
395
+ { int m6 = z->l - z->c; (void)m6; /* or, line 106 */
396
+ if (!(eq_s_b(z, 2, s_14))) goto lab8;
397
+ goto lab7;
398
+ lab8:
399
+ z->c = z->l - m6;
400
+ if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m_keep; goto lab6; }
401
+ }
402
+ lab7:
403
+ z->bra = z->c; /* ], line 106 */
404
+ { int ret = r_R1(z);
405
+ if (ret == 0) { z->c = z->l - m_keep; goto lab6; } /* call R1, line 106 */
406
+ if (ret < 0) return ret;
407
+ }
408
+ { int ret = slice_del(z); /* delete, line 106 */
409
+ if (ret < 0) return ret;
410
+ }
411
+ lab6:
412
+ ;
413
+ }
414
+ break;
415
+ case 4:
416
+ { int ret = slice_del(z); /* delete, line 110 */
417
+ if (ret < 0) return ret;
418
+ }
419
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
420
+ z->ket = z->c; /* [, line 112 */
421
+ 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 lab9; }
422
+ among_var = find_among_b(z, a_3, 2); /* substring, line 112 */
423
+ if (!(among_var)) { z->c = z->l - m_keep; goto lab9; }
424
+ z->bra = z->c; /* ], line 112 */
425
+ { int ret = r_R2(z);
426
+ if (ret == 0) { z->c = z->l - m_keep; goto lab9; } /* call R2, line 112 */
427
+ if (ret < 0) return ret;
428
+ }
429
+ switch(among_var) {
430
+ case 0: { z->c = z->l - m_keep; goto lab9; }
431
+ case 1:
432
+ { int ret = slice_del(z); /* delete, line 114 */
433
+ if (ret < 0) return ret;
434
+ }
435
+ break;
436
+ }
437
+ lab9:
438
+ ;
439
+ }
440
+ break;
441
+ }
442
+ lab2:
443
+ z->c = z->l - m3;
444
+ }
445
+ return 1;
446
+ }
447
+
448
+ extern int german_ISO_8859_1_stem(struct SN_env * z) {
449
+ { int c1 = z->c; /* do, line 125 */
450
+ { int ret = r_prelude(z);
451
+ if (ret == 0) goto lab0; /* call prelude, line 125 */
452
+ if (ret < 0) return ret;
453
+ }
454
+ lab0:
455
+ z->c = c1;
456
+ }
457
+ { int c2 = z->c; /* do, line 126 */
458
+ { int ret = r_mark_regions(z);
459
+ if (ret == 0) goto lab1; /* call mark_regions, line 126 */
460
+ if (ret < 0) return ret;
461
+ }
462
+ lab1:
463
+ z->c = c2;
464
+ }
465
+ z->lb = z->c; z->c = z->l; /* backwards, line 127 */
466
+
467
+ { int m3 = z->l - z->c; (void)m3; /* do, line 128 */
468
+ { int ret = r_standard_suffix(z);
469
+ if (ret == 0) goto lab2; /* call standard_suffix, line 128 */
470
+ if (ret < 0) return ret;
471
+ }
472
+ lab2:
473
+ z->c = z->l - m3;
474
+ }
475
+ z->c = z->lb;
476
+ { int c4 = z->c; /* do, line 129 */
477
+ { int ret = r_postlude(z);
478
+ if (ret == 0) goto lab3; /* call postlude, line 129 */
479
+ if (ret < 0) return ret;
480
+ }
481
+ lab3:
482
+ z->c = c4;
483
+ }
484
+ return 1;
485
+ }
486
+
487
+ extern struct SN_env * german_ISO_8859_1_create_env(void) { return SN_create_env(0, 3, 0); }
488
+
489
+ extern void german_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
490
+
@@ -0,0 +1,6 @@
1
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
2
+
3
+ extern struct SN_env * german_ISO_8859_1_create_env(void);
4
+ extern void german_ISO_8859_1_close_env(struct SN_env * z);
5
+
6
+ extern int german_ISO_8859_1_stem(struct SN_env * z);