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_UTF_8_create_env(void);
4
+ extern void french_UTF_8_close_env(struct SN_env * z);
5
+
6
+ extern int french_UTF_8_stem(struct SN_env * z);
@@ -0,0 +1,495 @@
1
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
2
+
3
+ #include "stem_header.h"
4
+
5
+ extern int german_UTF_8_stem(struct SN_env * z);
6
+
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_UTF_8_create_env(void);
15
+ extern void german_UTF_8_close_env(struct SN_env * z);
16
+
17
+ static const symbol s_0_1[1] = { 'U' };
18
+ static const symbol s_0_2[1] = { 'Y' };
19
+ static const symbol s_0_3[2] = { 0xC3, 0xA4 };
20
+ static const symbol s_0_4[2] = { 0xC3, 0xB6 };
21
+ static const symbol s_0_5[2] = { 0xC3, 0xBC };
22
+
23
+ static const 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 */ { 2, s_0_3, 0, 3, 0},
29
+ /* 4 */ { 2, s_0_4, 0, 4, 0},
30
+ /* 5 */ { 2, s_0_5, 0, 5, 0}
31
+ };
32
+
33
+ static const symbol s_1_0[1] = { 'e' };
34
+ static const symbol s_1_1[2] = { 'e', 'm' };
35
+ static const symbol s_1_2[2] = { 'e', 'n' };
36
+ static const symbol s_1_3[3] = { 'e', 'r', 'n' };
37
+ static const symbol s_1_4[2] = { 'e', 'r' };
38
+ static const symbol s_1_5[1] = { 's' };
39
+ static const symbol s_1_6[2] = { 'e', 's' };
40
+
41
+ static const 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 const symbol s_2_0[2] = { 'e', 'n' };
53
+ static const symbol s_2_1[2] = { 'e', 'r' };
54
+ static const symbol s_2_2[2] = { 's', 't' };
55
+ static const symbol s_2_3[3] = { 'e', 's', 't' };
56
+
57
+ static const 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 const symbol s_3_0[2] = { 'i', 'g' };
66
+ static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
67
+
68
+ static const 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 const symbol s_4_0[3] = { 'e', 'n', 'd' };
75
+ static const symbol s_4_1[2] = { 'i', 'g' };
76
+ static const symbol s_4_2[3] = { 'u', 'n', 'g' };
77
+ static const symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };
78
+ static const symbol s_4_4[4] = { 'i', 's', 'c', 'h' };
79
+ static const symbol s_4_5[2] = { 'i', 'k' };
80
+ static const symbol s_4_6[4] = { 'h', 'e', 'i', 't' };
81
+ static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
82
+
83
+ static const 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 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 };
96
+
97
+ static const unsigned char g_s_ending[] = { 117, 30, 5 };
98
+
99
+ static const unsigned char g_st_ending[] = { 117, 30, 4 };
100
+
101
+ static const symbol s_0[] = { 0xC3, 0x9F };
102
+ static const symbol s_1[] = { 's', 's' };
103
+ static const symbol s_2[] = { 'u' };
104
+ static const symbol s_3[] = { 'U' };
105
+ static const symbol s_4[] = { 'y' };
106
+ static const symbol s_5[] = { 'Y' };
107
+ static const symbol s_6[] = { 'y' };
108
+ static const symbol s_7[] = { 'u' };
109
+ static const symbol s_8[] = { 'a' };
110
+ static const symbol s_9[] = { 'o' };
111
+ static const symbol s_10[] = { 'u' };
112
+ static const symbol s_11[] = { 'i', 'g' };
113
+ static const symbol s_12[] = { 'e' };
114
+ static const symbol s_13[] = { 'e' };
115
+ static const symbol s_14[] = { 'e', 'r' };
116
+ static const 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 c1 = z->c;
122
+ { int c2 = z->c; /* or, line 33 */
123
+ z->bra = z->c; /* [, line 32 */
124
+ if (!(eq_s(z, 2, s_0))) goto lab2;
125
+ z->ket = z->c; /* ], line 32 */
126
+ { int ret = slice_from_s(z, 2, s_1); /* <-, line 32 */
127
+ if (ret < 0) return ret;
128
+ }
129
+ goto lab1;
130
+ lab2:
131
+ z->c = c2;
132
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
133
+ if (ret < 0) goto lab0;
134
+ z->c = ret; /* next, line 33 */
135
+ }
136
+ }
137
+ lab1:
138
+ continue;
139
+ lab0:
140
+ z->c = c1;
141
+ break;
142
+ }
143
+ z->c = c_test;
144
+ }
145
+ while(1) { /* repeat, line 36 */
146
+ int c3 = z->c;
147
+ while(1) { /* goto, line 36 */
148
+ int c4 = z->c;
149
+ if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
150
+ z->bra = z->c; /* [, line 37 */
151
+ { int c5 = z->c; /* or, line 37 */
152
+ if (!(eq_s(z, 1, s_2))) goto lab6;
153
+ z->ket = z->c; /* ], line 37 */
154
+ if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab6;
155
+ { int 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 = c5;
161
+ if (!(eq_s(z, 1, s_4))) goto lab4;
162
+ z->ket = z->c; /* ], line 38 */
163
+ if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
164
+ { int ret = slice_from_s(z, 1, s_5); /* <-, line 38 */
165
+ if (ret < 0) return ret;
166
+ }
167
+ }
168
+ lab5:
169
+ z->c = c4;
170
+ break;
171
+ lab4:
172
+ z->c = c4;
173
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
174
+ if (ret < 0) goto lab3;
175
+ z->c = ret; /* goto, line 36 */
176
+ }
177
+ }
178
+ continue;
179
+ lab3:
180
+ z->c = c3;
181
+ break;
182
+ }
183
+ return 1;
184
+ }
185
+
186
+ static int r_mark_regions(struct SN_env * z) {
187
+ z->I[0] = z->l;
188
+ z->I[1] = z->l;
189
+ { int c_test = z->c; /* test, line 47 */
190
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
191
+ if (ret < 0) return 0;
192
+ z->c = ret; /* hop, line 47 */
193
+ }
194
+ z->I[2] = z->c; /* setmark x, line 47 */
195
+ z->c = c_test;
196
+ }
197
+ { /* gopast */ /* grouping v, line 49 */
198
+ int ret = out_grouping_U(z, g_v, 97, 252, 1);
199
+ if (ret < 0) return 0;
200
+ z->c += ret;
201
+ }
202
+ { /* gopast */ /* non v, line 49 */
203
+ int ret = in_grouping_U(z, g_v, 97, 252, 1);
204
+ if (ret < 0) return 0;
205
+ z->c += ret;
206
+ }
207
+ z->I[0] = z->c; /* setmark p1, line 49 */
208
+ /* try, line 50 */
209
+ if (!(z->I[0] < z->I[2])) goto lab0;
210
+ z->I[0] = z->I[2];
211
+ lab0:
212
+ { /* gopast */ /* grouping v, line 51 */
213
+ int ret = out_grouping_U(z, g_v, 97, 252, 1);
214
+ if (ret < 0) return 0;
215
+ z->c += ret;
216
+ }
217
+ { /* gopast */ /* non v, line 51 */
218
+ int ret = in_grouping_U(z, g_v, 97, 252, 1);
219
+ if (ret < 0) return 0;
220
+ z->c += ret;
221
+ }
222
+ z->I[1] = z->c; /* setmark p2, line 51 */
223
+ return 1;
224
+ }
225
+
226
+ static int r_postlude(struct SN_env * z) {
227
+ int among_var;
228
+ while(1) { /* repeat, line 55 */
229
+ int c1 = z->c;
230
+ z->bra = z->c; /* [, line 57 */
231
+ among_var = find_among(z, a_0, 6); /* substring, line 57 */
232
+ if (!(among_var)) goto lab0;
233
+ z->ket = z->c; /* ], line 57 */
234
+ switch(among_var) {
235
+ case 0: goto lab0;
236
+ case 1:
237
+ { int ret = slice_from_s(z, 1, s_6); /* <-, line 58 */
238
+ if (ret < 0) return ret;
239
+ }
240
+ break;
241
+ case 2:
242
+ { int ret = slice_from_s(z, 1, s_7); /* <-, line 59 */
243
+ if (ret < 0) return ret;
244
+ }
245
+ break;
246
+ case 3:
247
+ { int ret = slice_from_s(z, 1, s_8); /* <-, line 60 */
248
+ if (ret < 0) return ret;
249
+ }
250
+ break;
251
+ case 4:
252
+ { int ret = slice_from_s(z, 1, s_9); /* <-, line 61 */
253
+ if (ret < 0) return ret;
254
+ }
255
+ break;
256
+ case 5:
257
+ { int ret = slice_from_s(z, 1, s_10); /* <-, line 62 */
258
+ if (ret < 0) return ret;
259
+ }
260
+ break;
261
+ case 6:
262
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
263
+ if (ret < 0) goto lab0;
264
+ z->c = ret; /* next, line 63 */
265
+ }
266
+ break;
267
+ }
268
+ continue;
269
+ lab0:
270
+ z->c = c1;
271
+ break;
272
+ }
273
+ return 1;
274
+ }
275
+
276
+ static int r_R1(struct SN_env * z) {
277
+ if (!(z->I[0] <= z->c)) return 0;
278
+ return 1;
279
+ }
280
+
281
+ static int r_R2(struct SN_env * z) {
282
+ if (!(z->I[1] <= z->c)) return 0;
283
+ return 1;
284
+ }
285
+
286
+ static int r_standard_suffix(struct SN_env * z) {
287
+ int among_var;
288
+ { int m1 = z->l - z->c; (void)m1; /* do, line 74 */
289
+ z->ket = z->c; /* [, line 75 */
290
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
291
+ among_var = find_among_b(z, a_1, 7); /* substring, line 75 */
292
+ if (!(among_var)) goto lab0;
293
+ z->bra = z->c; /* ], line 75 */
294
+ { int ret = r_R1(z);
295
+ if (ret == 0) goto lab0; /* call R1, line 75 */
296
+ if (ret < 0) return ret;
297
+ }
298
+ switch(among_var) {
299
+ case 0: goto lab0;
300
+ case 1:
301
+ { int ret = slice_del(z); /* delete, line 77 */
302
+ if (ret < 0) return ret;
303
+ }
304
+ break;
305
+ case 2:
306
+ if (in_grouping_b_U(z, g_s_ending, 98, 116, 0)) goto lab0;
307
+ { int ret = slice_del(z); /* delete, line 80 */
308
+ if (ret < 0) return ret;
309
+ }
310
+ break;
311
+ }
312
+ lab0:
313
+ z->c = z->l - m1;
314
+ }
315
+ { int m2 = z->l - z->c; (void)m2; /* do, line 84 */
316
+ z->ket = z->c; /* [, line 85 */
317
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
318
+ among_var = find_among_b(z, a_2, 4); /* substring, line 85 */
319
+ if (!(among_var)) goto lab1;
320
+ z->bra = z->c; /* ], line 85 */
321
+ { int ret = r_R1(z);
322
+ if (ret == 0) goto lab1; /* call R1, line 85 */
323
+ if (ret < 0) return ret;
324
+ }
325
+ switch(among_var) {
326
+ case 0: goto lab1;
327
+ case 1:
328
+ { int ret = slice_del(z); /* delete, line 87 */
329
+ if (ret < 0) return ret;
330
+ }
331
+ break;
332
+ case 2:
333
+ if (in_grouping_b_U(z, g_st_ending, 98, 116, 0)) goto lab1;
334
+ { int ret = skip_utf8(z->p, z->c, z->lb, z->l, - 3);
335
+ if (ret < 0) goto lab1;
336
+ z->c = ret; /* hop, line 90 */
337
+ }
338
+ { int ret = slice_del(z); /* delete, line 90 */
339
+ if (ret < 0) return ret;
340
+ }
341
+ break;
342
+ }
343
+ lab1:
344
+ z->c = z->l - m2;
345
+ }
346
+ { int m3 = z->l - z->c; (void)m3; /* do, line 94 */
347
+ z->ket = z->c; /* [, line 95 */
348
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
349
+ among_var = find_among_b(z, a_4, 8); /* substring, line 95 */
350
+ if (!(among_var)) goto lab2;
351
+ z->bra = z->c; /* ], line 95 */
352
+ { int ret = r_R2(z);
353
+ if (ret == 0) goto lab2; /* call R2, line 95 */
354
+ if (ret < 0) return ret;
355
+ }
356
+ switch(among_var) {
357
+ case 0: goto lab2;
358
+ case 1:
359
+ { int ret = slice_del(z); /* delete, line 97 */
360
+ if (ret < 0) return ret;
361
+ }
362
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 98 */
363
+ z->ket = z->c; /* [, line 98 */
364
+ if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m_keep; goto lab3; }
365
+ z->bra = z->c; /* ], line 98 */
366
+ { int m4 = z->l - z->c; (void)m4; /* not, line 98 */
367
+ if (!(eq_s_b(z, 1, s_12))) goto lab4;
368
+ { z->c = z->l - m_keep; goto lab3; }
369
+ lab4:
370
+ z->c = z->l - m4;
371
+ }
372
+ { int ret = r_R2(z);
373
+ if (ret == 0) { z->c = z->l - m_keep; goto lab3; } /* call R2, line 98 */
374
+ if (ret < 0) return ret;
375
+ }
376
+ { int ret = slice_del(z); /* delete, line 98 */
377
+ if (ret < 0) return ret;
378
+ }
379
+ lab3:
380
+ ;
381
+ }
382
+ break;
383
+ case 2:
384
+ { int m5 = z->l - z->c; (void)m5; /* not, line 101 */
385
+ if (!(eq_s_b(z, 1, s_13))) goto lab5;
386
+ goto lab2;
387
+ lab5:
388
+ z->c = z->l - m5;
389
+ }
390
+ { int ret = slice_del(z); /* delete, line 101 */
391
+ if (ret < 0) return ret;
392
+ }
393
+ break;
394
+ case 3:
395
+ { int ret = slice_del(z); /* delete, line 104 */
396
+ if (ret < 0) return ret;
397
+ }
398
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 105 */
399
+ z->ket = z->c; /* [, line 106 */
400
+ { int m6 = z->l - z->c; (void)m6; /* or, line 106 */
401
+ if (!(eq_s_b(z, 2, s_14))) goto lab8;
402
+ goto lab7;
403
+ lab8:
404
+ z->c = z->l - m6;
405
+ if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m_keep; goto lab6; }
406
+ }
407
+ lab7:
408
+ z->bra = z->c; /* ], line 106 */
409
+ { int ret = r_R1(z);
410
+ if (ret == 0) { z->c = z->l - m_keep; goto lab6; } /* call R1, line 106 */
411
+ if (ret < 0) return ret;
412
+ }
413
+ { int ret = slice_del(z); /* delete, line 106 */
414
+ if (ret < 0) return ret;
415
+ }
416
+ lab6:
417
+ ;
418
+ }
419
+ break;
420
+ case 4:
421
+ { int ret = slice_del(z); /* delete, line 110 */
422
+ if (ret < 0) return ret;
423
+ }
424
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
425
+ z->ket = z->c; /* [, line 112 */
426
+ 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; }
427
+ among_var = find_among_b(z, a_3, 2); /* substring, line 112 */
428
+ if (!(among_var)) { z->c = z->l - m_keep; goto lab9; }
429
+ z->bra = z->c; /* ], line 112 */
430
+ { int ret = r_R2(z);
431
+ if (ret == 0) { z->c = z->l - m_keep; goto lab9; } /* call R2, line 112 */
432
+ if (ret < 0) return ret;
433
+ }
434
+ switch(among_var) {
435
+ case 0: { z->c = z->l - m_keep; goto lab9; }
436
+ case 1:
437
+ { int ret = slice_del(z); /* delete, line 114 */
438
+ if (ret < 0) return ret;
439
+ }
440
+ break;
441
+ }
442
+ lab9:
443
+ ;
444
+ }
445
+ break;
446
+ }
447
+ lab2:
448
+ z->c = z->l - m3;
449
+ }
450
+ return 1;
451
+ }
452
+
453
+ extern int german_UTF_8_stem(struct SN_env * z) {
454
+ { int c1 = z->c; /* do, line 125 */
455
+ { int ret = r_prelude(z);
456
+ if (ret == 0) goto lab0; /* call prelude, line 125 */
457
+ if (ret < 0) return ret;
458
+ }
459
+ lab0:
460
+ z->c = c1;
461
+ }
462
+ { int c2 = z->c; /* do, line 126 */
463
+ { int ret = r_mark_regions(z);
464
+ if (ret == 0) goto lab1; /* call mark_regions, line 126 */
465
+ if (ret < 0) return ret;
466
+ }
467
+ lab1:
468
+ z->c = c2;
469
+ }
470
+ z->lb = z->c; z->c = z->l; /* backwards, line 127 */
471
+
472
+ { int m3 = z->l - z->c; (void)m3; /* do, line 128 */
473
+ { int ret = r_standard_suffix(z);
474
+ if (ret == 0) goto lab2; /* call standard_suffix, line 128 */
475
+ if (ret < 0) return ret;
476
+ }
477
+ lab2:
478
+ z->c = z->l - m3;
479
+ }
480
+ z->c = z->lb;
481
+ { int c4 = z->c; /* do, line 129 */
482
+ { int ret = r_postlude(z);
483
+ if (ret == 0) goto lab3; /* call postlude, line 129 */
484
+ if (ret < 0) return ret;
485
+ }
486
+ lab3:
487
+ z->c = c4;
488
+ }
489
+ return 1;
490
+ }
491
+
492
+ extern struct SN_env * german_UTF_8_create_env(void) { return SN_create_env(0, 3, 0); }
493
+
494
+ extern void german_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
495
+
@@ -0,0 +1,6 @@
1
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
2
+
3
+ extern struct SN_env * german_UTF_8_create_env(void);
4
+ extern void german_UTF_8_close_env(struct SN_env * z);
5
+
6
+ extern int german_UTF_8_stem(struct SN_env * z);