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