isomorfeus-ferret 0.12.4 → 0.12.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +612 -612
  3. data/README.md +77 -48
  4. data/ext/isomorfeus_ferret_ext/bm_hash.c +9 -6
  5. data/ext/isomorfeus_ferret_ext/bm_micro_string.c +4 -2
  6. data/ext/isomorfeus_ferret_ext/brotli_common_constants.c +15 -0
  7. data/ext/isomorfeus_ferret_ext/brotli_common_constants.h +200 -0
  8. data/ext/isomorfeus_ferret_ext/brotli_common_context.c +156 -0
  9. data/ext/isomorfeus_ferret_ext/brotli_common_context.h +113 -0
  10. data/ext/isomorfeus_ferret_ext/brotli_common_dictionary.c +5914 -0
  11. data/ext/isomorfeus_ferret_ext/brotli_common_dictionary.h +64 -0
  12. data/ext/isomorfeus_ferret_ext/brotli_common_platform.c +22 -0
  13. data/ext/isomorfeus_ferret_ext/brotli_common_platform.h +594 -0
  14. data/ext/isomorfeus_ferret_ext/brotli_common_transform.c +291 -0
  15. data/ext/isomorfeus_ferret_ext/brotli_common_transform.h +85 -0
  16. data/ext/isomorfeus_ferret_ext/brotli_common_version.h +26 -0
  17. data/ext/isomorfeus_ferret_ext/brotli_dec_bit_reader.c +76 -0
  18. data/ext/isomorfeus_ferret_ext/brotli_dec_bit_reader.h +351 -0
  19. data/ext/isomorfeus_ferret_ext/brotli_dec_decode.c +2608 -0
  20. data/ext/isomorfeus_ferret_ext/brotli_dec_huffman.c +339 -0
  21. data/ext/isomorfeus_ferret_ext/brotli_dec_huffman.h +121 -0
  22. data/ext/isomorfeus_ferret_ext/brotli_dec_prefix.h +732 -0
  23. data/ext/isomorfeus_ferret_ext/brotli_dec_state.c +159 -0
  24. data/ext/isomorfeus_ferret_ext/brotli_dec_state.h +365 -0
  25. data/ext/isomorfeus_ferret_ext/brotli_decode.h +344 -0
  26. data/ext/isomorfeus_ferret_ext/brotli_enc_backward_references.c +145 -0
  27. data/ext/isomorfeus_ferret_ext/brotli_enc_backward_references.h +39 -0
  28. data/ext/isomorfeus_ferret_ext/brotli_enc_backward_references_hq.c +843 -0
  29. data/ext/isomorfeus_ferret_ext/brotli_enc_backward_references_hq.h +95 -0
  30. data/ext/isomorfeus_ferret_ext/brotli_enc_backward_references_inc.h +163 -0
  31. data/ext/isomorfeus_ferret_ext/brotli_enc_bit_cost.c +35 -0
  32. data/ext/isomorfeus_ferret_ext/brotli_enc_bit_cost.h +63 -0
  33. data/ext/isomorfeus_ferret_ext/brotli_enc_bit_cost_inc.h +127 -0
  34. data/ext/isomorfeus_ferret_ext/brotli_enc_block_encoder_inc.h +34 -0
  35. data/ext/isomorfeus_ferret_ext/brotli_enc_block_splitter.c +194 -0
  36. data/ext/isomorfeus_ferret_ext/brotli_enc_block_splitter.h +51 -0
  37. data/ext/isomorfeus_ferret_ext/brotli_enc_block_splitter_inc.h +440 -0
  38. data/ext/isomorfeus_ferret_ext/brotli_enc_brotli_bit_stream.c +1314 -0
  39. data/ext/isomorfeus_ferret_ext/brotli_enc_brotli_bit_stream.h +84 -0
  40. data/ext/isomorfeus_ferret_ext/brotli_enc_cluster.c +56 -0
  41. data/ext/isomorfeus_ferret_ext/brotli_enc_cluster.h +48 -0
  42. data/ext/isomorfeus_ferret_ext/brotli_enc_cluster_inc.h +320 -0
  43. data/ext/isomorfeus_ferret_ext/brotli_enc_command.c +28 -0
  44. data/ext/isomorfeus_ferret_ext/brotli_enc_command.h +190 -0
  45. data/ext/isomorfeus_ferret_ext/brotli_enc_compress_fragment.c +790 -0
  46. data/ext/isomorfeus_ferret_ext/brotli_enc_compress_fragment.h +61 -0
  47. data/ext/isomorfeus_ferret_ext/brotli_enc_compress_fragment_two_pass.c +645 -0
  48. data/ext/isomorfeus_ferret_ext/brotli_enc_compress_fragment_two_pass.h +54 -0
  49. data/ext/isomorfeus_ferret_ext/brotli_enc_dictionary_hash.c +1846 -0
  50. data/ext/isomorfeus_ferret_ext/brotli_enc_dictionary_hash.h +25 -0
  51. data/ext/isomorfeus_ferret_ext/brotli_enc_encode.c +1927 -0
  52. data/ext/isomorfeus_ferret_ext/brotli_enc_encoder_dict.c +33 -0
  53. data/ext/isomorfeus_ferret_ext/brotli_enc_encoder_dict.h +43 -0
  54. data/ext/isomorfeus_ferret_ext/brotli_enc_entropy_encode.c +503 -0
  55. data/ext/isomorfeus_ferret_ext/brotli_enc_entropy_encode.h +122 -0
  56. data/ext/isomorfeus_ferret_ext/brotli_enc_entropy_encode_static.h +539 -0
  57. data/ext/isomorfeus_ferret_ext/brotli_enc_fast_log.c +105 -0
  58. data/ext/isomorfeus_ferret_ext/brotli_enc_fast_log.h +66 -0
  59. data/ext/isomorfeus_ferret_ext/brotli_enc_find_match_length.h +79 -0
  60. data/ext/isomorfeus_ferret_ext/brotli_enc_hash.h +488 -0
  61. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_composite_inc.h +125 -0
  62. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_forgetful_chain_inc.h +293 -0
  63. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_longest_match64_inc.h +267 -0
  64. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_longest_match_inc.h +262 -0
  65. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_longest_match_quickly_inc.h +266 -0
  66. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_rolling_inc.h +212 -0
  67. data/ext/isomorfeus_ferret_ext/brotli_enc_hash_to_binary_tree_inc.h +329 -0
  68. data/ext/isomorfeus_ferret_ext/brotli_enc_histogram.c +100 -0
  69. data/ext/isomorfeus_ferret_ext/brotli_enc_histogram.h +63 -0
  70. data/ext/isomorfeus_ferret_ext/brotli_enc_histogram_inc.h +51 -0
  71. data/ext/isomorfeus_ferret_ext/brotli_enc_literal_cost.c +175 -0
  72. data/ext/isomorfeus_ferret_ext/brotli_enc_literal_cost.h +30 -0
  73. data/ext/isomorfeus_ferret_ext/brotli_enc_memory.c +170 -0
  74. data/ext/isomorfeus_ferret_ext/brotli_enc_memory.h +114 -0
  75. data/ext/isomorfeus_ferret_ext/brotli_enc_metablock.c +663 -0
  76. data/ext/isomorfeus_ferret_ext/brotli_enc_metablock.h +105 -0
  77. data/ext/isomorfeus_ferret_ext/brotli_enc_metablock_inc.h +183 -0
  78. data/ext/isomorfeus_ferret_ext/brotli_enc_params.h +46 -0
  79. data/ext/isomorfeus_ferret_ext/brotli_enc_prefix.h +53 -0
  80. data/ext/isomorfeus_ferret_ext/brotli_enc_quality.h +165 -0
  81. data/ext/isomorfeus_ferret_ext/brotli_enc_ringbuffer.h +167 -0
  82. data/ext/isomorfeus_ferret_ext/brotli_enc_static_dict.c +486 -0
  83. data/ext/isomorfeus_ferret_ext/brotli_enc_static_dict.h +40 -0
  84. data/ext/isomorfeus_ferret_ext/brotli_enc_static_dict_lut.h +5864 -0
  85. data/ext/isomorfeus_ferret_ext/brotli_enc_utf8_util.c +85 -0
  86. data/ext/isomorfeus_ferret_ext/brotli_enc_utf8_util.h +32 -0
  87. data/ext/isomorfeus_ferret_ext/brotli_enc_write_bits.h +87 -0
  88. data/ext/isomorfeus_ferret_ext/brotli_encode.h +448 -0
  89. data/ext/isomorfeus_ferret_ext/brotli_port.h +288 -0
  90. data/ext/isomorfeus_ferret_ext/brotli_types.h +83 -0
  91. data/ext/isomorfeus_ferret_ext/frb_index.c +35 -4
  92. data/ext/isomorfeus_ferret_ext/frb_store.c +34 -5
  93. data/ext/isomorfeus_ferret_ext/frt_document.h +1 -0
  94. data/ext/isomorfeus_ferret_ext/frt_fs_store.c +1 -0
  95. data/ext/isomorfeus_ferret_ext/frt_index.c +174 -25
  96. data/ext/isomorfeus_ferret_ext/frt_index.h +6 -3
  97. data/ext/isomorfeus_ferret_ext/frt_posh.h +11 -19
  98. data/ext/isomorfeus_ferret_ext/frt_q_parser.c +1844 -1911
  99. data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +12 -15
  100. data/ext/isomorfeus_ferret_ext/frt_ram_store.c +1 -0
  101. data/ext/isomorfeus_ferret_ext/frt_scanner.c +1 -0
  102. data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +1 -0
  103. data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +1 -0
  104. data/ext/isomorfeus_ferret_ext/frt_search.h +1 -1
  105. data/ext/isomorfeus_ferret_ext/libstemmer.c +14 -11
  106. data/ext/isomorfeus_ferret_ext/libstemmer.h +4 -9
  107. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.c +1167 -0
  108. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.h +6 -0
  109. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.c +1433 -0
  110. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.h +6 -0
  111. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +120 -143
  112. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +1 -2
  113. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +217 -237
  114. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +1 -1
  115. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +377 -432
  116. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +1 -1
  117. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +298 -342
  118. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +1 -2
  119. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +530 -524
  120. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +1 -1
  121. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +201 -214
  122. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +1 -1
  123. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +1 -1
  124. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.c +394 -0
  125. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.h +6 -0
  126. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.c +457 -0
  127. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.h +6 -0
  128. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +396 -439
  129. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +1 -1
  130. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +104 -128
  131. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +1 -1
  132. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +242 -273
  133. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +1 -1
  134. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +406 -461
  135. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +1 -2
  136. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +405 -456
  137. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +1 -1
  138. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +108 -126
  139. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +1 -1
  140. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.c +849 -0
  141. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.h +6 -0
  142. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +373 -405
  143. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +1 -1
  144. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +288 -305
  145. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +1 -1
  146. data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.c +1651 -0
  147. data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.h +6 -0
  148. data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.c +546 -0
  149. data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.h +6 -0
  150. data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.c +1171 -0
  151. data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.h +6 -0
  152. data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.c +1436 -0
  153. data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.h +6 -0
  154. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.c +121 -141
  155. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.h +1 -1
  156. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.c +221 -241
  157. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.h +1 -1
  158. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.c +381 -431
  159. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.h +1 -1
  160. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.c +300 -345
  161. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.h +1 -1
  162. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.c +518 -511
  163. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.h +1 -1
  164. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.c +201 -209
  165. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.h +1 -1
  166. data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.c +3660 -0
  167. data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.h +6 -0
  168. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.c +309 -0
  169. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.h +6 -0
  170. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.c +306 -671
  171. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.h +1 -1
  172. data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.c +394 -0
  173. data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.h +6 -0
  174. data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.c +457 -0
  175. data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.h +6 -0
  176. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.c +400 -442
  177. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.h +1 -1
  178. data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.c +824 -0
  179. data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.h +6 -0
  180. data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.c +408 -0
  181. data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.h +6 -0
  182. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.c +105 -127
  183. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.h +1 -1
  184. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.c +245 -276
  185. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.h +1 -1
  186. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.c +409 -464
  187. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.h +1 -1
  188. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.c +376 -408
  189. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.h +1 -1
  190. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.c +272 -287
  191. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.h +1 -1
  192. data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.c +6530 -0
  193. data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.h +6 -0
  194. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.c +407 -458
  195. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.h +1 -1
  196. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.c +110 -125
  197. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.h +1 -1
  198. data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.c +1865 -0
  199. data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.h +6 -0
  200. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.c +698 -806
  201. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.h +1 -1
  202. data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.c +1220 -0
  203. data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.h +6 -0
  204. data/ext/isomorfeus_ferret_ext/stem_api.c +1 -9
  205. data/ext/isomorfeus_ferret_ext/stem_api.h +1 -3
  206. data/ext/isomorfeus_ferret_ext/stem_header.h +30 -26
  207. data/ext/isomorfeus_ferret_ext/stem_modules.h +113 -26
  208. data/ext/isomorfeus_ferret_ext/stem_modules.txt +18 -5
  209. data/ext/isomorfeus_ferret_ext/stem_utilities.c +167 -132
  210. data/ext/isomorfeus_ferret_ext/test.c +7 -1
  211. data/ext/isomorfeus_ferret_ext/test_fields.c +57 -45
  212. data/ext/isomorfeus_ferret_ext/test_index.c +4 -1
  213. data/ext/isomorfeus_ferret_ext/test_search.c +0 -1
  214. data/lib/isomorfeus/ferret/version.rb +1 -1
  215. metadata +125 -5
  216. data/ext/isomorfeus_ferret_ext/q_parser.y +0 -1366
@@ -0,0 +1,6 @@
1
+ /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
+
3
+ extern struct SN_env * catalan_UTF_8_create_env(void);
4
+ extern void catalan_UTF_8_close_env(struct SN_env * z);
5
+
6
+ extern int catalan_UTF_8_stem(struct SN_env * z);
@@ -1,4 +1,4 @@
1
- /* This file was generated automatically by the Snowball to ANSI C compiler */
1
+ /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
2
 
3
3
  #include "stem_header.h"
4
4
 
@@ -48,38 +48,38 @@ static const symbol s_0_31[4] = { 'e', 'r', 'e', 't' };
48
48
 
49
49
  static const struct among a_0[32] =
50
50
  {
51
- /* 0 */ { 3, s_0_0, -1, 1, 0},
52
- /* 1 */ { 5, s_0_1, 0, 1, 0},
53
- /* 2 */ { 4, s_0_2, -1, 1, 0},
54
- /* 3 */ { 1, s_0_3, -1, 1, 0},
55
- /* 4 */ { 5, s_0_4, 3, 1, 0},
56
- /* 5 */ { 4, s_0_5, 3, 1, 0},
57
- /* 6 */ { 6, s_0_6, 5, 1, 0},
58
- /* 7 */ { 3, s_0_7, 3, 1, 0},
59
- /* 8 */ { 4, s_0_8, 3, 1, 0},
60
- /* 9 */ { 3, s_0_9, 3, 1, 0},
61
- /* 10 */ { 2, s_0_10, -1, 1, 0},
62
- /* 11 */ { 5, s_0_11, 10, 1, 0},
63
- /* 12 */ { 4, s_0_12, 10, 1, 0},
64
- /* 13 */ { 2, s_0_13, -1, 1, 0},
65
- /* 14 */ { 5, s_0_14, 13, 1, 0},
66
- /* 15 */ { 4, s_0_15, 13, 1, 0},
67
- /* 16 */ { 1, s_0_16, -1, 2, 0},
68
- /* 17 */ { 4, s_0_17, 16, 1, 0},
69
- /* 18 */ { 2, s_0_18, 16, 1, 0},
70
- /* 19 */ { 5, s_0_19, 18, 1, 0},
71
- /* 20 */ { 7, s_0_20, 19, 1, 0},
72
- /* 21 */ { 4, s_0_21, 18, 1, 0},
73
- /* 22 */ { 5, s_0_22, 18, 1, 0},
74
- /* 23 */ { 4, s_0_23, 18, 1, 0},
75
- /* 24 */ { 3, s_0_24, 16, 1, 0},
76
- /* 25 */ { 6, s_0_25, 24, 1, 0},
77
- /* 26 */ { 5, s_0_26, 24, 1, 0},
78
- /* 27 */ { 3, s_0_27, 16, 1, 0},
79
- /* 28 */ { 3, s_0_28, 16, 1, 0},
80
- /* 29 */ { 5, s_0_29, 28, 1, 0},
81
- /* 30 */ { 2, s_0_30, -1, 1, 0},
82
- /* 31 */ { 4, s_0_31, 30, 1, 0}
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
83
  };
84
84
 
85
85
  static const symbol s_1_0[2] = { 'g', 'd' };
@@ -89,10 +89,10 @@ static const symbol s_1_3[2] = { 'k', 't' };
89
89
 
90
90
  static const struct among a_1[4] =
91
91
  {
92
- /* 0 */ { 2, s_1_0, -1, -1, 0},
93
- /* 1 */ { 2, s_1_1, -1, -1, 0},
94
- /* 2 */ { 2, s_1_2, -1, -1, 0},
95
- /* 3 */ { 2, s_1_3, -1, -1, 0}
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
96
  };
97
97
 
98
98
  static const symbol s_2_0[2] = { 'i', 'g' };
@@ -103,13 +103,15 @@ static const symbol s_2_4[5] = { 'l', 0xC3, 0xB8, 's', 't' };
103
103
 
104
104
  static const struct among a_2[5] =
105
105
  {
106
- /* 0 */ { 2, s_2_0, -1, 1, 0},
107
- /* 1 */ { 3, s_2_1, 0, 1, 0},
108
- /* 2 */ { 4, s_2_2, 1, 1, 0},
109
- /* 3 */ { 3, s_2_3, -1, 1, 0},
110
- /* 4 */ { 5, s_2_4, -1, 2, 0}
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
+ { 5, s_2_4, -1, 2, 0}
111
111
  };
112
112
 
113
+ static const unsigned char g_c[] = { 119, 223, 119, 1 };
114
+
113
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 };
114
116
 
115
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 };
@@ -119,54 +121,51 @@ static const symbol s_1[] = { 'i', 'g' };
119
121
  static const symbol s_2[] = { 'l', 0xC3, 0xB8, 's' };
120
122
 
121
123
  static int r_mark_regions(struct SN_env * z) {
122
- z->I[0] = z->l;
123
- { int c_test = z->c; /* test, line 33 */
124
- { int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
124
+ z->I[1] = z->l;
125
+ { int c_test1 = z->c;
126
+ { int ret = skip_utf8(z->p, z->c, z->l, 3);
125
127
  if (ret < 0) return 0;
126
- z->c = ret; /* hop, line 33 */
128
+ z->c = ret;
127
129
  }
128
- z->I[1] = z->c; /* setmark x, line 33 */
129
- z->c = c_test;
130
+ z->I[0] = z->c;
131
+ z->c = c_test1;
130
132
  }
131
- if (out_grouping_U(z, g_v, 97, 248, 1) < 0) return 0; /* goto */ /* grouping v, line 34 */
132
- { /* gopast */ /* non v, line 34 */
133
+ if (out_grouping_U(z, g_v, 97, 248, 1) < 0) return 0;
134
+ {
133
135
  int ret = in_grouping_U(z, g_v, 97, 248, 1);
134
136
  if (ret < 0) return 0;
135
137
  z->c += ret;
136
138
  }
137
- z->I[0] = z->c; /* setmark p1, line 34 */
138
- /* try, line 35 */
139
- if (!(z->I[0] < z->I[1])) goto lab0;
140
- z->I[0] = z->I[1];
139
+ z->I[1] = z->c;
140
+
141
+ if (!(z->I[1] < z->I[0])) goto lab0;
142
+ z->I[1] = z->I[0];
141
143
  lab0:
142
144
  return 1;
143
145
  }
144
146
 
145
147
  static int r_main_suffix(struct SN_env * z) {
146
148
  int among_var;
147
- { int mlimit; /* setlimit, line 41 */
148
- int m1 = z->l - z->c; (void)m1;
149
- if (z->c < z->I[0]) return 0;
150
- z->c = z->I[0]; /* tomark, line 41 */
151
- mlimit = z->lb; z->lb = z->c;
152
- z->c = z->l - m1;
153
- z->ket = z->c; /* [, line 41 */
154
- if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851440 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
155
- among_var = find_among_b(z, a_0, 32); /* substring, line 41 */
156
- if (!(among_var)) { z->lb = mlimit; return 0; }
157
- z->bra = z->c; /* ], line 41 */
158
- z->lb = mlimit;
149
+
150
+ { int mlimit1;
151
+ if (z->c < z->I[1]) return 0;
152
+ mlimit1 = z->lb; z->lb = z->I[1];
153
+ z->ket = z->c;
154
+ 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; }
155
+ among_var = find_among_b(z, a_0, 32);
156
+ if (!(among_var)) { z->lb = mlimit1; return 0; }
157
+ z->bra = z->c;
158
+ z->lb = mlimit1;
159
159
  }
160
- switch(among_var) {
161
- case 0: return 0;
160
+ switch (among_var) {
162
161
  case 1:
163
- { int ret = slice_del(z); /* delete, line 48 */
162
+ { int ret = slice_del(z);
164
163
  if (ret < 0) return ret;
165
164
  }
166
165
  break;
167
166
  case 2:
168
167
  if (in_grouping_b_U(z, g_s_ending, 97, 229, 0)) return 0;
169
- { int ret = slice_del(z); /* delete, line 50 */
168
+ { int ret = slice_del(z);
170
169
  if (ret < 0) return ret;
171
170
  }
172
171
  break;
@@ -175,27 +174,25 @@ static int r_main_suffix(struct SN_env * z) {
175
174
  }
176
175
 
177
176
  static int r_consonant_pair(struct SN_env * z) {
178
- { int m_test = z->l - z->c; /* test, line 55 */
179
- { int mlimit; /* setlimit, line 56 */
180
- int m1 = z->l - z->c; (void)m1;
181
- if (z->c < z->I[0]) return 0;
182
- z->c = z->I[0]; /* tomark, line 56 */
183
- mlimit = z->lb; z->lb = z->c;
184
- z->c = z->l - m1;
185
- z->ket = z->c; /* [, line 56 */
186
- if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit; return 0; }
187
- if (!(find_among_b(z, a_1, 4))) { z->lb = mlimit; return 0; } /* substring, line 56 */
188
- z->bra = z->c; /* ], line 56 */
189
- z->lb = mlimit;
177
+ { int m_test1 = z->l - z->c;
178
+
179
+ { int mlimit2;
180
+ if (z->c < z->I[1]) return 0;
181
+ mlimit2 = z->lb; z->lb = z->I[1];
182
+ z->ket = z->c;
183
+ if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit2; return 0; }
184
+ if (!(find_among_b(z, a_1, 4))) { z->lb = mlimit2; return 0; }
185
+ z->bra = z->c;
186
+ z->lb = mlimit2;
190
187
  }
191
- z->c = z->l - m_test;
188
+ z->c = z->l - m_test1;
192
189
  }
193
- { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
190
+ { int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
194
191
  if (ret < 0) return 0;
195
- z->c = ret; /* next, line 62 */
192
+ z->c = ret;
196
193
  }
197
- z->bra = z->c; /* ], line 62 */
198
- { int ret = slice_del(z); /* delete, line 62 */
194
+ z->bra = z->c;
195
+ { int ret = slice_del(z);
199
196
  if (ret < 0) return ret;
200
197
  }
201
198
  return 1;
@@ -203,47 +200,42 @@ static int r_consonant_pair(struct SN_env * z) {
203
200
 
204
201
  static int r_other_suffix(struct SN_env * z) {
205
202
  int among_var;
206
- { int m1 = z->l - z->c; (void)m1; /* do, line 66 */
207
- z->ket = z->c; /* [, line 66 */
203
+ { int m1 = z->l - z->c; (void)m1;
204
+ z->ket = z->c;
208
205
  if (!(eq_s_b(z, 2, s_0))) goto lab0;
209
- z->bra = z->c; /* ], line 66 */
206
+ z->bra = z->c;
210
207
  if (!(eq_s_b(z, 2, s_1))) goto lab0;
211
- { int ret = slice_del(z); /* delete, line 66 */
208
+ { int ret = slice_del(z);
212
209
  if (ret < 0) return ret;
213
210
  }
214
211
  lab0:
215
212
  z->c = z->l - m1;
216
213
  }
217
- { int mlimit; /* setlimit, line 67 */
218
- int m2 = z->l - z->c; (void)m2;
219
- if (z->c < z->I[0]) return 0;
220
- z->c = z->I[0]; /* tomark, line 67 */
221
- mlimit = z->lb; z->lb = z->c;
222
- z->c = z->l - m2;
223
- z->ket = z->c; /* [, line 67 */
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 67 */
226
- if (!(among_var)) { z->lb = mlimit; return 0; }
227
- z->bra = z->c; /* ], line 67 */
228
- z->lb = mlimit;
214
+
215
+ { int mlimit2;
216
+ if (z->c < z->I[1]) return 0;
217
+ mlimit2 = z->lb; z->lb = z->I[1];
218
+ z->ket = z->c;
219
+ 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; }
220
+ among_var = find_among_b(z, a_2, 5);
221
+ if (!(among_var)) { z->lb = mlimit2; return 0; }
222
+ z->bra = z->c;
223
+ z->lb = mlimit2;
229
224
  }
230
- switch(among_var) {
231
- case 0: return 0;
225
+ switch (among_var) {
232
226
  case 1:
233
- { int ret = slice_del(z); /* delete, line 70 */
227
+ { int ret = slice_del(z);
234
228
  if (ret < 0) return ret;
235
229
  }
236
- { int m3 = z->l - z->c; (void)m3; /* do, line 70 */
230
+ { int m3 = z->l - z->c; (void)m3;
237
231
  { int ret = r_consonant_pair(z);
238
- if (ret == 0) goto lab1; /* call consonant_pair, line 70 */
239
232
  if (ret < 0) return ret;
240
233
  }
241
- lab1:
242
234
  z->c = z->l - m3;
243
235
  }
244
236
  break;
245
237
  case 2:
246
- { int ret = slice_from_s(z, 4, s_2); /* <-, line 72 */
238
+ { int ret = slice_from_s(z, 4, s_2);
247
239
  if (ret < 0) return ret;
248
240
  }
249
241
  break;
@@ -252,74 +244,62 @@ static int r_other_suffix(struct SN_env * z) {
252
244
  }
253
245
 
254
246
  static int r_undouble(struct SN_env * z) {
255
- { int mlimit; /* setlimit, line 76 */
256
- int m1 = z->l - z->c; (void)m1;
257
- if (z->c < z->I[0]) return 0;
258
- z->c = z->I[0]; /* tomark, line 76 */
259
- mlimit = z->lb; z->lb = z->c;
260
- z->c = z->l - m1;
261
- z->ket = z->c; /* [, line 76 */
262
- if (out_grouping_b_U(z, g_v, 97, 248, 0)) { z->lb = mlimit; return 0; }
263
- z->bra = z->c; /* ], line 76 */
264
- z->S[0] = slice_to(z, z->S[0]); /* -> ch, line 76 */
265
- if (z->S[0] == 0) return -1; /* -> ch, line 76 */
266
- z->lb = mlimit;
247
+
248
+ { int mlimit1;
249
+ if (z->c < z->I[1]) return 0;
250
+ mlimit1 = z->lb; z->lb = z->I[1];
251
+ z->ket = z->c;
252
+ if (in_grouping_b_U(z, g_c, 98, 122, 0)) { z->lb = mlimit1; return 0; }
253
+ z->bra = z->c;
254
+ z->S[0] = slice_to(z, z->S[0]);
255
+ if (z->S[0] == 0) return -1;
256
+ z->lb = mlimit1;
267
257
  }
268
- if (!(eq_v_b(z, z->S[0]))) return 0; /* name ch, line 77 */
269
- { int ret = slice_del(z); /* delete, line 78 */
258
+ if (!(eq_v_b(z, z->S[0]))) return 0;
259
+ { int ret = slice_del(z);
270
260
  if (ret < 0) return ret;
271
261
  }
272
262
  return 1;
273
263
  }
274
264
 
275
265
  extern int danish_UTF_8_stem(struct SN_env * z) {
276
- { int c1 = z->c; /* do, line 84 */
266
+ { int c1 = z->c;
277
267
  { int ret = r_mark_regions(z);
278
- if (ret == 0) goto lab0; /* call mark_regions, line 84 */
279
268
  if (ret < 0) return ret;
280
269
  }
281
- lab0:
282
270
  z->c = c1;
283
271
  }
284
- z->lb = z->c; z->c = z->l; /* backwards, line 85 */
272
+ z->lb = z->c; z->c = z->l;
285
273
 
286
- { int m2 = z->l - z->c; (void)m2; /* do, line 86 */
274
+ { int m2 = z->l - z->c; (void)m2;
287
275
  { int ret = r_main_suffix(z);
288
- if (ret == 0) goto lab1; /* call main_suffix, line 86 */
289
276
  if (ret < 0) return ret;
290
277
  }
291
- lab1:
292
278
  z->c = z->l - m2;
293
279
  }
294
- { int m3 = z->l - z->c; (void)m3; /* do, line 87 */
280
+ { int m3 = z->l - z->c; (void)m3;
295
281
  { int ret = r_consonant_pair(z);
296
- if (ret == 0) goto lab2; /* call consonant_pair, line 87 */
297
282
  if (ret < 0) return ret;
298
283
  }
299
- lab2:
300
284
  z->c = z->l - m3;
301
285
  }
302
- { int m4 = z->l - z->c; (void)m4; /* do, line 88 */
286
+ { int m4 = z->l - z->c; (void)m4;
303
287
  { int ret = r_other_suffix(z);
304
- if (ret == 0) goto lab3; /* call other_suffix, line 88 */
305
288
  if (ret < 0) return ret;
306
289
  }
307
- lab3:
308
290
  z->c = z->l - m4;
309
291
  }
310
- { int m5 = z->l - z->c; (void)m5; /* do, line 89 */
292
+ { int m5 = z->l - z->c; (void)m5;
311
293
  { int ret = r_undouble(z);
312
- if (ret == 0) goto lab4; /* call undouble, line 89 */
313
294
  if (ret < 0) return ret;
314
295
  }
315
- lab4:
316
296
  z->c = z->l - m5;
317
297
  }
318
298
  z->c = z->lb;
319
299
  return 1;
320
300
  }
321
301
 
322
- extern struct SN_env * danish_UTF_8_create_env(void) { return SN_create_env(1, 2, 0); }
302
+ extern struct SN_env * danish_UTF_8_create_env(void) { return SN_create_env(1, 2); }
323
303
 
324
304
  extern void danish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 1); }
325
305
 
@@ -1,4 +1,4 @@
1
- /* This file was generated automatically by the Snowball to ANSI C compiler */
1
+ /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
2
 
3
3
  extern struct SN_env * danish_UTF_8_create_env(void);
4
4
  extern void danish_UTF_8_close_env(struct SN_env * z);