isomorfeus-ferret 0.12.6 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (249) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +101 -19
  3. data/README.md +85 -16
  4. data/ext/isomorfeus_ferret_ext/bm_bitvector.c +22 -30
  5. data/ext/isomorfeus_ferret_ext/bm_hash.c +6 -12
  6. data/ext/isomorfeus_ferret_ext/bm_micro_string.c +3 -6
  7. data/ext/isomorfeus_ferret_ext/bm_store.c +11 -22
  8. data/ext/isomorfeus_ferret_ext/brotli_common_constants.c +15 -0
  9. data/ext/isomorfeus_ferret_ext/brotli_common_constants.h +200 -0
  10. data/ext/isomorfeus_ferret_ext/brotli_common_context.c +156 -0
  11. data/ext/isomorfeus_ferret_ext/brotli_common_context.h +113 -0
  12. data/ext/isomorfeus_ferret_ext/brotli_common_dictionary.c +5914 -0
  13. data/ext/isomorfeus_ferret_ext/brotli_common_dictionary.h +64 -0
  14. data/ext/isomorfeus_ferret_ext/brotli_common_platform.c +22 -0
  15. data/ext/isomorfeus_ferret_ext/brotli_common_platform.h +594 -0
  16. data/ext/isomorfeus_ferret_ext/brotli_common_transform.c +291 -0
  17. data/ext/isomorfeus_ferret_ext/brotli_common_transform.h +85 -0
  18. data/ext/isomorfeus_ferret_ext/brotli_common_version.h +26 -0
  19. data/ext/isomorfeus_ferret_ext/brotli_dec_bit_reader.c +76 -0
  20. data/ext/isomorfeus_ferret_ext/brotli_dec_bit_reader.h +351 -0
  21. data/ext/isomorfeus_ferret_ext/brotli_dec_decode.c +2608 -0
  22. data/ext/isomorfeus_ferret_ext/brotli_dec_huffman.c +339 -0
  23. data/ext/isomorfeus_ferret_ext/brotli_dec_huffman.h +121 -0
  24. data/ext/isomorfeus_ferret_ext/brotli_dec_prefix.h +732 -0
  25. data/ext/isomorfeus_ferret_ext/brotli_dec_state.c +159 -0
  26. data/ext/isomorfeus_ferret_ext/brotli_dec_state.h +365 -0
  27. data/ext/isomorfeus_ferret_ext/brotli_decode.h +344 -0
  28. data/ext/isomorfeus_ferret_ext/brotli_enc_backward_references.c +145 -0
  29. data/ext/isomorfeus_ferret_ext/brotli_enc_backward_references.h +39 -0
  30. data/ext/isomorfeus_ferret_ext/brotli_enc_backward_references_hq.c +843 -0
  31. data/ext/isomorfeus_ferret_ext/brotli_enc_backward_references_hq.h +95 -0
  32. data/ext/isomorfeus_ferret_ext/brotli_enc_backward_references_inc.h +163 -0
  33. data/ext/isomorfeus_ferret_ext/brotli_enc_bit_cost.c +35 -0
  34. data/ext/isomorfeus_ferret_ext/brotli_enc_bit_cost.h +63 -0
  35. data/ext/isomorfeus_ferret_ext/brotli_enc_bit_cost_inc.h +127 -0
  36. data/ext/isomorfeus_ferret_ext/brotli_enc_block_encoder_inc.h +34 -0
  37. data/ext/isomorfeus_ferret_ext/brotli_enc_block_splitter.c +194 -0
  38. data/ext/isomorfeus_ferret_ext/brotli_enc_block_splitter.h +51 -0
  39. data/ext/isomorfeus_ferret_ext/brotli_enc_block_splitter_inc.h +440 -0
  40. data/ext/isomorfeus_ferret_ext/brotli_enc_brotli_bit_stream.c +1314 -0
  41. data/ext/isomorfeus_ferret_ext/brotli_enc_brotli_bit_stream.h +84 -0
  42. data/ext/isomorfeus_ferret_ext/brotli_enc_cluster.c +56 -0
  43. data/ext/isomorfeus_ferret_ext/brotli_enc_cluster.h +48 -0
  44. data/ext/isomorfeus_ferret_ext/brotli_enc_cluster_inc.h +320 -0
  45. data/ext/isomorfeus_ferret_ext/brotli_enc_command.c +28 -0
  46. data/ext/isomorfeus_ferret_ext/brotli_enc_command.h +190 -0
  47. data/ext/isomorfeus_ferret_ext/brotli_enc_compress_fragment.c +790 -0
  48. data/ext/isomorfeus_ferret_ext/brotli_enc_compress_fragment.h +61 -0
  49. data/ext/isomorfeus_ferret_ext/brotli_enc_compress_fragment_two_pass.c +645 -0
  50. data/ext/isomorfeus_ferret_ext/brotli_enc_compress_fragment_two_pass.h +54 -0
  51. data/ext/isomorfeus_ferret_ext/brotli_enc_dictionary_hash.c +1846 -0
  52. data/ext/isomorfeus_ferret_ext/brotli_enc_dictionary_hash.h +25 -0
  53. data/ext/isomorfeus_ferret_ext/brotli_enc_encode.c +1927 -0
  54. data/ext/isomorfeus_ferret_ext/brotli_enc_encoder_dict.c +33 -0
  55. data/ext/isomorfeus_ferret_ext/brotli_enc_encoder_dict.h +43 -0
  56. data/ext/isomorfeus_ferret_ext/brotli_enc_entropy_encode.c +503 -0
  57. data/ext/isomorfeus_ferret_ext/brotli_enc_entropy_encode.h +122 -0
  58. data/ext/isomorfeus_ferret_ext/brotli_enc_entropy_encode_static.h +539 -0
  59. data/ext/isomorfeus_ferret_ext/brotli_enc_fast_log.c +105 -0
  60. data/ext/isomorfeus_ferret_ext/brotli_enc_fast_log.h +66 -0
  61. data/ext/isomorfeus_ferret_ext/brotli_enc_find_match_length.h +79 -0
  62. data/ext/isomorfeus_ferret_ext/brotli_enc_hash.h +488 -0
  63. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_composite_inc.h +125 -0
  64. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_forgetful_chain_inc.h +293 -0
  65. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_longest_match64_inc.h +267 -0
  66. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_longest_match_inc.h +262 -0
  67. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_longest_match_quickly_inc.h +266 -0
  68. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_rolling_inc.h +212 -0
  69. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_to_binary_tree_inc.h +329 -0
  70. data/ext/isomorfeus_ferret_ext/brotli_enc_histogram.c +100 -0
  71. data/ext/isomorfeus_ferret_ext/brotli_enc_histogram.h +63 -0
  72. data/ext/isomorfeus_ferret_ext/brotli_enc_histogram_inc.h +51 -0
  73. data/ext/isomorfeus_ferret_ext/brotli_enc_literal_cost.c +175 -0
  74. data/ext/isomorfeus_ferret_ext/brotli_enc_literal_cost.h +30 -0
  75. data/ext/isomorfeus_ferret_ext/brotli_enc_memory.c +170 -0
  76. data/ext/isomorfeus_ferret_ext/brotli_enc_memory.h +114 -0
  77. data/ext/isomorfeus_ferret_ext/brotli_enc_metablock.c +663 -0
  78. data/ext/isomorfeus_ferret_ext/brotli_enc_metablock.h +105 -0
  79. data/ext/isomorfeus_ferret_ext/brotli_enc_metablock_inc.h +183 -0
  80. data/ext/isomorfeus_ferret_ext/brotli_enc_params.h +46 -0
  81. data/ext/isomorfeus_ferret_ext/brotli_enc_prefix.h +53 -0
  82. data/ext/isomorfeus_ferret_ext/brotli_enc_quality.h +165 -0
  83. data/ext/isomorfeus_ferret_ext/brotli_enc_ringbuffer.h +167 -0
  84. data/ext/isomorfeus_ferret_ext/brotli_enc_static_dict.c +486 -0
  85. data/ext/isomorfeus_ferret_ext/brotli_enc_static_dict.h +40 -0
  86. data/ext/isomorfeus_ferret_ext/brotli_enc_static_dict_lut.h +5864 -0
  87. data/ext/isomorfeus_ferret_ext/brotli_enc_utf8_util.c +85 -0
  88. data/ext/isomorfeus_ferret_ext/brotli_enc_utf8_util.h +32 -0
  89. data/ext/isomorfeus_ferret_ext/brotli_enc_write_bits.h +87 -0
  90. data/ext/isomorfeus_ferret_ext/brotli_encode.h +448 -0
  91. data/ext/isomorfeus_ferret_ext/brotli_port.h +288 -0
  92. data/ext/isomorfeus_ferret_ext/brotli_types.h +83 -0
  93. data/ext/isomorfeus_ferret_ext/bzlib.c +1572 -0
  94. data/ext/isomorfeus_ferret_ext/bzlib.h +282 -0
  95. data/ext/isomorfeus_ferret_ext/bzlib_blocksort.c +1094 -0
  96. data/ext/isomorfeus_ferret_ext/bzlib_compress.c +672 -0
  97. data/ext/isomorfeus_ferret_ext/bzlib_crctable.c +104 -0
  98. data/ext/isomorfeus_ferret_ext/bzlib_decompress.c +652 -0
  99. data/ext/isomorfeus_ferret_ext/bzlib_huffman.c +205 -0
  100. data/ext/isomorfeus_ferret_ext/bzlib_private.h +509 -0
  101. data/ext/isomorfeus_ferret_ext/bzlib_randtable.c +84 -0
  102. data/ext/isomorfeus_ferret_ext/fio_tmpfile.h +53 -53
  103. data/ext/isomorfeus_ferret_ext/frb_analysis.c +785 -1192
  104. data/ext/isomorfeus_ferret_ext/frb_index.c +513 -464
  105. data/ext/isomorfeus_ferret_ext/frb_qparser.c +48 -60
  106. data/ext/isomorfeus_ferret_ext/frb_search.c +1520 -1002
  107. data/ext/isomorfeus_ferret_ext/frb_store.c +96 -96
  108. data/ext/isomorfeus_ferret_ext/frb_threading.h +0 -1
  109. data/ext/isomorfeus_ferret_ext/frb_utils.c +147 -196
  110. data/ext/isomorfeus_ferret_ext/frt_analysis.c +695 -1090
  111. data/ext/isomorfeus_ferret_ext/frt_analysis.h +174 -170
  112. data/ext/isomorfeus_ferret_ext/frt_array.c +2 -4
  113. data/ext/isomorfeus_ferret_ext/frt_bitvector.c +9 -16
  114. data/ext/isomorfeus_ferret_ext/frt_bitvector.h +32 -81
  115. data/ext/isomorfeus_ferret_ext/frt_document.c +15 -20
  116. data/ext/isomorfeus_ferret_ext/frt_document.h +10 -9
  117. data/ext/isomorfeus_ferret_ext/frt_except.c +5 -12
  118. data/ext/isomorfeus_ferret_ext/frt_field_index.c +3 -3
  119. data/ext/isomorfeus_ferret_ext/frt_field_index.h +6 -7
  120. data/ext/isomorfeus_ferret_ext/frt_filter.c +35 -46
  121. data/ext/isomorfeus_ferret_ext/frt_fs_store.c +2 -0
  122. data/ext/isomorfeus_ferret_ext/frt_global.c +91 -200
  123. data/ext/isomorfeus_ferret_ext/frt_global.h +7 -18
  124. data/ext/isomorfeus_ferret_ext/frt_hash.c +1 -2
  125. data/ext/isomorfeus_ferret_ext/frt_ind.c +32 -35
  126. data/ext/isomorfeus_ferret_ext/frt_ind.h +9 -9
  127. data/ext/isomorfeus_ferret_ext/frt_index.c +714 -384
  128. data/ext/isomorfeus_ferret_ext/frt_index.h +274 -290
  129. data/ext/isomorfeus_ferret_ext/frt_lang.c +0 -2
  130. data/ext/isomorfeus_ferret_ext/frt_mempool.c +1 -2
  131. data/ext/isomorfeus_ferret_ext/frt_multimapper.c +4 -7
  132. data/ext/isomorfeus_ferret_ext/frt_q_boolean.c +68 -91
  133. data/ext/isomorfeus_ferret_ext/frt_q_const_score.c +35 -38
  134. data/ext/isomorfeus_ferret_ext/frt_q_filtered_query.c +53 -72
  135. data/ext/isomorfeus_ferret_ext/frt_q_fuzzy.c +25 -32
  136. data/ext/isomorfeus_ferret_ext/frt_q_match_all.c +21 -23
  137. data/ext/isomorfeus_ferret_ext/frt_q_multi_term.c +66 -103
  138. data/ext/isomorfeus_ferret_ext/frt_q_parser.c +207 -195
  139. data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +20 -16
  140. data/ext/isomorfeus_ferret_ext/frt_q_prefix.c +17 -14
  141. data/ext/isomorfeus_ferret_ext/frt_q_range.c +102 -131
  142. data/ext/isomorfeus_ferret_ext/frt_q_span.c +179 -178
  143. data/ext/isomorfeus_ferret_ext/frt_q_term.c +47 -60
  144. data/ext/isomorfeus_ferret_ext/frt_q_wildcard.c +18 -16
  145. data/ext/isomorfeus_ferret_ext/frt_ram_store.c +46 -84
  146. data/ext/isomorfeus_ferret_ext/frt_search.c +105 -146
  147. data/ext/isomorfeus_ferret_ext/frt_search.h +331 -320
  148. data/ext/isomorfeus_ferret_ext/frt_similarity.c +5 -13
  149. data/ext/isomorfeus_ferret_ext/frt_similarity.h +7 -12
  150. data/ext/isomorfeus_ferret_ext/frt_sort.c +105 -149
  151. data/ext/isomorfeus_ferret_ext/frt_store.c +13 -7
  152. data/ext/isomorfeus_ferret_ext/frt_store.h +10 -2
  153. data/ext/isomorfeus_ferret_ext/frt_threading.h +0 -1
  154. data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.c +22 -112
  155. data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.h +2 -32
  156. data/ext/isomorfeus_ferret_ext/lz4.c +2495 -0
  157. data/ext/isomorfeus_ferret_ext/lz4.h +774 -0
  158. data/ext/isomorfeus_ferret_ext/lz4frame.c +1899 -0
  159. data/ext/isomorfeus_ferret_ext/lz4frame.h +623 -0
  160. data/ext/isomorfeus_ferret_ext/lz4hc.c +1615 -0
  161. data/ext/isomorfeus_ferret_ext/lz4hc.h +413 -0
  162. data/ext/isomorfeus_ferret_ext/lz4xxhash.c +1030 -0
  163. data/ext/isomorfeus_ferret_ext/lz4xxhash.h +328 -0
  164. data/ext/isomorfeus_ferret_ext/stem_modules.h +0 -86
  165. data/ext/isomorfeus_ferret_ext/test.c +0 -17
  166. data/ext/isomorfeus_ferret_ext/test_1710.c +11 -12
  167. data/ext/isomorfeus_ferret_ext/test_analysis.c +590 -583
  168. data/ext/isomorfeus_ferret_ext/test_compound_io.c +1 -1
  169. data/ext/isomorfeus_ferret_ext/test_document.c +19 -15
  170. data/ext/isomorfeus_ferret_ext/test_except.c +1 -2
  171. data/ext/isomorfeus_ferret_ext/test_fields.c +111 -100
  172. data/ext/isomorfeus_ferret_ext/test_file_deleter.c +10 -27
  173. data/ext/isomorfeus_ferret_ext/test_filter.c +11 -8
  174. data/ext/isomorfeus_ferret_ext/test_global.c +0 -46
  175. data/ext/isomorfeus_ferret_ext/test_hash.c +2 -2
  176. data/ext/isomorfeus_ferret_ext/test_hashset.c +1 -1
  177. data/ext/isomorfeus_ferret_ext/test_highlighter.c +15 -11
  178. data/ext/isomorfeus_ferret_ext/test_index.c +373 -363
  179. data/ext/isomorfeus_ferret_ext/test_q_const_score.c +5 -3
  180. data/ext/isomorfeus_ferret_ext/test_q_filtered.c +5 -3
  181. data/ext/isomorfeus_ferret_ext/test_q_fuzzy.c +13 -10
  182. data/ext/isomorfeus_ferret_ext/test_q_parser.c +45 -7
  183. data/ext/isomorfeus_ferret_ext/test_q_span.c +15 -12
  184. data/ext/isomorfeus_ferret_ext/test_ram_store.c +3 -3
  185. data/ext/isomorfeus_ferret_ext/test_search.c +60 -64
  186. data/ext/isomorfeus_ferret_ext/test_segments.c +5 -4
  187. data/ext/isomorfeus_ferret_ext/test_sort.c +17 -14
  188. data/ext/isomorfeus_ferret_ext/test_store.c +2 -0
  189. data/ext/isomorfeus_ferret_ext/test_term.c +3 -1
  190. data/ext/isomorfeus_ferret_ext/test_term_vectors.c +9 -10
  191. data/ext/isomorfeus_ferret_ext/test_test.c +1 -2
  192. data/ext/isomorfeus_ferret_ext/test_threading.c +9 -10
  193. data/ext/isomorfeus_ferret_ext/testhelper.c +1 -2
  194. data/lib/isomorfeus/ferret/version.rb +1 -1
  195. metadata +113 -58
  196. data/ext/isomorfeus_ferret_ext/email.rl +0 -21
  197. data/ext/isomorfeus_ferret_ext/frt_scanner.c +0 -900
  198. data/ext/isomorfeus_ferret_ext/frt_scanner.h +0 -28
  199. data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +0 -6706
  200. data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +0 -4420
  201. data/ext/isomorfeus_ferret_ext/scanner.h +0 -28
  202. data/ext/isomorfeus_ferret_ext/scanner.in +0 -43
  203. data/ext/isomorfeus_ferret_ext/scanner.rl +0 -84
  204. data/ext/isomorfeus_ferret_ext/scanner_mb.rl +0 -200
  205. data/ext/isomorfeus_ferret_ext/scanner_utf8.rl +0 -85
  206. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.c +0 -1167
  207. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.h +0 -6
  208. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.c +0 -1433
  209. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.h +0 -6
  210. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +0 -301
  211. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +0 -6
  212. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +0 -590
  213. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +0 -6
  214. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +0 -1049
  215. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +0 -6
  216. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +0 -705
  217. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +0 -6
  218. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +0 -1239
  219. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +0 -6
  220. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +0 -477
  221. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +0 -6
  222. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +0 -1217
  223. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.h +0 -7
  224. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.c +0 -394
  225. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.h +0 -6
  226. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.c +0 -457
  227. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.h +0 -6
  228. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +0 -1009
  229. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +0 -6
  230. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +0 -259
  231. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +0 -6
  232. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +0 -704
  233. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +0 -6
  234. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +0 -948
  235. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +0 -6
  236. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +0 -1028
  237. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +0 -6
  238. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +0 -275
  239. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +0 -6
  240. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.c +0 -849
  241. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.h +0 -6
  242. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +0 -952
  243. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +0 -6
  244. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +0 -669
  245. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +0 -6
  246. data/ext/isomorfeus_ferret_ext/stem_modules.txt +0 -63
  247. data/ext/isomorfeus_ferret_ext/uchar-ucs4.rl +0 -1854
  248. data/ext/isomorfeus_ferret_ext/uchar-utf8.rl +0 -1999
  249. data/ext/isomorfeus_ferret_ext/url.rl +0 -27
@@ -1,6 +0,0 @@
1
- /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
-
3
- extern struct SN_env * catalan_ISO_8859_1_create_env(void);
4
- extern void catalan_ISO_8859_1_close_env(struct SN_env * z);
5
-
6
- extern int catalan_ISO_8859_1_stem(struct SN_env * z);
@@ -1,301 +0,0 @@
1
- /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
-
3
- #include "stem_header.h"
4
-
5
- extern int danish_ISO_8859_1_stem(struct SN_env * z);
6
-
7
- static int r_undouble(struct SN_env * z);
8
- static int r_other_suffix(struct SN_env * z);
9
- static int r_consonant_pair(struct SN_env * z);
10
- static int r_main_suffix(struct SN_env * z);
11
- static int r_mark_regions(struct SN_env * z);
12
-
13
- extern struct SN_env * danish_ISO_8859_1_create_env(void);
14
- extern void danish_ISO_8859_1_close_env(struct SN_env * z);
15
-
16
- static const symbol s_0_0[3] = { 'h', 'e', 'd' };
17
- static const symbol s_0_1[5] = { 'e', 't', 'h', 'e', 'd' };
18
- static const symbol s_0_2[4] = { 'e', 'r', 'e', 'd' };
19
- static const symbol s_0_3[1] = { 'e' };
20
- static const symbol s_0_4[5] = { 'e', 'r', 'e', 'd', 'e' };
21
- static const symbol s_0_5[4] = { 'e', 'n', 'd', 'e' };
22
- static const symbol s_0_6[6] = { 'e', 'r', 'e', 'n', 'd', 'e' };
23
- static const symbol s_0_7[3] = { 'e', 'n', 'e' };
24
- static const symbol s_0_8[4] = { 'e', 'r', 'n', 'e' };
25
- static const symbol s_0_9[3] = { 'e', 'r', 'e' };
26
- static const symbol s_0_10[2] = { 'e', 'n' };
27
- static const symbol s_0_11[5] = { 'h', 'e', 'd', 'e', 'n' };
28
- static const symbol s_0_12[4] = { 'e', 'r', 'e', 'n' };
29
- static const symbol s_0_13[2] = { 'e', 'r' };
30
- static const symbol s_0_14[5] = { 'h', 'e', 'd', 'e', 'r' };
31
- static const symbol s_0_15[4] = { 'e', 'r', 'e', 'r' };
32
- static const symbol s_0_16[1] = { 's' };
33
- static const symbol s_0_17[4] = { 'h', 'e', 'd', 's' };
34
- static const symbol s_0_18[2] = { 'e', 's' };
35
- static const symbol s_0_19[5] = { 'e', 'n', 'd', 'e', 's' };
36
- static const symbol s_0_20[7] = { 'e', 'r', 'e', 'n', 'd', 'e', 's' };
37
- static const symbol s_0_21[4] = { 'e', 'n', 'e', 's' };
38
- static const symbol s_0_22[5] = { 'e', 'r', 'n', 'e', 's' };
39
- static const symbol s_0_23[4] = { 'e', 'r', 'e', 's' };
40
- static const symbol s_0_24[3] = { 'e', 'n', 's' };
41
- static const symbol s_0_25[6] = { 'h', 'e', 'd', 'e', 'n', 's' };
42
- static const symbol s_0_26[5] = { 'e', 'r', 'e', 'n', 's' };
43
- static const symbol s_0_27[3] = { 'e', 'r', 's' };
44
- static const symbol s_0_28[3] = { 'e', 't', 's' };
45
- static const symbol s_0_29[5] = { 'e', 'r', 'e', 't', 's' };
46
- static const symbol s_0_30[2] = { 'e', 't' };
47
- static const symbol s_0_31[4] = { 'e', 'r', 'e', 't' };
48
-
49
- static const struct among a_0[32] =
50
- {
51
- { 3, s_0_0, -1, 1, 0},
52
- { 5, s_0_1, 0, 1, 0},
53
- { 4, s_0_2, -1, 1, 0},
54
- { 1, s_0_3, -1, 1, 0},
55
- { 5, s_0_4, 3, 1, 0},
56
- { 4, s_0_5, 3, 1, 0},
57
- { 6, s_0_6, 5, 1, 0},
58
- { 3, s_0_7, 3, 1, 0},
59
- { 4, s_0_8, 3, 1, 0},
60
- { 3, s_0_9, 3, 1, 0},
61
- { 2, s_0_10, -1, 1, 0},
62
- { 5, s_0_11, 10, 1, 0},
63
- { 4, s_0_12, 10, 1, 0},
64
- { 2, s_0_13, -1, 1, 0},
65
- { 5, s_0_14, 13, 1, 0},
66
- { 4, s_0_15, 13, 1, 0},
67
- { 1, s_0_16, -1, 2, 0},
68
- { 4, s_0_17, 16, 1, 0},
69
- { 2, s_0_18, 16, 1, 0},
70
- { 5, s_0_19, 18, 1, 0},
71
- { 7, s_0_20, 19, 1, 0},
72
- { 4, s_0_21, 18, 1, 0},
73
- { 5, s_0_22, 18, 1, 0},
74
- { 4, s_0_23, 18, 1, 0},
75
- { 3, s_0_24, 16, 1, 0},
76
- { 6, s_0_25, 24, 1, 0},
77
- { 5, s_0_26, 24, 1, 0},
78
- { 3, s_0_27, 16, 1, 0},
79
- { 3, s_0_28, 16, 1, 0},
80
- { 5, s_0_29, 28, 1, 0},
81
- { 2, s_0_30, -1, 1, 0},
82
- { 4, s_0_31, 30, 1, 0}
83
- };
84
-
85
- static const symbol s_1_0[2] = { 'g', 'd' };
86
- static const symbol s_1_1[2] = { 'd', 't' };
87
- static const symbol s_1_2[2] = { 'g', 't' };
88
- static const symbol s_1_3[2] = { 'k', 't' };
89
-
90
- static const struct among a_1[4] =
91
- {
92
- { 2, s_1_0, -1, -1, 0},
93
- { 2, s_1_1, -1, -1, 0},
94
- { 2, s_1_2, -1, -1, 0},
95
- { 2, s_1_3, -1, -1, 0}
96
- };
97
-
98
- static const symbol s_2_0[2] = { 'i', 'g' };
99
- static const symbol s_2_1[3] = { 'l', 'i', 'g' };
100
- static const symbol s_2_2[4] = { 'e', 'l', 'i', 'g' };
101
- static const symbol s_2_3[3] = { 'e', 'l', 's' };
102
- static const symbol s_2_4[4] = { 'l', 0xF8, 's', 't' };
103
-
104
- static const struct among a_2[5] =
105
- {
106
- { 2, s_2_0, -1, 1, 0},
107
- { 3, s_2_1, 0, 1, 0},
108
- { 4, s_2_2, 1, 1, 0},
109
- { 3, s_2_3, -1, 1, 0},
110
- { 4, s_2_4, -1, 2, 0}
111
- };
112
-
113
- static const unsigned char g_c[] = { 119, 223, 119, 1 };
114
-
115
- static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 };
116
-
117
- static const unsigned char g_s_ending[] = { 239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 };
118
-
119
- static const symbol s_0[] = { 's', 't' };
120
- static const symbol s_1[] = { 'i', 'g' };
121
- static const symbol s_2[] = { 'l', 0xF8, 's' };
122
-
123
- static int r_mark_regions(struct SN_env * z) {
124
- z->I[1] = z->l;
125
- { int c_test1 = z->c;
126
- z->c = z->c + 3;
127
- if (z->c > z->l) return 0;
128
- z->I[0] = z->c;
129
- z->c = c_test1;
130
- }
131
- if (out_grouping(z, g_v, 97, 248, 1) < 0) return 0;
132
- {
133
- int ret = in_grouping(z, g_v, 97, 248, 1);
134
- if (ret < 0) return 0;
135
- z->c += ret;
136
- }
137
- z->I[1] = z->c;
138
-
139
- if (!(z->I[1] < z->I[0])) goto lab0;
140
- z->I[1] = z->I[0];
141
- lab0:
142
- return 1;
143
- }
144
-
145
- static int r_main_suffix(struct SN_env * z) {
146
- int among_var;
147
-
148
- { int mlimit1;
149
- if (z->c < z->I[1]) return 0;
150
- mlimit1 = z->lb; z->lb = z->I[1];
151
- z->ket = z->c;
152
- if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851440 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
153
- among_var = find_among_b(z, a_0, 32);
154
- if (!(among_var)) { z->lb = mlimit1; return 0; }
155
- z->bra = z->c;
156
- z->lb = mlimit1;
157
- }
158
- switch (among_var) {
159
- case 1:
160
- { int ret = slice_del(z);
161
- if (ret < 0) return ret;
162
- }
163
- break;
164
- case 2:
165
- if (in_grouping_b(z, g_s_ending, 97, 229, 0)) return 0;
166
- { int ret = slice_del(z);
167
- if (ret < 0) return ret;
168
- }
169
- break;
170
- }
171
- return 1;
172
- }
173
-
174
- static int r_consonant_pair(struct SN_env * z) {
175
- { int m_test1 = z->l - z->c;
176
-
177
- { int mlimit2;
178
- if (z->c < z->I[1]) return 0;
179
- mlimit2 = z->lb; z->lb = z->I[1];
180
- z->ket = z->c;
181
- if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit2; return 0; }
182
- if (!(find_among_b(z, a_1, 4))) { z->lb = mlimit2; return 0; }
183
- z->bra = z->c;
184
- z->lb = mlimit2;
185
- }
186
- z->c = z->l - m_test1;
187
- }
188
- if (z->c <= z->lb) return 0;
189
- z->c--;
190
- z->bra = z->c;
191
- { int ret = slice_del(z);
192
- if (ret < 0) return ret;
193
- }
194
- return 1;
195
- }
196
-
197
- static int r_other_suffix(struct SN_env * z) {
198
- int among_var;
199
- { int m1 = z->l - z->c; (void)m1;
200
- z->ket = z->c;
201
- if (!(eq_s_b(z, 2, s_0))) goto lab0;
202
- z->bra = z->c;
203
- if (!(eq_s_b(z, 2, s_1))) goto lab0;
204
- { int ret = slice_del(z);
205
- if (ret < 0) return ret;
206
- }
207
- lab0:
208
- z->c = z->l - m1;
209
- }
210
-
211
- { int mlimit2;
212
- if (z->c < z->I[1]) return 0;
213
- mlimit2 = z->lb; z->lb = z->I[1];
214
- z->ket = z->c;
215
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit2; return 0; }
216
- among_var = find_among_b(z, a_2, 5);
217
- if (!(among_var)) { z->lb = mlimit2; return 0; }
218
- z->bra = z->c;
219
- z->lb = mlimit2;
220
- }
221
- switch (among_var) {
222
- case 1:
223
- { int ret = slice_del(z);
224
- if (ret < 0) return ret;
225
- }
226
- { int m3 = z->l - z->c; (void)m3;
227
- { int ret = r_consonant_pair(z);
228
- if (ret < 0) return ret;
229
- }
230
- z->c = z->l - m3;
231
- }
232
- break;
233
- case 2:
234
- { int ret = slice_from_s(z, 3, s_2);
235
- if (ret < 0) return ret;
236
- }
237
- break;
238
- }
239
- return 1;
240
- }
241
-
242
- static int r_undouble(struct SN_env * z) {
243
-
244
- { int mlimit1;
245
- if (z->c < z->I[1]) return 0;
246
- mlimit1 = z->lb; z->lb = z->I[1];
247
- z->ket = z->c;
248
- if (in_grouping_b(z, g_c, 98, 122, 0)) { z->lb = mlimit1; return 0; }
249
- z->bra = z->c;
250
- z->S[0] = slice_to(z, z->S[0]);
251
- if (z->S[0] == 0) return -1;
252
- z->lb = mlimit1;
253
- }
254
- if (!(eq_v_b(z, z->S[0]))) return 0;
255
- { int ret = slice_del(z);
256
- if (ret < 0) return ret;
257
- }
258
- return 1;
259
- }
260
-
261
- extern int danish_ISO_8859_1_stem(struct SN_env * z) {
262
- { int c1 = z->c;
263
- { int ret = r_mark_regions(z);
264
- if (ret < 0) return ret;
265
- }
266
- z->c = c1;
267
- }
268
- z->lb = z->c; z->c = z->l;
269
-
270
- { int m2 = z->l - z->c; (void)m2;
271
- { int ret = r_main_suffix(z);
272
- if (ret < 0) return ret;
273
- }
274
- z->c = z->l - m2;
275
- }
276
- { int m3 = z->l - z->c; (void)m3;
277
- { int ret = r_consonant_pair(z);
278
- if (ret < 0) return ret;
279
- }
280
- z->c = z->l - m3;
281
- }
282
- { int m4 = z->l - z->c; (void)m4;
283
- { int ret = r_other_suffix(z);
284
- if (ret < 0) return ret;
285
- }
286
- z->c = z->l - m4;
287
- }
288
- { int m5 = z->l - z->c; (void)m5;
289
- { int ret = r_undouble(z);
290
- if (ret < 0) return ret;
291
- }
292
- z->c = z->l - m5;
293
- }
294
- z->c = z->lb;
295
- return 1;
296
- }
297
-
298
- extern struct SN_env * danish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2); }
299
-
300
- extern void danish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 1); }
301
-
@@ -1,6 +0,0 @@
1
- /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
-
3
- extern struct SN_env * danish_ISO_8859_1_create_env(void);
4
- extern void danish_ISO_8859_1_close_env(struct SN_env * z);
5
-
6
- extern int danish_ISO_8859_1_stem(struct SN_env * z);