isomorfeus-ferret 0.12.7 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +101 -19
  3. data/README.md +54 -1
  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_dictionary.c +1 -1
  9. data/ext/isomorfeus_ferret_ext/brotli_dec_decode.c +1 -1
  10. data/ext/isomorfeus_ferret_ext/bzip_blocksort.c +1094 -0
  11. data/ext/isomorfeus_ferret_ext/bzip_huffman.c +205 -0
  12. data/ext/isomorfeus_ferret_ext/bzlib.c +1572 -0
  13. data/ext/isomorfeus_ferret_ext/bzlib.h +282 -0
  14. data/ext/isomorfeus_ferret_ext/bzlib_compress.c +672 -0
  15. data/ext/isomorfeus_ferret_ext/bzlib_crctable.c +104 -0
  16. data/ext/isomorfeus_ferret_ext/bzlib_decompress.c +652 -0
  17. data/ext/isomorfeus_ferret_ext/bzlib_private.h +509 -0
  18. data/ext/isomorfeus_ferret_ext/bzlib_randtable.c +84 -0
  19. data/ext/isomorfeus_ferret_ext/fio_tmpfile.h +53 -53
  20. data/ext/isomorfeus_ferret_ext/frb_analysis.c +785 -1192
  21. data/ext/isomorfeus_ferret_ext/frb_index.c +492 -474
  22. data/ext/isomorfeus_ferret_ext/frb_qparser.c +48 -60
  23. data/ext/isomorfeus_ferret_ext/frb_search.c +1520 -1002
  24. data/ext/isomorfeus_ferret_ext/frb_store.c +96 -96
  25. data/ext/isomorfeus_ferret_ext/frb_threading.h +0 -1
  26. data/ext/isomorfeus_ferret_ext/frb_utils.c +147 -196
  27. data/ext/isomorfeus_ferret_ext/frt_analysis.c +695 -1090
  28. data/ext/isomorfeus_ferret_ext/frt_analysis.h +174 -170
  29. data/ext/isomorfeus_ferret_ext/frt_array.c +2 -4
  30. data/ext/isomorfeus_ferret_ext/frt_bitvector.c +9 -16
  31. data/ext/isomorfeus_ferret_ext/frt_bitvector.h +32 -81
  32. data/ext/isomorfeus_ferret_ext/frt_document.c +15 -20
  33. data/ext/isomorfeus_ferret_ext/frt_document.h +10 -10
  34. data/ext/isomorfeus_ferret_ext/frt_except.c +5 -12
  35. data/ext/isomorfeus_ferret_ext/frt_field_index.c +3 -3
  36. data/ext/isomorfeus_ferret_ext/frt_field_index.h +6 -7
  37. data/ext/isomorfeus_ferret_ext/frt_filter.c +35 -46
  38. data/ext/isomorfeus_ferret_ext/frt_fs_store.c +1 -0
  39. data/ext/isomorfeus_ferret_ext/frt_global.c +105 -63
  40. data/ext/isomorfeus_ferret_ext/frt_global.h +7 -3
  41. data/ext/isomorfeus_ferret_ext/frt_hash.c +1 -2
  42. data/ext/isomorfeus_ferret_ext/frt_ind.c +32 -35
  43. data/ext/isomorfeus_ferret_ext/frt_ind.h +9 -9
  44. data/ext/isomorfeus_ferret_ext/frt_index.c +580 -399
  45. data/ext/isomorfeus_ferret_ext/frt_index.h +272 -291
  46. data/ext/isomorfeus_ferret_ext/frt_mempool.c +1 -2
  47. data/ext/isomorfeus_ferret_ext/frt_multimapper.c +4 -7
  48. data/ext/isomorfeus_ferret_ext/frt_q_boolean.c +67 -91
  49. data/ext/isomorfeus_ferret_ext/frt_q_const_score.c +35 -38
  50. data/ext/isomorfeus_ferret_ext/frt_q_filtered_query.c +53 -72
  51. data/ext/isomorfeus_ferret_ext/frt_q_fuzzy.c +25 -32
  52. data/ext/isomorfeus_ferret_ext/frt_q_match_all.c +21 -23
  53. data/ext/isomorfeus_ferret_ext/frt_q_multi_term.c +66 -103
  54. data/ext/isomorfeus_ferret_ext/frt_q_parser.c +207 -195
  55. data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +20 -16
  56. data/ext/isomorfeus_ferret_ext/frt_q_prefix.c +17 -14
  57. data/ext/isomorfeus_ferret_ext/frt_q_range.c +102 -131
  58. data/ext/isomorfeus_ferret_ext/frt_q_span.c +179 -178
  59. data/ext/isomorfeus_ferret_ext/frt_q_term.c +47 -60
  60. data/ext/isomorfeus_ferret_ext/frt_q_wildcard.c +18 -16
  61. data/ext/isomorfeus_ferret_ext/frt_ram_store.c +45 -84
  62. data/ext/isomorfeus_ferret_ext/frt_search.c +105 -146
  63. data/ext/isomorfeus_ferret_ext/frt_search.h +331 -320
  64. data/ext/isomorfeus_ferret_ext/frt_similarity.c +5 -13
  65. data/ext/isomorfeus_ferret_ext/frt_similarity.h +7 -12
  66. data/ext/isomorfeus_ferret_ext/frt_sort.c +105 -149
  67. data/ext/isomorfeus_ferret_ext/frt_store.c +13 -7
  68. data/ext/isomorfeus_ferret_ext/frt_store.h +10 -2
  69. data/ext/isomorfeus_ferret_ext/frt_threading.h +0 -1
  70. data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.c +21 -109
  71. data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.h +2 -32
  72. data/ext/isomorfeus_ferret_ext/lz4.c +2495 -0
  73. data/ext/isomorfeus_ferret_ext/lz4.h +774 -0
  74. data/ext/isomorfeus_ferret_ext/lz4frame.c +1899 -0
  75. data/ext/isomorfeus_ferret_ext/lz4frame.h +623 -0
  76. data/ext/isomorfeus_ferret_ext/lz4hc.c +1615 -0
  77. data/ext/isomorfeus_ferret_ext/lz4hc.h +413 -0
  78. data/ext/isomorfeus_ferret_ext/lz4xxhash.c +1030 -0
  79. data/ext/isomorfeus_ferret_ext/lz4xxhash.h +328 -0
  80. data/ext/isomorfeus_ferret_ext/stem_modules.h +0 -86
  81. data/ext/isomorfeus_ferret_ext/test.c +1 -2
  82. data/ext/isomorfeus_ferret_ext/test_1710.c +11 -12
  83. data/ext/isomorfeus_ferret_ext/test_analysis.c +590 -583
  84. data/ext/isomorfeus_ferret_ext/test_compound_io.c +1 -1
  85. data/ext/isomorfeus_ferret_ext/test_document.c +19 -15
  86. data/ext/isomorfeus_ferret_ext/test_except.c +1 -2
  87. data/ext/isomorfeus_ferret_ext/test_fields.c +59 -60
  88. data/ext/isomorfeus_ferret_ext/test_file_deleter.c +10 -27
  89. data/ext/isomorfeus_ferret_ext/test_filter.c +11 -8
  90. data/ext/isomorfeus_ferret_ext/test_hash.c +2 -2
  91. data/ext/isomorfeus_ferret_ext/test_hashset.c +1 -1
  92. data/ext/isomorfeus_ferret_ext/test_highlighter.c +15 -11
  93. data/ext/isomorfeus_ferret_ext/test_index.c +372 -365
  94. data/ext/isomorfeus_ferret_ext/test_q_const_score.c +5 -3
  95. data/ext/isomorfeus_ferret_ext/test_q_filtered.c +5 -3
  96. data/ext/isomorfeus_ferret_ext/test_q_fuzzy.c +13 -10
  97. data/ext/isomorfeus_ferret_ext/test_q_parser.c +45 -7
  98. data/ext/isomorfeus_ferret_ext/test_q_span.c +15 -12
  99. data/ext/isomorfeus_ferret_ext/test_ram_store.c +3 -3
  100. data/ext/isomorfeus_ferret_ext/test_search.c +60 -62
  101. data/ext/isomorfeus_ferret_ext/test_segments.c +5 -4
  102. data/ext/isomorfeus_ferret_ext/test_sort.c +17 -14
  103. data/ext/isomorfeus_ferret_ext/test_store.c +2 -0
  104. data/ext/isomorfeus_ferret_ext/test_term.c +3 -1
  105. data/ext/isomorfeus_ferret_ext/test_term_vectors.c +9 -10
  106. data/ext/isomorfeus_ferret_ext/test_test.c +1 -2
  107. data/ext/isomorfeus_ferret_ext/test_threading.c +9 -10
  108. data/ext/isomorfeus_ferret_ext/testhelper.c +1 -2
  109. data/lib/isomorfeus/ferret/version.rb +1 -1
  110. metadata +27 -57
  111. data/ext/isomorfeus_ferret_ext/email.rl +0 -21
  112. data/ext/isomorfeus_ferret_ext/frt_scanner.c +0 -900
  113. data/ext/isomorfeus_ferret_ext/frt_scanner.h +0 -28
  114. data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +0 -6706
  115. data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +0 -4420
  116. data/ext/isomorfeus_ferret_ext/scanner.h +0 -28
  117. data/ext/isomorfeus_ferret_ext/scanner.in +0 -43
  118. data/ext/isomorfeus_ferret_ext/scanner.rl +0 -84
  119. data/ext/isomorfeus_ferret_ext/scanner_mb.rl +0 -200
  120. data/ext/isomorfeus_ferret_ext/scanner_utf8.rl +0 -85
  121. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.c +0 -1167
  122. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.h +0 -6
  123. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.c +0 -1433
  124. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.h +0 -6
  125. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +0 -301
  126. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +0 -6
  127. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +0 -590
  128. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +0 -6
  129. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +0 -1049
  130. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +0 -6
  131. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +0 -705
  132. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +0 -6
  133. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +0 -1239
  134. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +0 -6
  135. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +0 -477
  136. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +0 -6
  137. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +0 -1217
  138. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.h +0 -7
  139. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.c +0 -394
  140. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.h +0 -6
  141. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.c +0 -457
  142. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.h +0 -6
  143. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +0 -1009
  144. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +0 -6
  145. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +0 -259
  146. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +0 -6
  147. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +0 -704
  148. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +0 -6
  149. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +0 -948
  150. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +0 -6
  151. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +0 -1028
  152. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +0 -6
  153. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +0 -275
  154. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +0 -6
  155. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.c +0 -849
  156. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.h +0 -6
  157. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +0 -952
  158. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +0 -6
  159. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +0 -669
  160. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +0 -6
  161. data/ext/isomorfeus_ferret_ext/stem_modules.txt +0 -63
  162. data/ext/isomorfeus_ferret_ext/uchar-ucs4.rl +0 -1854
  163. data/ext/isomorfeus_ferret_ext/uchar-utf8.rl +0 -1999
  164. 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 * 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);
@@ -1,275 +0,0 @@
1
- /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
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
- { 1, s_0_0, -1, 1, 0},
56
- { 4, s_0_1, 0, 1, 0},
57
- { 4, s_0_2, 0, 1, 0},
58
- { 7, s_0_3, 2, 1, 0},
59
- { 4, s_0_4, 0, 1, 0},
60
- { 2, s_0_5, -1, 1, 0},
61
- { 1, s_0_6, -1, 1, 0},
62
- { 3, s_0_7, 6, 1, 0},
63
- { 4, s_0_8, 6, 1, 0},
64
- { 4, s_0_9, 6, 1, 0},
65
- { 3, s_0_10, 6, 1, 0},
66
- { 4, s_0_11, 6, 1, 0},
67
- { 2, s_0_12, -1, 1, 0},
68
- { 5, s_0_13, 12, 1, 0},
69
- { 4, s_0_14, 12, 1, 0},
70
- { 5, s_0_15, 12, 1, 0},
71
- { 3, s_0_16, -1, 1, 0},
72
- { 2, s_0_17, -1, 1, 0},
73
- { 2, s_0_18, -1, 1, 0},
74
- { 5, s_0_19, 18, 1, 0},
75
- { 2, s_0_20, -1, 1, 0},
76
- { 1, s_0_21, -1, 2, 0},
77
- { 2, s_0_22, 21, 1, 0},
78
- { 5, s_0_23, 22, 1, 0},
79
- { 5, s_0_24, 22, 1, 0},
80
- { 5, s_0_25, 22, 1, 0},
81
- { 2, s_0_26, 21, 1, 0},
82
- { 4, s_0_27, 26, 1, 0},
83
- { 5, s_0_28, 26, 1, 0},
84
- { 3, s_0_29, 21, 1, 0},
85
- { 5, s_0_30, 29, 1, 0},
86
- { 6, s_0_31, 29, 1, 0},
87
- { 4, s_0_32, 21, 1, 0},
88
- { 2, s_0_33, -1, 1, 0},
89
- { 5, s_0_34, -1, 1, 0},
90
- { 3, s_0_35, -1, 1, 0},
91
- { 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
- { 2, s_1_0, -1, -1, 0},
105
- { 2, s_1_1, -1, -1, 0},
106
- { 2, s_1_2, -1, -1, 0},
107
- { 2, s_1_3, -1, -1, 0},
108
- { 2, s_1_4, -1, -1, 0},
109
- { 2, s_1_5, -1, -1, 0},
110
- { 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
- { 2, s_2_0, -1, 1, 0},
122
- { 3, s_2_1, 0, 1, 0},
123
- { 3, s_2_2, -1, 1, 0},
124
- { 5, s_2_3, -1, 3, 0},
125
- { 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[1] = z->l;
137
- { int c_test1 = z->c;
138
- z->c = z->c + 3;
139
- if (z->c > z->l) return 0;
140
- z->I[0] = z->c;
141
- z->c = c_test1;
142
- }
143
- if (out_grouping(z, g_v, 97, 246, 1) < 0) return 0;
144
- {
145
- int ret = in_grouping(z, g_v, 97, 246, 1);
146
- if (ret < 0) return 0;
147
- z->c += ret;
148
- }
149
- z->I[1] = z->c;
150
-
151
- if (!(z->I[1] < z->I[0])) goto lab0;
152
- z->I[1] = z->I[0];
153
- lab0:
154
- return 1;
155
- }
156
-
157
- static int r_main_suffix(struct SN_env * z) {
158
- int among_var;
159
-
160
- { int mlimit1;
161
- if (z->c < z->I[1]) return 0;
162
- mlimit1 = z->lb; z->lb = z->I[1];
163
- z->ket = z->c;
164
- if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851442 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
165
- among_var = find_among_b(z, a_0, 37);
166
- if (!(among_var)) { z->lb = mlimit1; return 0; }
167
- z->bra = z->c;
168
- z->lb = mlimit1;
169
- }
170
- switch (among_var) {
171
- case 1:
172
- { int ret = slice_del(z);
173
- if (ret < 0) return ret;
174
- }
175
- break;
176
- case 2:
177
- if (in_grouping_b(z, g_s_ending, 98, 121, 0)) return 0;
178
- { int ret = slice_del(z);
179
- if (ret < 0) return ret;
180
- }
181
- break;
182
- }
183
- return 1;
184
- }
185
-
186
- static int r_consonant_pair(struct SN_env * z) {
187
-
188
- { int mlimit1;
189
- if (z->c < z->I[1]) return 0;
190
- mlimit1 = z->lb; z->lb = z->I[1];
191
- { int m2 = z->l - z->c; (void)m2;
192
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1064976 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
193
- if (!(find_among_b(z, a_1, 7))) { z->lb = mlimit1; return 0; }
194
- z->c = z->l - m2;
195
- z->ket = z->c;
196
- if (z->c <= z->lb) { z->lb = mlimit1; return 0; }
197
- z->c--;
198
- z->bra = z->c;
199
- { int ret = slice_del(z);
200
- if (ret < 0) return ret;
201
- }
202
- }
203
- z->lb = mlimit1;
204
- }
205
- return 1;
206
- }
207
-
208
- static int r_other_suffix(struct SN_env * z) {
209
- int among_var;
210
-
211
- { int mlimit1;
212
- if (z->c < z->I[1]) return 0;
213
- mlimit1 = 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 = mlimit1; return 0; }
216
- among_var = find_among_b(z, a_2, 5);
217
- if (!(among_var)) { z->lb = mlimit1; return 0; }
218
- z->bra = z->c;
219
- switch (among_var) {
220
- case 1:
221
- { int ret = slice_del(z);
222
- if (ret < 0) return ret;
223
- }
224
- break;
225
- case 2:
226
- { int ret = slice_from_s(z, 3, s_0);
227
- if (ret < 0) return ret;
228
- }
229
- break;
230
- case 3:
231
- { int ret = slice_from_s(z, 4, s_1);
232
- if (ret < 0) return ret;
233
- }
234
- break;
235
- }
236
- z->lb = mlimit1;
237
- }
238
- return 1;
239
- }
240
-
241
- extern int swedish_ISO_8859_1_stem(struct SN_env * z) {
242
- { int c1 = z->c;
243
- { int ret = r_mark_regions(z);
244
- if (ret < 0) return ret;
245
- }
246
- z->c = c1;
247
- }
248
- z->lb = z->c; z->c = z->l;
249
-
250
- { int m2 = z->l - z->c; (void)m2;
251
- { int ret = r_main_suffix(z);
252
- if (ret < 0) return ret;
253
- }
254
- z->c = z->l - m2;
255
- }
256
- { int m3 = z->l - z->c; (void)m3;
257
- { int ret = r_consonant_pair(z);
258
- if (ret < 0) return ret;
259
- }
260
- z->c = z->l - m3;
261
- }
262
- { int m4 = z->l - z->c; (void)m4;
263
- { int ret = r_other_suffix(z);
264
- if (ret < 0) return ret;
265
- }
266
- z->c = z->l - m4;
267
- }
268
- z->c = z->lb;
269
- return 1;
270
- }
271
-
272
- extern struct SN_env * swedish_ISO_8859_1_create_env(void) { return SN_create_env(0, 2); }
273
-
274
- extern void swedish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
275
-
@@ -1,6 +0,0 @@
1
- /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
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);