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,704 +0,0 @@
1
- /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
-
3
- #include "stem_header.h"
4
-
5
- extern int porter_ISO_8859_1_stem(struct SN_env * z);
6
-
7
- static int r_Step_5b(struct SN_env * z);
8
- static int r_Step_5a(struct SN_env * z);
9
- static int r_Step_4(struct SN_env * z);
10
- static int r_Step_3(struct SN_env * z);
11
- static int r_Step_2(struct SN_env * z);
12
- static int r_Step_1c(struct SN_env * z);
13
- static int r_Step_1b(struct SN_env * z);
14
- static int r_Step_1a(struct SN_env * z);
15
- static int r_R2(struct SN_env * z);
16
- static int r_R1(struct SN_env * z);
17
- static int r_shortv(struct SN_env * z);
18
-
19
- extern struct SN_env * porter_ISO_8859_1_create_env(void);
20
- extern void porter_ISO_8859_1_close_env(struct SN_env * z);
21
-
22
- static const symbol s_0_0[1] = { 's' };
23
- static const symbol s_0_1[3] = { 'i', 'e', 's' };
24
- static const symbol s_0_2[4] = { 's', 's', 'e', 's' };
25
- static const symbol s_0_3[2] = { 's', 's' };
26
-
27
- static const struct among a_0[4] =
28
- {
29
- { 1, s_0_0, -1, 3, 0},
30
- { 3, s_0_1, 0, 2, 0},
31
- { 4, s_0_2, 0, 1, 0},
32
- { 2, s_0_3, 0, -1, 0}
33
- };
34
-
35
- static const symbol s_1_1[2] = { 'b', 'b' };
36
- static const symbol s_1_2[2] = { 'd', 'd' };
37
- static const symbol s_1_3[2] = { 'f', 'f' };
38
- static const symbol s_1_4[2] = { 'g', 'g' };
39
- static const symbol s_1_5[2] = { 'b', 'l' };
40
- static const symbol s_1_6[2] = { 'm', 'm' };
41
- static const symbol s_1_7[2] = { 'n', 'n' };
42
- static const symbol s_1_8[2] = { 'p', 'p' };
43
- static const symbol s_1_9[2] = { 'r', 'r' };
44
- static const symbol s_1_10[2] = { 'a', 't' };
45
- static const symbol s_1_11[2] = { 't', 't' };
46
- static const symbol s_1_12[2] = { 'i', 'z' };
47
-
48
- static const struct among a_1[13] =
49
- {
50
- { 0, 0, -1, 3, 0},
51
- { 2, s_1_1, 0, 2, 0},
52
- { 2, s_1_2, 0, 2, 0},
53
- { 2, s_1_3, 0, 2, 0},
54
- { 2, s_1_4, 0, 2, 0},
55
- { 2, s_1_5, 0, 1, 0},
56
- { 2, s_1_6, 0, 2, 0},
57
- { 2, s_1_7, 0, 2, 0},
58
- { 2, s_1_8, 0, 2, 0},
59
- { 2, s_1_9, 0, 2, 0},
60
- { 2, s_1_10, 0, 1, 0},
61
- { 2, s_1_11, 0, 2, 0},
62
- { 2, s_1_12, 0, 1, 0}
63
- };
64
-
65
- static const symbol s_2_0[2] = { 'e', 'd' };
66
- static const symbol s_2_1[3] = { 'e', 'e', 'd' };
67
- static const symbol s_2_2[3] = { 'i', 'n', 'g' };
68
-
69
- static const struct among a_2[3] =
70
- {
71
- { 2, s_2_0, -1, 2, 0},
72
- { 3, s_2_1, 0, 1, 0},
73
- { 3, s_2_2, -1, 2, 0}
74
- };
75
-
76
- static const symbol s_3_0[4] = { 'a', 'n', 'c', 'i' };
77
- static const symbol s_3_1[4] = { 'e', 'n', 'c', 'i' };
78
- static const symbol s_3_2[4] = { 'a', 'b', 'l', 'i' };
79
- static const symbol s_3_3[3] = { 'e', 'l', 'i' };
80
- static const symbol s_3_4[4] = { 'a', 'l', 'l', 'i' };
81
- static const symbol s_3_5[5] = { 'o', 'u', 's', 'l', 'i' };
82
- static const symbol s_3_6[5] = { 'e', 'n', 't', 'l', 'i' };
83
- static const symbol s_3_7[5] = { 'a', 'l', 'i', 't', 'i' };
84
- static const symbol s_3_8[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
85
- static const symbol s_3_9[5] = { 'i', 'v', 'i', 't', 'i' };
86
- static const symbol s_3_10[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
87
- static const symbol s_3_11[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
88
- static const symbol s_3_12[5] = { 'a', 'l', 'i', 's', 'm' };
89
- static const symbol s_3_13[5] = { 'a', 't', 'i', 'o', 'n' };
90
- static const symbol s_3_14[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
91
- static const symbol s_3_15[4] = { 'i', 'z', 'e', 'r' };
92
- static const symbol s_3_16[4] = { 'a', 't', 'o', 'r' };
93
- static const symbol s_3_17[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
94
- static const symbol s_3_18[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
95
- static const symbol s_3_19[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
96
-
97
- static const struct among a_3[20] =
98
- {
99
- { 4, s_3_0, -1, 3, 0},
100
- { 4, s_3_1, -1, 2, 0},
101
- { 4, s_3_2, -1, 4, 0},
102
- { 3, s_3_3, -1, 6, 0},
103
- { 4, s_3_4, -1, 9, 0},
104
- { 5, s_3_5, -1, 11, 0},
105
- { 5, s_3_6, -1, 5, 0},
106
- { 5, s_3_7, -1, 9, 0},
107
- { 6, s_3_8, -1, 13, 0},
108
- { 5, s_3_9, -1, 12, 0},
109
- { 6, s_3_10, -1, 1, 0},
110
- { 7, s_3_11, 10, 8, 0},
111
- { 5, s_3_12, -1, 9, 0},
112
- { 5, s_3_13, -1, 8, 0},
113
- { 7, s_3_14, 13, 7, 0},
114
- { 4, s_3_15, -1, 7, 0},
115
- { 4, s_3_16, -1, 8, 0},
116
- { 7, s_3_17, -1, 12, 0},
117
- { 7, s_3_18, -1, 10, 0},
118
- { 7, s_3_19, -1, 11, 0}
119
- };
120
-
121
- static const symbol s_4_0[5] = { 'i', 'c', 'a', 't', 'e' };
122
- static const symbol s_4_1[5] = { 'a', 't', 'i', 'v', 'e' };
123
- static const symbol s_4_2[5] = { 'a', 'l', 'i', 'z', 'e' };
124
- static const symbol s_4_3[5] = { 'i', 'c', 'i', 't', 'i' };
125
- static const symbol s_4_4[4] = { 'i', 'c', 'a', 'l' };
126
- static const symbol s_4_5[3] = { 'f', 'u', 'l' };
127
- static const symbol s_4_6[4] = { 'n', 'e', 's', 's' };
128
-
129
- static const struct among a_4[7] =
130
- {
131
- { 5, s_4_0, -1, 2, 0},
132
- { 5, s_4_1, -1, 3, 0},
133
- { 5, s_4_2, -1, 1, 0},
134
- { 5, s_4_3, -1, 2, 0},
135
- { 4, s_4_4, -1, 2, 0},
136
- { 3, s_4_5, -1, 3, 0},
137
- { 4, s_4_6, -1, 3, 0}
138
- };
139
-
140
- static const symbol s_5_0[2] = { 'i', 'c' };
141
- static const symbol s_5_1[4] = { 'a', 'n', 'c', 'e' };
142
- static const symbol s_5_2[4] = { 'e', 'n', 'c', 'e' };
143
- static const symbol s_5_3[4] = { 'a', 'b', 'l', 'e' };
144
- static const symbol s_5_4[4] = { 'i', 'b', 'l', 'e' };
145
- static const symbol s_5_5[3] = { 'a', 't', 'e' };
146
- static const symbol s_5_6[3] = { 'i', 'v', 'e' };
147
- static const symbol s_5_7[3] = { 'i', 'z', 'e' };
148
- static const symbol s_5_8[3] = { 'i', 't', 'i' };
149
- static const symbol s_5_9[2] = { 'a', 'l' };
150
- static const symbol s_5_10[3] = { 'i', 's', 'm' };
151
- static const symbol s_5_11[3] = { 'i', 'o', 'n' };
152
- static const symbol s_5_12[2] = { 'e', 'r' };
153
- static const symbol s_5_13[3] = { 'o', 'u', 's' };
154
- static const symbol s_5_14[3] = { 'a', 'n', 't' };
155
- static const symbol s_5_15[3] = { 'e', 'n', 't' };
156
- static const symbol s_5_16[4] = { 'm', 'e', 'n', 't' };
157
- static const symbol s_5_17[5] = { 'e', 'm', 'e', 'n', 't' };
158
- static const symbol s_5_18[2] = { 'o', 'u' };
159
-
160
- static const struct among a_5[19] =
161
- {
162
- { 2, s_5_0, -1, 1, 0},
163
- { 4, s_5_1, -1, 1, 0},
164
- { 4, s_5_2, -1, 1, 0},
165
- { 4, s_5_3, -1, 1, 0},
166
- { 4, s_5_4, -1, 1, 0},
167
- { 3, s_5_5, -1, 1, 0},
168
- { 3, s_5_6, -1, 1, 0},
169
- { 3, s_5_7, -1, 1, 0},
170
- { 3, s_5_8, -1, 1, 0},
171
- { 2, s_5_9, -1, 1, 0},
172
- { 3, s_5_10, -1, 1, 0},
173
- { 3, s_5_11, -1, 2, 0},
174
- { 2, s_5_12, -1, 1, 0},
175
- { 3, s_5_13, -1, 1, 0},
176
- { 3, s_5_14, -1, 1, 0},
177
- { 3, s_5_15, -1, 1, 0},
178
- { 4, s_5_16, 15, 1, 0},
179
- { 5, s_5_17, 16, 1, 0},
180
- { 2, s_5_18, -1, 1, 0}
181
- };
182
-
183
- static const unsigned char g_v[] = { 17, 65, 16, 1 };
184
-
185
- static const unsigned char g_v_WXY[] = { 1, 17, 65, 208, 1 };
186
-
187
- static const symbol s_0[] = { 's', 's' };
188
- static const symbol s_1[] = { 'i' };
189
- static const symbol s_2[] = { 'e', 'e' };
190
- static const symbol s_3[] = { 'e' };
191
- static const symbol s_4[] = { 'e' };
192
- static const symbol s_5[] = { 'i' };
193
- static const symbol s_6[] = { 't', 'i', 'o', 'n' };
194
- static const symbol s_7[] = { 'e', 'n', 'c', 'e' };
195
- static const symbol s_8[] = { 'a', 'n', 'c', 'e' };
196
- static const symbol s_9[] = { 'a', 'b', 'l', 'e' };
197
- static const symbol s_10[] = { 'e', 'n', 't' };
198
- static const symbol s_11[] = { 'e' };
199
- static const symbol s_12[] = { 'i', 'z', 'e' };
200
- static const symbol s_13[] = { 'a', 't', 'e' };
201
- static const symbol s_14[] = { 'a', 'l' };
202
- static const symbol s_15[] = { 'f', 'u', 'l' };
203
- static const symbol s_16[] = { 'o', 'u', 's' };
204
- static const symbol s_17[] = { 'i', 'v', 'e' };
205
- static const symbol s_18[] = { 'b', 'l', 'e' };
206
- static const symbol s_19[] = { 'a', 'l' };
207
- static const symbol s_20[] = { 'i', 'c' };
208
- static const symbol s_21[] = { 'Y' };
209
- static const symbol s_22[] = { 'Y' };
210
- static const symbol s_23[] = { 'y' };
211
-
212
- static int r_shortv(struct SN_env * z) {
213
- if (out_grouping_b(z, g_v_WXY, 89, 121, 0)) return 0;
214
- if (in_grouping_b(z, g_v, 97, 121, 0)) return 0;
215
- if (out_grouping_b(z, g_v, 97, 121, 0)) return 0;
216
- return 1;
217
- }
218
-
219
- static int r_R1(struct SN_env * z) {
220
- if (!(z->I[1] <= z->c)) return 0;
221
- return 1;
222
- }
223
-
224
- static int r_R2(struct SN_env * z) {
225
- if (!(z->I[0] <= z->c)) return 0;
226
- return 1;
227
- }
228
-
229
- static int r_Step_1a(struct SN_env * z) {
230
- int among_var;
231
- z->ket = z->c;
232
- if (z->c <= z->lb || z->p[z->c - 1] != 115) return 0;
233
- among_var = find_among_b(z, a_0, 4);
234
- if (!(among_var)) return 0;
235
- z->bra = z->c;
236
- switch (among_var) {
237
- case 1:
238
- { int ret = slice_from_s(z, 2, s_0);
239
- if (ret < 0) return ret;
240
- }
241
- break;
242
- case 2:
243
- { int ret = slice_from_s(z, 1, s_1);
244
- if (ret < 0) return ret;
245
- }
246
- break;
247
- case 3:
248
- { int ret = slice_del(z);
249
- if (ret < 0) return ret;
250
- }
251
- break;
252
- }
253
- return 1;
254
- }
255
-
256
- static int r_Step_1b(struct SN_env * z) {
257
- int among_var;
258
- z->ket = z->c;
259
- if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 103)) return 0;
260
- among_var = find_among_b(z, a_2, 3);
261
- if (!(among_var)) return 0;
262
- z->bra = z->c;
263
- switch (among_var) {
264
- case 1:
265
- { int ret = r_R1(z);
266
- if (ret <= 0) return ret;
267
- }
268
- { int ret = slice_from_s(z, 2, s_2);
269
- if (ret < 0) return ret;
270
- }
271
- break;
272
- case 2:
273
- { int m_test1 = z->l - z->c;
274
- {
275
- int ret = out_grouping_b(z, g_v, 97, 121, 1);
276
- if (ret < 0) return 0;
277
- z->c -= ret;
278
- }
279
- z->c = z->l - m_test1;
280
- }
281
- { int ret = slice_del(z);
282
- if (ret < 0) return ret;
283
- }
284
- { int m_test2 = z->l - z->c;
285
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((68514004 >> (z->p[z->c - 1] & 0x1f)) & 1)) among_var = 3; else
286
- among_var = find_among_b(z, a_1, 13);
287
- if (!(among_var)) return 0;
288
- z->c = z->l - m_test2;
289
- }
290
- switch (among_var) {
291
- case 1:
292
- { int ret;
293
- { int saved_c = z->c;
294
- ret = insert_s(z, z->c, z->c, 1, s_3);
295
- z->c = saved_c;
296
- }
297
- if (ret < 0) return ret;
298
- }
299
- break;
300
- case 2:
301
- z->ket = z->c;
302
- if (z->c <= z->lb) return 0;
303
- z->c--;
304
- z->bra = z->c;
305
- { int ret = slice_del(z);
306
- if (ret < 0) return ret;
307
- }
308
- break;
309
- case 3:
310
- if (z->c != z->I[1]) return 0;
311
- { int m_test3 = z->l - z->c;
312
- { int ret = r_shortv(z);
313
- if (ret <= 0) return ret;
314
- }
315
- z->c = z->l - m_test3;
316
- }
317
- { int ret;
318
- { int saved_c = z->c;
319
- ret = insert_s(z, z->c, z->c, 1, s_4);
320
- z->c = saved_c;
321
- }
322
- if (ret < 0) return ret;
323
- }
324
- break;
325
- }
326
- break;
327
- }
328
- return 1;
329
- }
330
-
331
- static int r_Step_1c(struct SN_env * z) {
332
- z->ket = z->c;
333
- { int m1 = z->l - z->c; (void)m1;
334
- if (z->c <= z->lb || z->p[z->c - 1] != 'y') goto lab1;
335
- z->c--;
336
- goto lab0;
337
- lab1:
338
- z->c = z->l - m1;
339
- if (z->c <= z->lb || z->p[z->c - 1] != 'Y') return 0;
340
- z->c--;
341
- }
342
- lab0:
343
- z->bra = z->c;
344
- {
345
- int ret = out_grouping_b(z, g_v, 97, 121, 1);
346
- if (ret < 0) return 0;
347
- z->c -= ret;
348
- }
349
- { int ret = slice_from_s(z, 1, s_5);
350
- if (ret < 0) return ret;
351
- }
352
- return 1;
353
- }
354
-
355
- static int r_Step_2(struct SN_env * z) {
356
- int among_var;
357
- z->ket = z->c;
358
- if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((815616 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
359
- among_var = find_among_b(z, a_3, 20);
360
- if (!(among_var)) return 0;
361
- z->bra = z->c;
362
- { int ret = r_R1(z);
363
- if (ret <= 0) return ret;
364
- }
365
- switch (among_var) {
366
- case 1:
367
- { int ret = slice_from_s(z, 4, s_6);
368
- if (ret < 0) return ret;
369
- }
370
- break;
371
- case 2:
372
- { int ret = slice_from_s(z, 4, s_7);
373
- if (ret < 0) return ret;
374
- }
375
- break;
376
- case 3:
377
- { int ret = slice_from_s(z, 4, s_8);
378
- if (ret < 0) return ret;
379
- }
380
- break;
381
- case 4:
382
- { int ret = slice_from_s(z, 4, s_9);
383
- if (ret < 0) return ret;
384
- }
385
- break;
386
- case 5:
387
- { int ret = slice_from_s(z, 3, s_10);
388
- if (ret < 0) return ret;
389
- }
390
- break;
391
- case 6:
392
- { int ret = slice_from_s(z, 1, s_11);
393
- if (ret < 0) return ret;
394
- }
395
- break;
396
- case 7:
397
- { int ret = slice_from_s(z, 3, s_12);
398
- if (ret < 0) return ret;
399
- }
400
- break;
401
- case 8:
402
- { int ret = slice_from_s(z, 3, s_13);
403
- if (ret < 0) return ret;
404
- }
405
- break;
406
- case 9:
407
- { int ret = slice_from_s(z, 2, s_14);
408
- if (ret < 0) return ret;
409
- }
410
- break;
411
- case 10:
412
- { int ret = slice_from_s(z, 3, s_15);
413
- if (ret < 0) return ret;
414
- }
415
- break;
416
- case 11:
417
- { int ret = slice_from_s(z, 3, s_16);
418
- if (ret < 0) return ret;
419
- }
420
- break;
421
- case 12:
422
- { int ret = slice_from_s(z, 3, s_17);
423
- if (ret < 0) return ret;
424
- }
425
- break;
426
- case 13:
427
- { int ret = slice_from_s(z, 3, s_18);
428
- if (ret < 0) return ret;
429
- }
430
- break;
431
- }
432
- return 1;
433
- }
434
-
435
- static int r_Step_3(struct SN_env * z) {
436
- int among_var;
437
- z->ket = z->c;
438
- if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((528928 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
439
- among_var = find_among_b(z, a_4, 7);
440
- if (!(among_var)) return 0;
441
- z->bra = z->c;
442
- { int ret = r_R1(z);
443
- if (ret <= 0) return ret;
444
- }
445
- switch (among_var) {
446
- case 1:
447
- { int ret = slice_from_s(z, 2, s_19);
448
- if (ret < 0) return ret;
449
- }
450
- break;
451
- case 2:
452
- { int ret = slice_from_s(z, 2, s_20);
453
- if (ret < 0) return ret;
454
- }
455
- break;
456
- case 3:
457
- { int ret = slice_del(z);
458
- if (ret < 0) return ret;
459
- }
460
- break;
461
- }
462
- return 1;
463
- }
464
-
465
- static int r_Step_4(struct SN_env * z) {
466
- int among_var;
467
- z->ket = z->c;
468
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((3961384 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
469
- among_var = find_among_b(z, a_5, 19);
470
- if (!(among_var)) return 0;
471
- z->bra = z->c;
472
- { int ret = r_R2(z);
473
- if (ret <= 0) return ret;
474
- }
475
- switch (among_var) {
476
- case 1:
477
- { int ret = slice_del(z);
478
- if (ret < 0) return ret;
479
- }
480
- break;
481
- case 2:
482
- { int m1 = z->l - z->c; (void)m1;
483
- if (z->c <= z->lb || z->p[z->c - 1] != 's') goto lab1;
484
- z->c--;
485
- goto lab0;
486
- lab1:
487
- z->c = z->l - m1;
488
- if (z->c <= z->lb || z->p[z->c - 1] != 't') return 0;
489
- z->c--;
490
- }
491
- lab0:
492
- { int ret = slice_del(z);
493
- if (ret < 0) return ret;
494
- }
495
- break;
496
- }
497
- return 1;
498
- }
499
-
500
- static int r_Step_5a(struct SN_env * z) {
501
- z->ket = z->c;
502
- if (z->c <= z->lb || z->p[z->c - 1] != 'e') return 0;
503
- z->c--;
504
- z->bra = z->c;
505
- { int m1 = z->l - z->c; (void)m1;
506
- { int ret = r_R2(z);
507
- if (ret == 0) goto lab1;
508
- if (ret < 0) return ret;
509
- }
510
- goto lab0;
511
- lab1:
512
- z->c = z->l - m1;
513
- { int ret = r_R1(z);
514
- if (ret <= 0) return ret;
515
- }
516
- { int m2 = z->l - z->c; (void)m2;
517
- { int ret = r_shortv(z);
518
- if (ret == 0) goto lab2;
519
- if (ret < 0) return ret;
520
- }
521
- return 0;
522
- lab2:
523
- z->c = z->l - m2;
524
- }
525
- }
526
- lab0:
527
- { int ret = slice_del(z);
528
- if (ret < 0) return ret;
529
- }
530
- return 1;
531
- }
532
-
533
- static int r_Step_5b(struct SN_env * z) {
534
- z->ket = z->c;
535
- if (z->c <= z->lb || z->p[z->c - 1] != 'l') return 0;
536
- z->c--;
537
- z->bra = z->c;
538
- { int ret = r_R2(z);
539
- if (ret <= 0) return ret;
540
- }
541
- if (z->c <= z->lb || z->p[z->c - 1] != 'l') return 0;
542
- z->c--;
543
- { int ret = slice_del(z);
544
- if (ret < 0) return ret;
545
- }
546
- return 1;
547
- }
548
-
549
- extern int porter_ISO_8859_1_stem(struct SN_env * z) {
550
- z->I[2] = 0;
551
- { int c1 = z->c;
552
- z->bra = z->c;
553
- if (z->c == z->l || z->p[z->c] != 'y') goto lab0;
554
- z->c++;
555
- z->ket = z->c;
556
- { int ret = slice_from_s(z, 1, s_21);
557
- if (ret < 0) return ret;
558
- }
559
- z->I[2] = 1;
560
- lab0:
561
- z->c = c1;
562
- }
563
- { int c2 = z->c;
564
- while(1) {
565
- int c3 = z->c;
566
- while(1) {
567
- int c4 = z->c;
568
- if (in_grouping(z, g_v, 97, 121, 0)) goto lab3;
569
- z->bra = z->c;
570
- if (z->c == z->l || z->p[z->c] != 'y') goto lab3;
571
- z->c++;
572
- z->ket = z->c;
573
- z->c = c4;
574
- break;
575
- lab3:
576
- z->c = c4;
577
- if (z->c >= z->l) goto lab2;
578
- z->c++;
579
- }
580
- { int ret = slice_from_s(z, 1, s_22);
581
- if (ret < 0) return ret;
582
- }
583
- z->I[2] = 1;
584
- continue;
585
- lab2:
586
- z->c = c3;
587
- break;
588
- }
589
- z->c = c2;
590
- }
591
- z->I[1] = z->l;
592
- z->I[0] = z->l;
593
- { int c5 = z->c;
594
- {
595
- int ret = out_grouping(z, g_v, 97, 121, 1);
596
- if (ret < 0) goto lab4;
597
- z->c += ret;
598
- }
599
- {
600
- int ret = in_grouping(z, g_v, 97, 121, 1);
601
- if (ret < 0) goto lab4;
602
- z->c += ret;
603
- }
604
- z->I[1] = z->c;
605
- {
606
- int ret = out_grouping(z, g_v, 97, 121, 1);
607
- if (ret < 0) goto lab4;
608
- z->c += ret;
609
- }
610
- {
611
- int ret = in_grouping(z, g_v, 97, 121, 1);
612
- if (ret < 0) goto lab4;
613
- z->c += ret;
614
- }
615
- z->I[0] = z->c;
616
- lab4:
617
- z->c = c5;
618
- }
619
- z->lb = z->c; z->c = z->l;
620
-
621
- { int m6 = z->l - z->c; (void)m6;
622
- { int ret = r_Step_1a(z);
623
- if (ret < 0) return ret;
624
- }
625
- z->c = z->l - m6;
626
- }
627
- { int m7 = z->l - z->c; (void)m7;
628
- { int ret = r_Step_1b(z);
629
- if (ret < 0) return ret;
630
- }
631
- z->c = z->l - m7;
632
- }
633
- { int m8 = z->l - z->c; (void)m8;
634
- { int ret = r_Step_1c(z);
635
- if (ret < 0) return ret;
636
- }
637
- z->c = z->l - m8;
638
- }
639
- { int m9 = z->l - z->c; (void)m9;
640
- { int ret = r_Step_2(z);
641
- if (ret < 0) return ret;
642
- }
643
- z->c = z->l - m9;
644
- }
645
- { int m10 = z->l - z->c; (void)m10;
646
- { int ret = r_Step_3(z);
647
- if (ret < 0) return ret;
648
- }
649
- z->c = z->l - m10;
650
- }
651
- { int m11 = z->l - z->c; (void)m11;
652
- { int ret = r_Step_4(z);
653
- if (ret < 0) return ret;
654
- }
655
- z->c = z->l - m11;
656
- }
657
- { int m12 = z->l - z->c; (void)m12;
658
- { int ret = r_Step_5a(z);
659
- if (ret < 0) return ret;
660
- }
661
- z->c = z->l - m12;
662
- }
663
- { int m13 = z->l - z->c; (void)m13;
664
- { int ret = r_Step_5b(z);
665
- if (ret < 0) return ret;
666
- }
667
- z->c = z->l - m13;
668
- }
669
- z->c = z->lb;
670
- { int c14 = z->c;
671
- if (!(z->I[2])) goto lab5;
672
- while(1) {
673
- int c15 = z->c;
674
- while(1) {
675
- int c16 = z->c;
676
- z->bra = z->c;
677
- if (z->c == z->l || z->p[z->c] != 'Y') goto lab7;
678
- z->c++;
679
- z->ket = z->c;
680
- z->c = c16;
681
- break;
682
- lab7:
683
- z->c = c16;
684
- if (z->c >= z->l) goto lab6;
685
- z->c++;
686
- }
687
- { int ret = slice_from_s(z, 1, s_23);
688
- if (ret < 0) return ret;
689
- }
690
- continue;
691
- lab6:
692
- z->c = c15;
693
- break;
694
- }
695
- lab5:
696
- z->c = c14;
697
- }
698
- return 1;
699
- }
700
-
701
- extern struct SN_env * porter_ISO_8859_1_create_env(void) { return SN_create_env(0, 3); }
702
-
703
- extern void porter_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
704
-
@@ -1,6 +0,0 @@
1
- /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
-
3
- extern struct SN_env * porter_ISO_8859_1_create_env(void);
4
- extern void porter_ISO_8859_1_close_env(struct SN_env * z);
5
-
6
- extern int porter_ISO_8859_1_stem(struct SN_env * z);