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,610 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "stem_header.h"
5
+
6
+ extern int dutch_ISO_8859_1_stem(struct SN_env * z);
7
+ static int r_standard_suffix(struct SN_env * z);
8
+ static int r_undouble(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_en_ending(struct SN_env * z);
13
+ static int r_e_ending(struct SN_env * z);
14
+ static int r_postlude(struct SN_env * z);
15
+ static int r_prelude(struct SN_env * z);
16
+
17
+ extern struct SN_env * dutch_ISO_8859_1_create_env(void);
18
+ extern void dutch_ISO_8859_1_close_env(struct SN_env * z);
19
+
20
+ static const symbol s_0_1[1] = { 0xE1 };
21
+ static const symbol s_0_2[1] = { 0xE4 };
22
+ static const symbol s_0_3[1] = { 0xE9 };
23
+ static const symbol s_0_4[1] = { 0xEB };
24
+ static const symbol s_0_5[1] = { 0xED };
25
+ static const symbol s_0_6[1] = { 0xEF };
26
+ static const symbol s_0_7[1] = { 0xF3 };
27
+ static const symbol s_0_8[1] = { 0xF6 };
28
+ static const symbol s_0_9[1] = { 0xFA };
29
+ static const symbol s_0_10[1] = { 0xFC };
30
+
31
+ static const struct among a_0[11] =
32
+ {
33
+ /* 0 */ { 0, 0, -1, 6, 0},
34
+ /* 1 */ { 1, s_0_1, 0, 1, 0},
35
+ /* 2 */ { 1, s_0_2, 0, 1, 0},
36
+ /* 3 */ { 1, s_0_3, 0, 2, 0},
37
+ /* 4 */ { 1, s_0_4, 0, 2, 0},
38
+ /* 5 */ { 1, s_0_5, 0, 3, 0},
39
+ /* 6 */ { 1, s_0_6, 0, 3, 0},
40
+ /* 7 */ { 1, s_0_7, 0, 4, 0},
41
+ /* 8 */ { 1, s_0_8, 0, 4, 0},
42
+ /* 9 */ { 1, s_0_9, 0, 5, 0},
43
+ /* 10 */ { 1, s_0_10, 0, 5, 0}
44
+ };
45
+
46
+ static const symbol s_1_1[1] = { 'I' };
47
+ static const symbol s_1_2[1] = { 'Y' };
48
+
49
+ static const struct among a_1[3] =
50
+ {
51
+ /* 0 */ { 0, 0, -1, 3, 0},
52
+ /* 1 */ { 1, s_1_1, 0, 2, 0},
53
+ /* 2 */ { 1, s_1_2, 0, 1, 0}
54
+ };
55
+
56
+ static const symbol s_2_0[2] = { 'd', 'd' };
57
+ static const symbol s_2_1[2] = { 'k', 'k' };
58
+ static const symbol s_2_2[2] = { 't', 't' };
59
+
60
+ static const struct among a_2[3] =
61
+ {
62
+ /* 0 */ { 2, s_2_0, -1, -1, 0},
63
+ /* 1 */ { 2, s_2_1, -1, -1, 0},
64
+ /* 2 */ { 2, s_2_2, -1, -1, 0}
65
+ };
66
+
67
+ static const symbol s_3_0[3] = { 'e', 'n', 'e' };
68
+ static const symbol s_3_1[2] = { 's', 'e' };
69
+ static const symbol s_3_2[2] = { 'e', 'n' };
70
+ static const symbol s_3_3[5] = { 'h', 'e', 'd', 'e', 'n' };
71
+ static const symbol s_3_4[1] = { 's' };
72
+
73
+ static const struct among a_3[5] =
74
+ {
75
+ /* 0 */ { 3, s_3_0, -1, 2, 0},
76
+ /* 1 */ { 2, s_3_1, -1, 3, 0},
77
+ /* 2 */ { 2, s_3_2, -1, 2, 0},
78
+ /* 3 */ { 5, s_3_3, 2, 1, 0},
79
+ /* 4 */ { 1, s_3_4, -1, 3, 0}
80
+ };
81
+
82
+ static const symbol s_4_0[3] = { 'e', 'n', 'd' };
83
+ static const symbol s_4_1[2] = { 'i', 'g' };
84
+ static const symbol s_4_2[3] = { 'i', 'n', 'g' };
85
+ static const symbol s_4_3[4] = { 'l', 'i', 'j', 'k' };
86
+ static const symbol s_4_4[4] = { 'b', 'a', 'a', 'r' };
87
+ static const symbol s_4_5[3] = { 'b', 'a', 'r' };
88
+
89
+ static const struct among a_4[6] =
90
+ {
91
+ /* 0 */ { 3, s_4_0, -1, 1, 0},
92
+ /* 1 */ { 2, s_4_1, -1, 2, 0},
93
+ /* 2 */ { 3, s_4_2, -1, 1, 0},
94
+ /* 3 */ { 4, s_4_3, -1, 3, 0},
95
+ /* 4 */ { 4, s_4_4, -1, 4, 0},
96
+ /* 5 */ { 3, s_4_5, -1, 5, 0}
97
+ };
98
+
99
+ static const symbol s_5_0[2] = { 'a', 'a' };
100
+ static const symbol s_5_1[2] = { 'e', 'e' };
101
+ static const symbol s_5_2[2] = { 'o', 'o' };
102
+ static const symbol s_5_3[2] = { 'u', 'u' };
103
+
104
+ static const struct among a_5[4] =
105
+ {
106
+ /* 0 */ { 2, s_5_0, -1, -1, 0},
107
+ /* 1 */ { 2, s_5_1, -1, -1, 0},
108
+ /* 2 */ { 2, s_5_2, -1, -1, 0},
109
+ /* 3 */ { 2, s_5_3, -1, -1, 0}
110
+ };
111
+
112
+ static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
113
+
114
+ static const unsigned char g_v_I[] = { 1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
115
+
116
+ static const unsigned char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
117
+
118
+ static const symbol s_0[] = { 'a' };
119
+ static const symbol s_1[] = { 'e' };
120
+ static const symbol s_2[] = { 'i' };
121
+ static const symbol s_3[] = { 'o' };
122
+ static const symbol s_4[] = { 'u' };
123
+ static const symbol s_5[] = { 'y' };
124
+ static const symbol s_6[] = { 'Y' };
125
+ static const symbol s_7[] = { 'i' };
126
+ static const symbol s_8[] = { 'I' };
127
+ static const symbol s_9[] = { 'y' };
128
+ static const symbol s_10[] = { 'Y' };
129
+ static const symbol s_11[] = { 'y' };
130
+ static const symbol s_12[] = { 'i' };
131
+ static const symbol s_13[] = { 'e' };
132
+ static const symbol s_14[] = { 'g', 'e', 'm' };
133
+ static const symbol s_15[] = { 'h', 'e', 'i', 'd' };
134
+ static const symbol s_16[] = { 'h', 'e', 'i', 'd' };
135
+ static const symbol s_17[] = { 'c' };
136
+ static const symbol s_18[] = { 'e', 'n' };
137
+ static const symbol s_19[] = { 'i', 'g' };
138
+ static const symbol s_20[] = { 'e' };
139
+ static const symbol s_21[] = { 'e' };
140
+
141
+ static int r_prelude(struct SN_env * z) {
142
+ int among_var;
143
+ { int c_test = z->c; /* test, line 42 */
144
+ while(1) { /* repeat, line 42 */
145
+ int c1 = z->c;
146
+ z->bra = z->c; /* [, line 43 */
147
+ if (z->c >= z->l || z->p[z->c + 0] >> 5 != 7 || !((340306450 >> (z->p[z->c + 0] & 0x1f)) & 1)) among_var = 6; else
148
+ among_var = find_among(z, a_0, 11); /* substring, line 43 */
149
+ if (!(among_var)) goto lab0;
150
+ z->ket = z->c; /* ], line 43 */
151
+ switch(among_var) {
152
+ case 0: goto lab0;
153
+ case 1:
154
+ { int ret = slice_from_s(z, 1, s_0); /* <-, line 45 */
155
+ if (ret < 0) return ret;
156
+ }
157
+ break;
158
+ case 2:
159
+ { int ret = slice_from_s(z, 1, s_1); /* <-, line 47 */
160
+ if (ret < 0) return ret;
161
+ }
162
+ break;
163
+ case 3:
164
+ { int ret = slice_from_s(z, 1, s_2); /* <-, line 49 */
165
+ if (ret < 0) return ret;
166
+ }
167
+ break;
168
+ case 4:
169
+ { int ret = slice_from_s(z, 1, s_3); /* <-, line 51 */
170
+ if (ret < 0) return ret;
171
+ }
172
+ break;
173
+ case 5:
174
+ { int ret = slice_from_s(z, 1, s_4); /* <-, line 53 */
175
+ if (ret < 0) return ret;
176
+ }
177
+ break;
178
+ case 6:
179
+ if (z->c >= z->l) goto lab0;
180
+ z->c++; /* next, line 54 */
181
+ break;
182
+ }
183
+ continue;
184
+ lab0:
185
+ z->c = c1;
186
+ break;
187
+ }
188
+ z->c = c_test;
189
+ }
190
+ { int c_keep = z->c; /* try, line 57 */
191
+ z->bra = z->c; /* [, line 57 */
192
+ if (!(eq_s(z, 1, s_5))) { z->c = c_keep; goto lab1; }
193
+ z->ket = z->c; /* ], line 57 */
194
+ { int ret = slice_from_s(z, 1, s_6); /* <-, line 57 */
195
+ if (ret < 0) return ret;
196
+ }
197
+ lab1:
198
+ ;
199
+ }
200
+ while(1) { /* repeat, line 58 */
201
+ int c2 = z->c;
202
+ while(1) { /* goto, line 58 */
203
+ int c3 = z->c;
204
+ if (in_grouping(z, g_v, 97, 232, 0)) goto lab3;
205
+ z->bra = z->c; /* [, line 59 */
206
+ { int c4 = z->c; /* or, line 59 */
207
+ if (!(eq_s(z, 1, s_7))) goto lab5;
208
+ z->ket = z->c; /* ], line 59 */
209
+ if (in_grouping(z, g_v, 97, 232, 0)) goto lab5;
210
+ { int ret = slice_from_s(z, 1, s_8); /* <-, line 59 */
211
+ if (ret < 0) return ret;
212
+ }
213
+ goto lab4;
214
+ lab5:
215
+ z->c = c4;
216
+ if (!(eq_s(z, 1, s_9))) goto lab3;
217
+ z->ket = z->c; /* ], line 60 */
218
+ { int ret = slice_from_s(z, 1, s_10); /* <-, line 60 */
219
+ if (ret < 0) return ret;
220
+ }
221
+ }
222
+ lab4:
223
+ z->c = c3;
224
+ break;
225
+ lab3:
226
+ z->c = c3;
227
+ if (z->c >= z->l) goto lab2;
228
+ z->c++; /* goto, line 58 */
229
+ }
230
+ continue;
231
+ lab2:
232
+ z->c = c2;
233
+ break;
234
+ }
235
+ return 1;
236
+ }
237
+
238
+ static int r_mark_regions(struct SN_env * z) {
239
+ z->I[0] = z->l;
240
+ z->I[1] = z->l;
241
+ { /* gopast */ /* grouping v, line 69 */
242
+ int ret = out_grouping(z, g_v, 97, 232, 1);
243
+ if (ret < 0) return 0;
244
+ z->c += ret;
245
+ }
246
+ { /* gopast */ /* non v, line 69 */
247
+ int ret = in_grouping(z, g_v, 97, 232, 1);
248
+ if (ret < 0) return 0;
249
+ z->c += ret;
250
+ }
251
+ z->I[0] = z->c; /* setmark p1, line 69 */
252
+ /* try, line 70 */
253
+ if (!(z->I[0] < 3)) goto lab0;
254
+ z->I[0] = 3;
255
+ lab0:
256
+ { /* gopast */ /* grouping v, line 71 */
257
+ int ret = out_grouping(z, g_v, 97, 232, 1);
258
+ if (ret < 0) return 0;
259
+ z->c += ret;
260
+ }
261
+ { /* gopast */ /* non v, line 71 */
262
+ int ret = in_grouping(z, g_v, 97, 232, 1);
263
+ if (ret < 0) return 0;
264
+ z->c += ret;
265
+ }
266
+ z->I[1] = z->c; /* setmark p2, line 71 */
267
+ return 1;
268
+ }
269
+
270
+ static int r_postlude(struct SN_env * z) {
271
+ int among_var;
272
+ while(1) { /* repeat, line 75 */
273
+ int c1 = z->c;
274
+ z->bra = z->c; /* [, line 77 */
275
+ if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
276
+ among_var = find_among(z, a_1, 3); /* substring, line 77 */
277
+ if (!(among_var)) goto lab0;
278
+ z->ket = z->c; /* ], line 77 */
279
+ switch(among_var) {
280
+ case 0: goto lab0;
281
+ case 1:
282
+ { int ret = slice_from_s(z, 1, s_11); /* <-, line 78 */
283
+ if (ret < 0) return ret;
284
+ }
285
+ break;
286
+ case 2:
287
+ { int ret = slice_from_s(z, 1, s_12); /* <-, line 79 */
288
+ if (ret < 0) return ret;
289
+ }
290
+ break;
291
+ case 3:
292
+ if (z->c >= z->l) goto lab0;
293
+ z->c++; /* next, line 80 */
294
+ break;
295
+ }
296
+ continue;
297
+ lab0:
298
+ z->c = c1;
299
+ break;
300
+ }
301
+ return 1;
302
+ }
303
+
304
+ static int r_R1(struct SN_env * z) {
305
+ if (!(z->I[0] <= z->c)) return 0;
306
+ return 1;
307
+ }
308
+
309
+ static int r_R2(struct SN_env * z) {
310
+ if (!(z->I[1] <= z->c)) return 0;
311
+ return 1;
312
+ }
313
+
314
+ static int r_undouble(struct SN_env * z) {
315
+ { int m_test = z->l - z->c; /* test, line 91 */
316
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
317
+ if (!(find_among_b(z, a_2, 3))) return 0; /* among, line 91 */
318
+ z->c = z->l - m_test;
319
+ }
320
+ z->ket = z->c; /* [, line 91 */
321
+ if (z->c <= z->lb) return 0;
322
+ z->c--; /* next, line 91 */
323
+ z->bra = z->c; /* ], line 91 */
324
+ { int ret = slice_del(z); /* delete, line 91 */
325
+ if (ret < 0) return ret;
326
+ }
327
+ return 1;
328
+ }
329
+
330
+ static int r_e_ending(struct SN_env * z) {
331
+ z->B[0] = 0; /* unset e_found, line 95 */
332
+ z->ket = z->c; /* [, line 96 */
333
+ if (!(eq_s_b(z, 1, s_13))) return 0;
334
+ z->bra = z->c; /* ], line 96 */
335
+ { int ret = r_R1(z);
336
+ if (ret == 0) return 0; /* call R1, line 96 */
337
+ if (ret < 0) return ret;
338
+ }
339
+ { int m_test = z->l - z->c; /* test, line 96 */
340
+ if (out_grouping_b(z, g_v, 97, 232, 0)) return 0;
341
+ z->c = z->l - m_test;
342
+ }
343
+ { int ret = slice_del(z); /* delete, line 96 */
344
+ if (ret < 0) return ret;
345
+ }
346
+ z->B[0] = 1; /* set e_found, line 97 */
347
+ { int ret = r_undouble(z);
348
+ if (ret == 0) return 0; /* call undouble, line 98 */
349
+ if (ret < 0) return ret;
350
+ }
351
+ return 1;
352
+ }
353
+
354
+ static int r_en_ending(struct SN_env * z) {
355
+ { int ret = r_R1(z);
356
+ if (ret == 0) return 0; /* call R1, line 102 */
357
+ if (ret < 0) return ret;
358
+ }
359
+ { int m1 = z->l - z->c; (void)m1; /* and, line 102 */
360
+ if (out_grouping_b(z, g_v, 97, 232, 0)) return 0;
361
+ z->c = z->l - m1;
362
+ { int m2 = z->l - z->c; (void)m2; /* not, line 102 */
363
+ if (!(eq_s_b(z, 3, s_14))) goto lab0;
364
+ return 0;
365
+ lab0:
366
+ z->c = z->l - m2;
367
+ }
368
+ }
369
+ { int ret = slice_del(z); /* delete, line 102 */
370
+ if (ret < 0) return ret;
371
+ }
372
+ { int ret = r_undouble(z);
373
+ if (ret == 0) return 0; /* call undouble, line 103 */
374
+ if (ret < 0) return ret;
375
+ }
376
+ return 1;
377
+ }
378
+
379
+ static int r_standard_suffix(struct SN_env * z) {
380
+ int among_var;
381
+ { int m1 = z->l - z->c; (void)m1; /* do, line 107 */
382
+ z->ket = z->c; /* [, line 108 */
383
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
384
+ among_var = find_among_b(z, a_3, 5); /* substring, line 108 */
385
+ if (!(among_var)) goto lab0;
386
+ z->bra = z->c; /* ], line 108 */
387
+ switch(among_var) {
388
+ case 0: goto lab0;
389
+ case 1:
390
+ { int ret = r_R1(z);
391
+ if (ret == 0) goto lab0; /* call R1, line 110 */
392
+ if (ret < 0) return ret;
393
+ }
394
+ { int ret = slice_from_s(z, 4, s_15); /* <-, line 110 */
395
+ if (ret < 0) return ret;
396
+ }
397
+ break;
398
+ case 2:
399
+ { int ret = r_en_ending(z);
400
+ if (ret == 0) goto lab0; /* call en_ending, line 113 */
401
+ if (ret < 0) return ret;
402
+ }
403
+ break;
404
+ case 3:
405
+ { int ret = r_R1(z);
406
+ if (ret == 0) goto lab0; /* call R1, line 116 */
407
+ if (ret < 0) return ret;
408
+ }
409
+ if (out_grouping_b(z, g_v_j, 97, 232, 0)) goto lab0;
410
+ { int ret = slice_del(z); /* delete, line 116 */
411
+ if (ret < 0) return ret;
412
+ }
413
+ break;
414
+ }
415
+ lab0:
416
+ z->c = z->l - m1;
417
+ }
418
+ { int m2 = z->l - z->c; (void)m2; /* do, line 120 */
419
+ { int ret = r_e_ending(z);
420
+ if (ret == 0) goto lab1; /* call e_ending, line 120 */
421
+ if (ret < 0) return ret;
422
+ }
423
+ lab1:
424
+ z->c = z->l - m2;
425
+ }
426
+ { int m3 = z->l - z->c; (void)m3; /* do, line 122 */
427
+ z->ket = z->c; /* [, line 122 */
428
+ if (!(eq_s_b(z, 4, s_16))) goto lab2;
429
+ z->bra = z->c; /* ], line 122 */
430
+ { int ret = r_R2(z);
431
+ if (ret == 0) goto lab2; /* call R2, line 122 */
432
+ if (ret < 0) return ret;
433
+ }
434
+ { int m4 = z->l - z->c; (void)m4; /* not, line 122 */
435
+ if (!(eq_s_b(z, 1, s_17))) goto lab3;
436
+ goto lab2;
437
+ lab3:
438
+ z->c = z->l - m4;
439
+ }
440
+ { int ret = slice_del(z); /* delete, line 122 */
441
+ if (ret < 0) return ret;
442
+ }
443
+ z->ket = z->c; /* [, line 123 */
444
+ if (!(eq_s_b(z, 2, s_18))) goto lab2;
445
+ z->bra = z->c; /* ], line 123 */
446
+ { int ret = r_en_ending(z);
447
+ if (ret == 0) goto lab2; /* call en_ending, line 123 */
448
+ if (ret < 0) return ret;
449
+ }
450
+ lab2:
451
+ z->c = z->l - m3;
452
+ }
453
+ { int m5 = z->l - z->c; (void)m5; /* do, line 126 */
454
+ z->ket = z->c; /* [, line 127 */
455
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
456
+ among_var = find_among_b(z, a_4, 6); /* substring, line 127 */
457
+ if (!(among_var)) goto lab4;
458
+ z->bra = z->c; /* ], line 127 */
459
+ switch(among_var) {
460
+ case 0: goto lab4;
461
+ case 1:
462
+ { int ret = r_R2(z);
463
+ if (ret == 0) goto lab4; /* call R2, line 129 */
464
+ if (ret < 0) return ret;
465
+ }
466
+ { int ret = slice_del(z); /* delete, line 129 */
467
+ if (ret < 0) return ret;
468
+ }
469
+ { int m6 = z->l - z->c; (void)m6; /* or, line 130 */
470
+ z->ket = z->c; /* [, line 130 */
471
+ if (!(eq_s_b(z, 2, s_19))) goto lab6;
472
+ z->bra = z->c; /* ], line 130 */
473
+ { int ret = r_R2(z);
474
+ if (ret == 0) goto lab6; /* call R2, line 130 */
475
+ if (ret < 0) return ret;
476
+ }
477
+ { int m7 = z->l - z->c; (void)m7; /* not, line 130 */
478
+ if (!(eq_s_b(z, 1, s_20))) goto lab7;
479
+ goto lab6;
480
+ lab7:
481
+ z->c = z->l - m7;
482
+ }
483
+ { int ret = slice_del(z); /* delete, line 130 */
484
+ if (ret < 0) return ret;
485
+ }
486
+ goto lab5;
487
+ lab6:
488
+ z->c = z->l - m6;
489
+ { int ret = r_undouble(z);
490
+ if (ret == 0) goto lab4; /* call undouble, line 130 */
491
+ if (ret < 0) return ret;
492
+ }
493
+ }
494
+ lab5:
495
+ break;
496
+ case 2:
497
+ { int ret = r_R2(z);
498
+ if (ret == 0) goto lab4; /* call R2, line 133 */
499
+ if (ret < 0) return ret;
500
+ }
501
+ { int m8 = z->l - z->c; (void)m8; /* not, line 133 */
502
+ if (!(eq_s_b(z, 1, s_21))) goto lab8;
503
+ goto lab4;
504
+ lab8:
505
+ z->c = z->l - m8;
506
+ }
507
+ { int ret = slice_del(z); /* delete, line 133 */
508
+ if (ret < 0) return ret;
509
+ }
510
+ break;
511
+ case 3:
512
+ { int ret = r_R2(z);
513
+ if (ret == 0) goto lab4; /* call R2, line 136 */
514
+ if (ret < 0) return ret;
515
+ }
516
+ { int ret = slice_del(z); /* delete, line 136 */
517
+ if (ret < 0) return ret;
518
+ }
519
+ { int ret = r_e_ending(z);
520
+ if (ret == 0) goto lab4; /* call e_ending, line 136 */
521
+ if (ret < 0) return ret;
522
+ }
523
+ break;
524
+ case 4:
525
+ { int ret = r_R2(z);
526
+ if (ret == 0) goto lab4; /* call R2, line 139 */
527
+ if (ret < 0) return ret;
528
+ }
529
+ { int ret = slice_del(z); /* delete, line 139 */
530
+ if (ret < 0) return ret;
531
+ }
532
+ break;
533
+ case 5:
534
+ { int ret = r_R2(z);
535
+ if (ret == 0) goto lab4; /* call R2, line 142 */
536
+ if (ret < 0) return ret;
537
+ }
538
+ if (!(z->B[0])) goto lab4; /* Boolean test e_found, line 142 */
539
+ { int ret = slice_del(z); /* delete, line 142 */
540
+ if (ret < 0) return ret;
541
+ }
542
+ break;
543
+ }
544
+ lab4:
545
+ z->c = z->l - m5;
546
+ }
547
+ { int m9 = z->l - z->c; (void)m9; /* do, line 146 */
548
+ if (out_grouping_b(z, g_v_I, 73, 232, 0)) goto lab9;
549
+ { int m_test = z->l - z->c; /* test, line 148 */
550
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab9;
551
+ if (!(find_among_b(z, a_5, 4))) goto lab9; /* among, line 149 */
552
+ if (out_grouping_b(z, g_v, 97, 232, 0)) goto lab9;
553
+ z->c = z->l - m_test;
554
+ }
555
+ z->ket = z->c; /* [, line 152 */
556
+ if (z->c <= z->lb) goto lab9;
557
+ z->c--; /* next, line 152 */
558
+ z->bra = z->c; /* ], line 152 */
559
+ { int ret = slice_del(z); /* delete, line 152 */
560
+ if (ret < 0) return ret;
561
+ }
562
+ lab9:
563
+ z->c = z->l - m9;
564
+ }
565
+ return 1;
566
+ }
567
+
568
+ extern int dutch_ISO_8859_1_stem(struct SN_env * z) {
569
+ { int c1 = z->c; /* do, line 159 */
570
+ { int ret = r_prelude(z);
571
+ if (ret == 0) goto lab0; /* call prelude, line 159 */
572
+ if (ret < 0) return ret;
573
+ }
574
+ lab0:
575
+ z->c = c1;
576
+ }
577
+ { int c2 = z->c; /* do, line 160 */
578
+ { int ret = r_mark_regions(z);
579
+ if (ret == 0) goto lab1; /* call mark_regions, line 160 */
580
+ if (ret < 0) return ret;
581
+ }
582
+ lab1:
583
+ z->c = c2;
584
+ }
585
+ z->lb = z->c; z->c = z->l; /* backwards, line 161 */
586
+
587
+ { int m3 = z->l - z->c; (void)m3; /* do, line 162 */
588
+ { int ret = r_standard_suffix(z);
589
+ if (ret == 0) goto lab2; /* call standard_suffix, line 162 */
590
+ if (ret < 0) return ret;
591
+ }
592
+ lab2:
593
+ z->c = z->l - m3;
594
+ }
595
+ z->c = z->lb;
596
+ { int c4 = z->c; /* do, line 163 */
597
+ { int ret = r_postlude(z);
598
+ if (ret == 0) goto lab3; /* call postlude, line 163 */
599
+ if (ret < 0) return ret;
600
+ }
601
+ lab3:
602
+ z->c = c4;
603
+ }
604
+ return 1;
605
+ }
606
+
607
+ extern struct SN_env * dutch_ISO_8859_1_create_env(void) { return SN_create_env(0, 2, 1); }
608
+
609
+ extern void dutch_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
610
+
@@ -0,0 +1,6 @@
1
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
2
+
3
+ extern struct SN_env * dutch_ISO_8859_1_create_env(void);
4
+ extern void dutch_ISO_8859_1_close_env(struct SN_env * z);
5
+
6
+ extern int dutch_ISO_8859_1_stem(struct SN_env * z);