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,620 @@
1
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
2
+
3
+ #include "stem_header.h"
4
+
5
+ extern int dutch_UTF_8_stem(struct SN_env * z);
6
+
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_UTF_8_create_env(void);
18
+ extern void dutch_UTF_8_close_env(struct SN_env * z);
19
+
20
+ static const symbol s_0_1[2] = { 0xC3, 0xA1 };
21
+ static const symbol s_0_2[2] = { 0xC3, 0xA4 };
22
+ static const symbol s_0_3[2] = { 0xC3, 0xA9 };
23
+ static const symbol s_0_4[2] = { 0xC3, 0xAB };
24
+ static const symbol s_0_5[2] = { 0xC3, 0xAD };
25
+ static const symbol s_0_6[2] = { 0xC3, 0xAF };
26
+ static const symbol s_0_7[2] = { 0xC3, 0xB3 };
27
+ static const symbol s_0_8[2] = { 0xC3, 0xB6 };
28
+ static const symbol s_0_9[2] = { 0xC3, 0xBA };
29
+ static const symbol s_0_10[2] = { 0xC3, 0xBC };
30
+
31
+ static const struct among a_0[11] =
32
+ {
33
+ /* 0 */ { 0, 0, -1, 6, 0},
34
+ /* 1 */ { 2, s_0_1, 0, 1, 0},
35
+ /* 2 */ { 2, s_0_2, 0, 1, 0},
36
+ /* 3 */ { 2, s_0_3, 0, 2, 0},
37
+ /* 4 */ { 2, s_0_4, 0, 2, 0},
38
+ /* 5 */ { 2, s_0_5, 0, 3, 0},
39
+ /* 6 */ { 2, s_0_6, 0, 3, 0},
40
+ /* 7 */ { 2, s_0_7, 0, 4, 0},
41
+ /* 8 */ { 2, s_0_8, 0, 4, 0},
42
+ /* 9 */ { 2, s_0_9, 0, 5, 0},
43
+ /* 10 */ { 2, 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 + 1 >= z->l || z->p[z->c + 1] >> 5 != 5 || !((340306450 >> (z->p[z->c + 1] & 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
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
180
+ if (ret < 0) goto lab0;
181
+ z->c = ret; /* next, line 54 */
182
+ }
183
+ break;
184
+ }
185
+ continue;
186
+ lab0:
187
+ z->c = c1;
188
+ break;
189
+ }
190
+ z->c = c_test;
191
+ }
192
+ { int c_keep = z->c; /* try, line 57 */
193
+ z->bra = z->c; /* [, line 57 */
194
+ if (!(eq_s(z, 1, s_5))) { z->c = c_keep; goto lab1; }
195
+ z->ket = z->c; /* ], line 57 */
196
+ { int ret = slice_from_s(z, 1, s_6); /* <-, line 57 */
197
+ if (ret < 0) return ret;
198
+ }
199
+ lab1:
200
+ ;
201
+ }
202
+ while(1) { /* repeat, line 58 */
203
+ int c2 = z->c;
204
+ while(1) { /* goto, line 58 */
205
+ int c3 = z->c;
206
+ if (in_grouping_U(z, g_v, 97, 232, 0)) goto lab3;
207
+ z->bra = z->c; /* [, line 59 */
208
+ { int c4 = z->c; /* or, line 59 */
209
+ if (!(eq_s(z, 1, s_7))) goto lab5;
210
+ z->ket = z->c; /* ], line 59 */
211
+ if (in_grouping_U(z, g_v, 97, 232, 0)) goto lab5;
212
+ { int ret = slice_from_s(z, 1, s_8); /* <-, line 59 */
213
+ if (ret < 0) return ret;
214
+ }
215
+ goto lab4;
216
+ lab5:
217
+ z->c = c4;
218
+ if (!(eq_s(z, 1, s_9))) goto lab3;
219
+ z->ket = z->c; /* ], line 60 */
220
+ { int ret = slice_from_s(z, 1, s_10); /* <-, line 60 */
221
+ if (ret < 0) return ret;
222
+ }
223
+ }
224
+ lab4:
225
+ z->c = c3;
226
+ break;
227
+ lab3:
228
+ z->c = c3;
229
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
230
+ if (ret < 0) goto lab2;
231
+ z->c = ret; /* goto, line 58 */
232
+ }
233
+ }
234
+ continue;
235
+ lab2:
236
+ z->c = c2;
237
+ break;
238
+ }
239
+ return 1;
240
+ }
241
+
242
+ static int r_mark_regions(struct SN_env * z) {
243
+ z->I[0] = z->l;
244
+ z->I[1] = z->l;
245
+ { /* gopast */ /* grouping v, line 69 */
246
+ int ret = out_grouping_U(z, g_v, 97, 232, 1);
247
+ if (ret < 0) return 0;
248
+ z->c += ret;
249
+ }
250
+ { /* gopast */ /* non v, line 69 */
251
+ int ret = in_grouping_U(z, g_v, 97, 232, 1);
252
+ if (ret < 0) return 0;
253
+ z->c += ret;
254
+ }
255
+ z->I[0] = z->c; /* setmark p1, line 69 */
256
+ /* try, line 70 */
257
+ if (!(z->I[0] < 3)) goto lab0;
258
+ z->I[0] = 3;
259
+ lab0:
260
+ { /* gopast */ /* grouping v, line 71 */
261
+ int ret = out_grouping_U(z, g_v, 97, 232, 1);
262
+ if (ret < 0) return 0;
263
+ z->c += ret;
264
+ }
265
+ { /* gopast */ /* non v, line 71 */
266
+ int ret = in_grouping_U(z, g_v, 97, 232, 1);
267
+ if (ret < 0) return 0;
268
+ z->c += ret;
269
+ }
270
+ z->I[1] = z->c; /* setmark p2, line 71 */
271
+ return 1;
272
+ }
273
+
274
+ static int r_postlude(struct SN_env * z) {
275
+ int among_var;
276
+ while(1) { /* repeat, line 75 */
277
+ int c1 = z->c;
278
+ z->bra = z->c; /* [, line 77 */
279
+ if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
280
+ among_var = find_among(z, a_1, 3); /* substring, line 77 */
281
+ if (!(among_var)) goto lab0;
282
+ z->ket = z->c; /* ], line 77 */
283
+ switch(among_var) {
284
+ case 0: goto lab0;
285
+ case 1:
286
+ { int ret = slice_from_s(z, 1, s_11); /* <-, line 78 */
287
+ if (ret < 0) return ret;
288
+ }
289
+ break;
290
+ case 2:
291
+ { int ret = slice_from_s(z, 1, s_12); /* <-, line 79 */
292
+ if (ret < 0) return ret;
293
+ }
294
+ break;
295
+ case 3:
296
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
297
+ if (ret < 0) goto lab0;
298
+ z->c = ret; /* next, line 80 */
299
+ }
300
+ break;
301
+ }
302
+ continue;
303
+ lab0:
304
+ z->c = c1;
305
+ break;
306
+ }
307
+ return 1;
308
+ }
309
+
310
+ static int r_R1(struct SN_env * z) {
311
+ if (!(z->I[0] <= z->c)) return 0;
312
+ return 1;
313
+ }
314
+
315
+ static int r_R2(struct SN_env * z) {
316
+ if (!(z->I[1] <= z->c)) return 0;
317
+ return 1;
318
+ }
319
+
320
+ static int r_undouble(struct SN_env * z) {
321
+ { int m_test = z->l - z->c; /* test, line 91 */
322
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
323
+ if (!(find_among_b(z, a_2, 3))) return 0; /* among, line 91 */
324
+ z->c = z->l - m_test;
325
+ }
326
+ z->ket = z->c; /* [, line 91 */
327
+ { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
328
+ if (ret < 0) return 0;
329
+ z->c = ret; /* next, line 91 */
330
+ }
331
+ z->bra = z->c; /* ], line 91 */
332
+ { int ret = slice_del(z); /* delete, line 91 */
333
+ if (ret < 0) return ret;
334
+ }
335
+ return 1;
336
+ }
337
+
338
+ static int r_e_ending(struct SN_env * z) {
339
+ z->B[0] = 0; /* unset e_found, line 95 */
340
+ z->ket = z->c; /* [, line 96 */
341
+ if (!(eq_s_b(z, 1, s_13))) return 0;
342
+ z->bra = z->c; /* ], line 96 */
343
+ { int ret = r_R1(z);
344
+ if (ret == 0) return 0; /* call R1, line 96 */
345
+ if (ret < 0) return ret;
346
+ }
347
+ { int m_test = z->l - z->c; /* test, line 96 */
348
+ if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
349
+ z->c = z->l - m_test;
350
+ }
351
+ { int ret = slice_del(z); /* delete, line 96 */
352
+ if (ret < 0) return ret;
353
+ }
354
+ z->B[0] = 1; /* set e_found, line 97 */
355
+ { int ret = r_undouble(z);
356
+ if (ret == 0) return 0; /* call undouble, line 98 */
357
+ if (ret < 0) return ret;
358
+ }
359
+ return 1;
360
+ }
361
+
362
+ static int r_en_ending(struct SN_env * z) {
363
+ { int ret = r_R1(z);
364
+ if (ret == 0) return 0; /* call R1, line 102 */
365
+ if (ret < 0) return ret;
366
+ }
367
+ { int m1 = z->l - z->c; (void)m1; /* and, line 102 */
368
+ if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
369
+ z->c = z->l - m1;
370
+ { int m2 = z->l - z->c; (void)m2; /* not, line 102 */
371
+ if (!(eq_s_b(z, 3, s_14))) goto lab0;
372
+ return 0;
373
+ lab0:
374
+ z->c = z->l - m2;
375
+ }
376
+ }
377
+ { int ret = slice_del(z); /* delete, line 102 */
378
+ if (ret < 0) return ret;
379
+ }
380
+ { int ret = r_undouble(z);
381
+ if (ret == 0) return 0; /* call undouble, line 103 */
382
+ if (ret < 0) return ret;
383
+ }
384
+ return 1;
385
+ }
386
+
387
+ static int r_standard_suffix(struct SN_env * z) {
388
+ int among_var;
389
+ { int m1 = z->l - z->c; (void)m1; /* do, line 107 */
390
+ z->ket = z->c; /* [, line 108 */
391
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
392
+ among_var = find_among_b(z, a_3, 5); /* substring, line 108 */
393
+ if (!(among_var)) goto lab0;
394
+ z->bra = z->c; /* ], line 108 */
395
+ switch(among_var) {
396
+ case 0: goto lab0;
397
+ case 1:
398
+ { int ret = r_R1(z);
399
+ if (ret == 0) goto lab0; /* call R1, line 110 */
400
+ if (ret < 0) return ret;
401
+ }
402
+ { int ret = slice_from_s(z, 4, s_15); /* <-, line 110 */
403
+ if (ret < 0) return ret;
404
+ }
405
+ break;
406
+ case 2:
407
+ { int ret = r_en_ending(z);
408
+ if (ret == 0) goto lab0; /* call en_ending, line 113 */
409
+ if (ret < 0) return ret;
410
+ }
411
+ break;
412
+ case 3:
413
+ { int ret = r_R1(z);
414
+ if (ret == 0) goto lab0; /* call R1, line 116 */
415
+ if (ret < 0) return ret;
416
+ }
417
+ if (out_grouping_b_U(z, g_v_j, 97, 232, 0)) goto lab0;
418
+ { int ret = slice_del(z); /* delete, line 116 */
419
+ if (ret < 0) return ret;
420
+ }
421
+ break;
422
+ }
423
+ lab0:
424
+ z->c = z->l - m1;
425
+ }
426
+ { int m2 = z->l - z->c; (void)m2; /* do, line 120 */
427
+ { int ret = r_e_ending(z);
428
+ if (ret == 0) goto lab1; /* call e_ending, line 120 */
429
+ if (ret < 0) return ret;
430
+ }
431
+ lab1:
432
+ z->c = z->l - m2;
433
+ }
434
+ { int m3 = z->l - z->c; (void)m3; /* do, line 122 */
435
+ z->ket = z->c; /* [, line 122 */
436
+ if (!(eq_s_b(z, 4, s_16))) goto lab2;
437
+ z->bra = z->c; /* ], line 122 */
438
+ { int ret = r_R2(z);
439
+ if (ret == 0) goto lab2; /* call R2, line 122 */
440
+ if (ret < 0) return ret;
441
+ }
442
+ { int m4 = z->l - z->c; (void)m4; /* not, line 122 */
443
+ if (!(eq_s_b(z, 1, s_17))) goto lab3;
444
+ goto lab2;
445
+ lab3:
446
+ z->c = z->l - m4;
447
+ }
448
+ { int ret = slice_del(z); /* delete, line 122 */
449
+ if (ret < 0) return ret;
450
+ }
451
+ z->ket = z->c; /* [, line 123 */
452
+ if (!(eq_s_b(z, 2, s_18))) goto lab2;
453
+ z->bra = z->c; /* ], line 123 */
454
+ { int ret = r_en_ending(z);
455
+ if (ret == 0) goto lab2; /* call en_ending, line 123 */
456
+ if (ret < 0) return ret;
457
+ }
458
+ lab2:
459
+ z->c = z->l - m3;
460
+ }
461
+ { int m5 = z->l - z->c; (void)m5; /* do, line 126 */
462
+ z->ket = z->c; /* [, line 127 */
463
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
464
+ among_var = find_among_b(z, a_4, 6); /* substring, line 127 */
465
+ if (!(among_var)) goto lab4;
466
+ z->bra = z->c; /* ], line 127 */
467
+ switch(among_var) {
468
+ case 0: goto lab4;
469
+ case 1:
470
+ { int ret = r_R2(z);
471
+ if (ret == 0) goto lab4; /* call R2, line 129 */
472
+ if (ret < 0) return ret;
473
+ }
474
+ { int ret = slice_del(z); /* delete, line 129 */
475
+ if (ret < 0) return ret;
476
+ }
477
+ { int m6 = z->l - z->c; (void)m6; /* or, line 130 */
478
+ z->ket = z->c; /* [, line 130 */
479
+ if (!(eq_s_b(z, 2, s_19))) goto lab6;
480
+ z->bra = z->c; /* ], line 130 */
481
+ { int ret = r_R2(z);
482
+ if (ret == 0) goto lab6; /* call R2, line 130 */
483
+ if (ret < 0) return ret;
484
+ }
485
+ { int m7 = z->l - z->c; (void)m7; /* not, line 130 */
486
+ if (!(eq_s_b(z, 1, s_20))) goto lab7;
487
+ goto lab6;
488
+ lab7:
489
+ z->c = z->l - m7;
490
+ }
491
+ { int ret = slice_del(z); /* delete, line 130 */
492
+ if (ret < 0) return ret;
493
+ }
494
+ goto lab5;
495
+ lab6:
496
+ z->c = z->l - m6;
497
+ { int ret = r_undouble(z);
498
+ if (ret == 0) goto lab4; /* call undouble, line 130 */
499
+ if (ret < 0) return ret;
500
+ }
501
+ }
502
+ lab5:
503
+ break;
504
+ case 2:
505
+ { int ret = r_R2(z);
506
+ if (ret == 0) goto lab4; /* call R2, line 133 */
507
+ if (ret < 0) return ret;
508
+ }
509
+ { int m8 = z->l - z->c; (void)m8; /* not, line 133 */
510
+ if (!(eq_s_b(z, 1, s_21))) goto lab8;
511
+ goto lab4;
512
+ lab8:
513
+ z->c = z->l - m8;
514
+ }
515
+ { int ret = slice_del(z); /* delete, line 133 */
516
+ if (ret < 0) return ret;
517
+ }
518
+ break;
519
+ case 3:
520
+ { int ret = r_R2(z);
521
+ if (ret == 0) goto lab4; /* call R2, line 136 */
522
+ if (ret < 0) return ret;
523
+ }
524
+ { int ret = slice_del(z); /* delete, line 136 */
525
+ if (ret < 0) return ret;
526
+ }
527
+ { int ret = r_e_ending(z);
528
+ if (ret == 0) goto lab4; /* call e_ending, line 136 */
529
+ if (ret < 0) return ret;
530
+ }
531
+ break;
532
+ case 4:
533
+ { int ret = r_R2(z);
534
+ if (ret == 0) goto lab4; /* call R2, line 139 */
535
+ if (ret < 0) return ret;
536
+ }
537
+ { int ret = slice_del(z); /* delete, line 139 */
538
+ if (ret < 0) return ret;
539
+ }
540
+ break;
541
+ case 5:
542
+ { int ret = r_R2(z);
543
+ if (ret == 0) goto lab4; /* call R2, line 142 */
544
+ if (ret < 0) return ret;
545
+ }
546
+ if (!(z->B[0])) goto lab4; /* Boolean test e_found, line 142 */
547
+ { int ret = slice_del(z); /* delete, line 142 */
548
+ if (ret < 0) return ret;
549
+ }
550
+ break;
551
+ }
552
+ lab4:
553
+ z->c = z->l - m5;
554
+ }
555
+ { int m9 = z->l - z->c; (void)m9; /* do, line 146 */
556
+ if (out_grouping_b_U(z, g_v_I, 73, 232, 0)) goto lab9;
557
+ { int m_test = z->l - z->c; /* test, line 148 */
558
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab9;
559
+ if (!(find_among_b(z, a_5, 4))) goto lab9; /* among, line 149 */
560
+ if (out_grouping_b_U(z, g_v, 97, 232, 0)) goto lab9;
561
+ z->c = z->l - m_test;
562
+ }
563
+ z->ket = z->c; /* [, line 152 */
564
+ { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
565
+ if (ret < 0) goto lab9;
566
+ z->c = ret; /* next, line 152 */
567
+ }
568
+ z->bra = z->c; /* ], line 152 */
569
+ { int ret = slice_del(z); /* delete, line 152 */
570
+ if (ret < 0) return ret;
571
+ }
572
+ lab9:
573
+ z->c = z->l - m9;
574
+ }
575
+ return 1;
576
+ }
577
+
578
+ extern int dutch_UTF_8_stem(struct SN_env * z) {
579
+ { int c1 = z->c; /* do, line 159 */
580
+ { int ret = r_prelude(z);
581
+ if (ret == 0) goto lab0; /* call prelude, line 159 */
582
+ if (ret < 0) return ret;
583
+ }
584
+ lab0:
585
+ z->c = c1;
586
+ }
587
+ { int c2 = z->c; /* do, line 160 */
588
+ { int ret = r_mark_regions(z);
589
+ if (ret == 0) goto lab1; /* call mark_regions, line 160 */
590
+ if (ret < 0) return ret;
591
+ }
592
+ lab1:
593
+ z->c = c2;
594
+ }
595
+ z->lb = z->c; z->c = z->l; /* backwards, line 161 */
596
+
597
+ { int m3 = z->l - z->c; (void)m3; /* do, line 162 */
598
+ { int ret = r_standard_suffix(z);
599
+ if (ret == 0) goto lab2; /* call standard_suffix, line 162 */
600
+ if (ret < 0) return ret;
601
+ }
602
+ lab2:
603
+ z->c = z->l - m3;
604
+ }
605
+ z->c = z->lb;
606
+ { int c4 = z->c; /* do, line 163 */
607
+ { int ret = r_postlude(z);
608
+ if (ret == 0) goto lab3; /* call postlude, line 163 */
609
+ if (ret < 0) return ret;
610
+ }
611
+ lab3:
612
+ z->c = c4;
613
+ }
614
+ return 1;
615
+ }
616
+
617
+ extern struct SN_env * dutch_UTF_8_create_env(void) { return SN_create_env(0, 2, 1); }
618
+
619
+ extern void dutch_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
620
+
@@ -0,0 +1,6 @@
1
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
2
+
3
+ extern struct SN_env * dutch_UTF_8_create_env(void);
4
+ extern void dutch_UTF_8_close_env(struct SN_env * z);
5
+
6
+ extern int dutch_UTF_8_stem(struct SN_env * z);