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 * spanish_ISO_8859_1_create_env(void);
4
+ extern void spanish_ISO_8859_1_close_env(struct SN_env * z);
5
+
6
+ extern int spanish_ISO_8859_1_stem(struct SN_env * z);
@@ -0,0 +1,293 @@
1
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
2
+
3
+ #include "stem_header.h"
4
+
5
+ extern int swedish_ISO_8859_1_stem(struct SN_env * z);
6
+
7
+ static int r_other_suffix(struct SN_env * z);
8
+ static int r_consonant_pair(struct SN_env * z);
9
+ static int r_main_suffix(struct SN_env * z);
10
+ static int r_mark_regions(struct SN_env * z);
11
+
12
+ extern struct SN_env * swedish_ISO_8859_1_create_env(void);
13
+ extern void swedish_ISO_8859_1_close_env(struct SN_env * z);
14
+
15
+ static const symbol s_0_0[1] = { 'a' };
16
+ static const symbol s_0_1[4] = { 'a', 'r', 'n', 'a' };
17
+ static const symbol s_0_2[4] = { 'e', 'r', 'n', 'a' };
18
+ static const symbol s_0_3[7] = { 'h', 'e', 't', 'e', 'r', 'n', 'a' };
19
+ static const symbol s_0_4[4] = { 'o', 'r', 'n', 'a' };
20
+ static const symbol s_0_5[2] = { 'a', 'd' };
21
+ static const symbol s_0_6[1] = { 'e' };
22
+ static const symbol s_0_7[3] = { 'a', 'd', 'e' };
23
+ static const symbol s_0_8[4] = { 'a', 'n', 'd', 'e' };
24
+ static const symbol s_0_9[4] = { 'a', 'r', 'n', 'e' };
25
+ static const symbol s_0_10[3] = { 'a', 'r', 'e' };
26
+ static const symbol s_0_11[4] = { 'a', 's', 't', 'e' };
27
+ static const symbol s_0_12[2] = { 'e', 'n' };
28
+ static const symbol s_0_13[5] = { 'a', 'n', 'd', 'e', 'n' };
29
+ static const symbol s_0_14[4] = { 'a', 'r', 'e', 'n' };
30
+ static const symbol s_0_15[5] = { 'h', 'e', 't', 'e', 'n' };
31
+ static const symbol s_0_16[3] = { 'e', 'r', 'n' };
32
+ static const symbol s_0_17[2] = { 'a', 'r' };
33
+ static const symbol s_0_18[2] = { 'e', 'r' };
34
+ static const symbol s_0_19[5] = { 'h', 'e', 't', 'e', 'r' };
35
+ static const symbol s_0_20[2] = { 'o', 'r' };
36
+ static const symbol s_0_21[1] = { 's' };
37
+ static const symbol s_0_22[2] = { 'a', 's' };
38
+ static const symbol s_0_23[5] = { 'a', 'r', 'n', 'a', 's' };
39
+ static const symbol s_0_24[5] = { 'e', 'r', 'n', 'a', 's' };
40
+ static const symbol s_0_25[5] = { 'o', 'r', 'n', 'a', 's' };
41
+ static const symbol s_0_26[2] = { 'e', 's' };
42
+ static const symbol s_0_27[4] = { 'a', 'd', 'e', 's' };
43
+ static const symbol s_0_28[5] = { 'a', 'n', 'd', 'e', 's' };
44
+ static const symbol s_0_29[3] = { 'e', 'n', 's' };
45
+ static const symbol s_0_30[5] = { 'a', 'r', 'e', 'n', 's' };
46
+ static const symbol s_0_31[6] = { 'h', 'e', 't', 'e', 'n', 's' };
47
+ static const symbol s_0_32[4] = { 'e', 'r', 'n', 's' };
48
+ static const symbol s_0_33[2] = { 'a', 't' };
49
+ static const symbol s_0_34[5] = { 'a', 'n', 'd', 'e', 't' };
50
+ static const symbol s_0_35[3] = { 'h', 'e', 't' };
51
+ static const symbol s_0_36[3] = { 'a', 's', 't' };
52
+
53
+ static const struct among a_0[37] =
54
+ {
55
+ /* 0 */ { 1, s_0_0, -1, 1, 0},
56
+ /* 1 */ { 4, s_0_1, 0, 1, 0},
57
+ /* 2 */ { 4, s_0_2, 0, 1, 0},
58
+ /* 3 */ { 7, s_0_3, 2, 1, 0},
59
+ /* 4 */ { 4, s_0_4, 0, 1, 0},
60
+ /* 5 */ { 2, s_0_5, -1, 1, 0},
61
+ /* 6 */ { 1, s_0_6, -1, 1, 0},
62
+ /* 7 */ { 3, s_0_7, 6, 1, 0},
63
+ /* 8 */ { 4, s_0_8, 6, 1, 0},
64
+ /* 9 */ { 4, s_0_9, 6, 1, 0},
65
+ /* 10 */ { 3, s_0_10, 6, 1, 0},
66
+ /* 11 */ { 4, s_0_11, 6, 1, 0},
67
+ /* 12 */ { 2, s_0_12, -1, 1, 0},
68
+ /* 13 */ { 5, s_0_13, 12, 1, 0},
69
+ /* 14 */ { 4, s_0_14, 12, 1, 0},
70
+ /* 15 */ { 5, s_0_15, 12, 1, 0},
71
+ /* 16 */ { 3, s_0_16, -1, 1, 0},
72
+ /* 17 */ { 2, s_0_17, -1, 1, 0},
73
+ /* 18 */ { 2, s_0_18, -1, 1, 0},
74
+ /* 19 */ { 5, s_0_19, 18, 1, 0},
75
+ /* 20 */ { 2, s_0_20, -1, 1, 0},
76
+ /* 21 */ { 1, s_0_21, -1, 2, 0},
77
+ /* 22 */ { 2, s_0_22, 21, 1, 0},
78
+ /* 23 */ { 5, s_0_23, 22, 1, 0},
79
+ /* 24 */ { 5, s_0_24, 22, 1, 0},
80
+ /* 25 */ { 5, s_0_25, 22, 1, 0},
81
+ /* 26 */ { 2, s_0_26, 21, 1, 0},
82
+ /* 27 */ { 4, s_0_27, 26, 1, 0},
83
+ /* 28 */ { 5, s_0_28, 26, 1, 0},
84
+ /* 29 */ { 3, s_0_29, 21, 1, 0},
85
+ /* 30 */ { 5, s_0_30, 29, 1, 0},
86
+ /* 31 */ { 6, s_0_31, 29, 1, 0},
87
+ /* 32 */ { 4, s_0_32, 21, 1, 0},
88
+ /* 33 */ { 2, s_0_33, -1, 1, 0},
89
+ /* 34 */ { 5, s_0_34, -1, 1, 0},
90
+ /* 35 */ { 3, s_0_35, -1, 1, 0},
91
+ /* 36 */ { 3, s_0_36, -1, 1, 0}
92
+ };
93
+
94
+ static const symbol s_1_0[2] = { 'd', 'd' };
95
+ static const symbol s_1_1[2] = { 'g', 'd' };
96
+ static const symbol s_1_2[2] = { 'n', 'n' };
97
+ static const symbol s_1_3[2] = { 'd', 't' };
98
+ static const symbol s_1_4[2] = { 'g', 't' };
99
+ static const symbol s_1_5[2] = { 'k', 't' };
100
+ static const symbol s_1_6[2] = { 't', 't' };
101
+
102
+ static const struct among a_1[7] =
103
+ {
104
+ /* 0 */ { 2, s_1_0, -1, -1, 0},
105
+ /* 1 */ { 2, s_1_1, -1, -1, 0},
106
+ /* 2 */ { 2, s_1_2, -1, -1, 0},
107
+ /* 3 */ { 2, s_1_3, -1, -1, 0},
108
+ /* 4 */ { 2, s_1_4, -1, -1, 0},
109
+ /* 5 */ { 2, s_1_5, -1, -1, 0},
110
+ /* 6 */ { 2, s_1_6, -1, -1, 0}
111
+ };
112
+
113
+ static const symbol s_2_0[2] = { 'i', 'g' };
114
+ static const symbol s_2_1[3] = { 'l', 'i', 'g' };
115
+ static const symbol s_2_2[3] = { 'e', 'l', 's' };
116
+ static const symbol s_2_3[5] = { 'f', 'u', 'l', 'l', 't' };
117
+ static const symbol s_2_4[4] = { 'l', 0xF6, 's', 't' };
118
+
119
+ static const struct among a_2[5] =
120
+ {
121
+ /* 0 */ { 2, s_2_0, -1, 1, 0},
122
+ /* 1 */ { 3, s_2_1, 0, 1, 0},
123
+ /* 2 */ { 3, s_2_2, -1, 1, 0},
124
+ /* 3 */ { 5, s_2_3, -1, 3, 0},
125
+ /* 4 */ { 4, s_2_4, -1, 2, 0}
126
+ };
127
+
128
+ static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32 };
129
+
130
+ static const unsigned char g_s_ending[] = { 119, 127, 149 };
131
+
132
+ static const symbol s_0[] = { 'l', 0xF6, 's' };
133
+ static const symbol s_1[] = { 'f', 'u', 'l', 'l' };
134
+
135
+ static int r_mark_regions(struct SN_env * z) {
136
+ z->I[0] = z->l;
137
+ { int c_test = z->c; /* test, line 29 */
138
+ { int ret = z->c + 3;
139
+ if (0 > ret || ret > z->l) return 0;
140
+ z->c = ret; /* hop, line 29 */
141
+ }
142
+ z->I[1] = z->c; /* setmark x, line 29 */
143
+ z->c = c_test;
144
+ }
145
+ if (out_grouping(z, g_v, 97, 246, 1) < 0) return 0; /* goto */ /* grouping v, line 30 */
146
+ { /* gopast */ /* non v, line 30 */
147
+ int ret = in_grouping(z, g_v, 97, 246, 1);
148
+ if (ret < 0) return 0;
149
+ z->c += ret;
150
+ }
151
+ z->I[0] = z->c; /* setmark p1, line 30 */
152
+ /* try, line 31 */
153
+ if (!(z->I[0] < z->I[1])) goto lab0;
154
+ z->I[0] = z->I[1];
155
+ lab0:
156
+ return 1;
157
+ }
158
+
159
+ static int r_main_suffix(struct SN_env * z) {
160
+ int among_var;
161
+ { int mlimit; /* setlimit, line 37 */
162
+ int m1 = z->l - z->c; (void)m1;
163
+ if (z->c < z->I[0]) return 0;
164
+ z->c = z->I[0]; /* tomark, line 37 */
165
+ mlimit = z->lb; z->lb = z->c;
166
+ z->c = z->l - m1;
167
+ z->ket = z->c; /* [, line 37 */
168
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851442 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
169
+ among_var = find_among_b(z, a_0, 37); /* substring, line 37 */
170
+ if (!(among_var)) { z->lb = mlimit; return 0; }
171
+ z->bra = z->c; /* ], line 37 */
172
+ z->lb = mlimit;
173
+ }
174
+ switch(among_var) {
175
+ case 0: return 0;
176
+ case 1:
177
+ { int ret = slice_del(z); /* delete, line 44 */
178
+ if (ret < 0) return ret;
179
+ }
180
+ break;
181
+ case 2:
182
+ if (in_grouping_b(z, g_s_ending, 98, 121, 0)) return 0;
183
+ { int ret = slice_del(z); /* delete, line 46 */
184
+ if (ret < 0) return ret;
185
+ }
186
+ break;
187
+ }
188
+ return 1;
189
+ }
190
+
191
+ static int r_consonant_pair(struct SN_env * z) {
192
+ { int mlimit; /* setlimit, line 50 */
193
+ int m1 = z->l - z->c; (void)m1;
194
+ if (z->c < z->I[0]) return 0;
195
+ z->c = z->I[0]; /* tomark, line 50 */
196
+ mlimit = z->lb; z->lb = z->c;
197
+ z->c = z->l - m1;
198
+ { int m2 = z->l - z->c; (void)m2; /* and, line 52 */
199
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1064976 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
200
+ if (!(find_among_b(z, a_1, 7))) { z->lb = mlimit; return 0; } /* among, line 51 */
201
+ z->c = z->l - m2;
202
+ z->ket = z->c; /* [, line 52 */
203
+ if (z->c <= z->lb) { z->lb = mlimit; return 0; }
204
+ z->c--; /* next, line 52 */
205
+ z->bra = z->c; /* ], line 52 */
206
+ { int ret = slice_del(z); /* delete, line 52 */
207
+ if (ret < 0) return ret;
208
+ }
209
+ }
210
+ z->lb = mlimit;
211
+ }
212
+ return 1;
213
+ }
214
+
215
+ static int r_other_suffix(struct SN_env * z) {
216
+ int among_var;
217
+ { int mlimit; /* setlimit, line 55 */
218
+ int m1 = z->l - z->c; (void)m1;
219
+ if (z->c < z->I[0]) return 0;
220
+ z->c = z->I[0]; /* tomark, line 55 */
221
+ mlimit = z->lb; z->lb = z->c;
222
+ z->c = z->l - m1;
223
+ z->ket = z->c; /* [, line 56 */
224
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
225
+ among_var = find_among_b(z, a_2, 5); /* substring, line 56 */
226
+ if (!(among_var)) { z->lb = mlimit; return 0; }
227
+ z->bra = z->c; /* ], line 56 */
228
+ switch(among_var) {
229
+ case 0: { z->lb = mlimit; return 0; }
230
+ case 1:
231
+ { int ret = slice_del(z); /* delete, line 57 */
232
+ if (ret < 0) return ret;
233
+ }
234
+ break;
235
+ case 2:
236
+ { int ret = slice_from_s(z, 3, s_0); /* <-, line 58 */
237
+ if (ret < 0) return ret;
238
+ }
239
+ break;
240
+ case 3:
241
+ { int ret = slice_from_s(z, 4, s_1); /* <-, line 59 */
242
+ if (ret < 0) return ret;
243
+ }
244
+ break;
245
+ }
246
+ z->lb = mlimit;
247
+ }
248
+ return 1;
249
+ }
250
+
251
+ extern int swedish_ISO_8859_1_stem(struct SN_env * z) {
252
+ { int c1 = z->c; /* do, line 66 */
253
+ { int ret = r_mark_regions(z);
254
+ if (ret == 0) goto lab0; /* call mark_regions, line 66 */
255
+ if (ret < 0) return ret;
256
+ }
257
+ lab0:
258
+ z->c = c1;
259
+ }
260
+ z->lb = z->c; z->c = z->l; /* backwards, line 67 */
261
+
262
+ { int m2 = z->l - z->c; (void)m2; /* do, line 68 */
263
+ { int ret = r_main_suffix(z);
264
+ if (ret == 0) goto lab1; /* call main_suffix, line 68 */
265
+ if (ret < 0) return ret;
266
+ }
267
+ lab1:
268
+ z->c = z->l - m2;
269
+ }
270
+ { int m3 = z->l - z->c; (void)m3; /* do, line 69 */
271
+ { int ret = r_consonant_pair(z);
272
+ if (ret == 0) goto lab2; /* call consonant_pair, line 69 */
273
+ if (ret < 0) return ret;
274
+ }
275
+ lab2:
276
+ z->c = z->l - m3;
277
+ }
278
+ { int m4 = z->l - z->c; (void)m4; /* do, line 70 */
279
+ { int ret = r_other_suffix(z);
280
+ if (ret == 0) goto lab3; /* call other_suffix, line 70 */
281
+ if (ret < 0) return ret;
282
+ }
283
+ lab3:
284
+ z->c = z->l - m4;
285
+ }
286
+ z->c = z->lb;
287
+ return 1;
288
+ }
289
+
290
+ extern struct SN_env * swedish_ISO_8859_1_create_env(void) { return SN_create_env(0, 2, 0); }
291
+
292
+ extern void swedish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
293
+
@@ -0,0 +1,6 @@
1
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
2
+
3
+ extern struct SN_env * swedish_ISO_8859_1_create_env(void);
4
+ extern void swedish_ISO_8859_1_close_env(struct SN_env * z);
5
+
6
+ extern int swedish_ISO_8859_1_stem(struct SN_env * z);