isomorfeus-ferret 0.12.7 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
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 * english_ISO_8859_1_create_env(void);
4
- extern void english_ISO_8859_1_close_env(struct SN_env * z);
5
-
6
- extern int english_ISO_8859_1_stem(struct SN_env * z);
@@ -1,705 +0,0 @@
1
- /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
-
3
- #include "stem_header.h"
4
-
5
- extern int finnish_ISO_8859_1_stem(struct SN_env * z);
6
-
7
- static int r_tidy(struct SN_env * z);
8
- static int r_other_endings(struct SN_env * z);
9
- static int r_t_plural(struct SN_env * z);
10
- static int r_i_plural(struct SN_env * z);
11
- static int r_case_ending(struct SN_env * z);
12
- static int r_VI(struct SN_env * z);
13
- static int r_LONG(struct SN_env * z);
14
- static int r_possessive(struct SN_env * z);
15
- static int r_particle_etc(struct SN_env * z);
16
- static int r_R2(struct SN_env * z);
17
- static int r_mark_regions(struct SN_env * z);
18
-
19
- extern struct SN_env * finnish_ISO_8859_1_create_env(void);
20
- extern void finnish_ISO_8859_1_close_env(struct SN_env * z);
21
-
22
- static const symbol s_0_0[2] = { 'p', 'a' };
23
- static const symbol s_0_1[3] = { 's', 't', 'i' };
24
- static const symbol s_0_2[4] = { 'k', 'a', 'a', 'n' };
25
- static const symbol s_0_3[3] = { 'h', 'a', 'n' };
26
- static const symbol s_0_4[3] = { 'k', 'i', 'n' };
27
- static const symbol s_0_5[3] = { 'h', 0xE4, 'n' };
28
- static const symbol s_0_6[4] = { 'k', 0xE4, 0xE4, 'n' };
29
- static const symbol s_0_7[2] = { 'k', 'o' };
30
- static const symbol s_0_8[2] = { 'p', 0xE4 };
31
- static const symbol s_0_9[2] = { 'k', 0xF6 };
32
-
33
- static const struct among a_0[10] =
34
- {
35
- { 2, s_0_0, -1, 1, 0},
36
- { 3, s_0_1, -1, 2, 0},
37
- { 4, s_0_2, -1, 1, 0},
38
- { 3, s_0_3, -1, 1, 0},
39
- { 3, s_0_4, -1, 1, 0},
40
- { 3, s_0_5, -1, 1, 0},
41
- { 4, s_0_6, -1, 1, 0},
42
- { 2, s_0_7, -1, 1, 0},
43
- { 2, s_0_8, -1, 1, 0},
44
- { 2, s_0_9, -1, 1, 0}
45
- };
46
-
47
- static const symbol s_1_0[3] = { 'l', 'l', 'a' };
48
- static const symbol s_1_1[2] = { 'n', 'a' };
49
- static const symbol s_1_2[3] = { 's', 's', 'a' };
50
- static const symbol s_1_3[2] = { 't', 'a' };
51
- static const symbol s_1_4[3] = { 'l', 't', 'a' };
52
- static const symbol s_1_5[3] = { 's', 't', 'a' };
53
-
54
- static const struct among a_1[6] =
55
- {
56
- { 3, s_1_0, -1, -1, 0},
57
- { 2, s_1_1, -1, -1, 0},
58
- { 3, s_1_2, -1, -1, 0},
59
- { 2, s_1_3, -1, -1, 0},
60
- { 3, s_1_4, 3, -1, 0},
61
- { 3, s_1_5, 3, -1, 0}
62
- };
63
-
64
- static const symbol s_2_0[3] = { 'l', 'l', 0xE4 };
65
- static const symbol s_2_1[2] = { 'n', 0xE4 };
66
- static const symbol s_2_2[3] = { 's', 's', 0xE4 };
67
- static const symbol s_2_3[2] = { 't', 0xE4 };
68
- static const symbol s_2_4[3] = { 'l', 't', 0xE4 };
69
- static const symbol s_2_5[3] = { 's', 't', 0xE4 };
70
-
71
- static const struct among a_2[6] =
72
- {
73
- { 3, s_2_0, -1, -1, 0},
74
- { 2, s_2_1, -1, -1, 0},
75
- { 3, s_2_2, -1, -1, 0},
76
- { 2, s_2_3, -1, -1, 0},
77
- { 3, s_2_4, 3, -1, 0},
78
- { 3, s_2_5, 3, -1, 0}
79
- };
80
-
81
- static const symbol s_3_0[3] = { 'l', 'l', 'e' };
82
- static const symbol s_3_1[3] = { 'i', 'n', 'e' };
83
-
84
- static const struct among a_3[2] =
85
- {
86
- { 3, s_3_0, -1, -1, 0},
87
- { 3, s_3_1, -1, -1, 0}
88
- };
89
-
90
- static const symbol s_4_0[3] = { 'n', 's', 'a' };
91
- static const symbol s_4_1[3] = { 'm', 'm', 'e' };
92
- static const symbol s_4_2[3] = { 'n', 'n', 'e' };
93
- static const symbol s_4_3[2] = { 'n', 'i' };
94
- static const symbol s_4_4[2] = { 's', 'i' };
95
- static const symbol s_4_5[2] = { 'a', 'n' };
96
- static const symbol s_4_6[2] = { 'e', 'n' };
97
- static const symbol s_4_7[2] = { 0xE4, 'n' };
98
- static const symbol s_4_8[3] = { 'n', 's', 0xE4 };
99
-
100
- static const struct among a_4[9] =
101
- {
102
- { 3, s_4_0, -1, 3, 0},
103
- { 3, s_4_1, -1, 3, 0},
104
- { 3, s_4_2, -1, 3, 0},
105
- { 2, s_4_3, -1, 2, 0},
106
- { 2, s_4_4, -1, 1, 0},
107
- { 2, s_4_5, -1, 4, 0},
108
- { 2, s_4_6, -1, 6, 0},
109
- { 2, s_4_7, -1, 5, 0},
110
- { 3, s_4_8, -1, 3, 0}
111
- };
112
-
113
- static const symbol s_5_0[2] = { 'a', 'a' };
114
- static const symbol s_5_1[2] = { 'e', 'e' };
115
- static const symbol s_5_2[2] = { 'i', 'i' };
116
- static const symbol s_5_3[2] = { 'o', 'o' };
117
- static const symbol s_5_4[2] = { 'u', 'u' };
118
- static const symbol s_5_5[2] = { 0xE4, 0xE4 };
119
- static const symbol s_5_6[2] = { 0xF6, 0xF6 };
120
-
121
- static const struct among a_5[7] =
122
- {
123
- { 2, s_5_0, -1, -1, 0},
124
- { 2, s_5_1, -1, -1, 0},
125
- { 2, s_5_2, -1, -1, 0},
126
- { 2, s_5_3, -1, -1, 0},
127
- { 2, s_5_4, -1, -1, 0},
128
- { 2, s_5_5, -1, -1, 0},
129
- { 2, s_5_6, -1, -1, 0}
130
- };
131
-
132
- static const symbol s_6_0[1] = { 'a' };
133
- static const symbol s_6_1[3] = { 'l', 'l', 'a' };
134
- static const symbol s_6_2[2] = { 'n', 'a' };
135
- static const symbol s_6_3[3] = { 's', 's', 'a' };
136
- static const symbol s_6_4[2] = { 't', 'a' };
137
- static const symbol s_6_5[3] = { 'l', 't', 'a' };
138
- static const symbol s_6_6[3] = { 's', 't', 'a' };
139
- static const symbol s_6_7[3] = { 't', 't', 'a' };
140
- static const symbol s_6_8[3] = { 'l', 'l', 'e' };
141
- static const symbol s_6_9[3] = { 'i', 'n', 'e' };
142
- static const symbol s_6_10[3] = { 'k', 's', 'i' };
143
- static const symbol s_6_11[1] = { 'n' };
144
- static const symbol s_6_12[3] = { 'h', 'a', 'n' };
145
- static const symbol s_6_13[3] = { 'd', 'e', 'n' };
146
- static const symbol s_6_14[4] = { 's', 'e', 'e', 'n' };
147
- static const symbol s_6_15[3] = { 'h', 'e', 'n' };
148
- static const symbol s_6_16[4] = { 't', 't', 'e', 'n' };
149
- static const symbol s_6_17[3] = { 'h', 'i', 'n' };
150
- static const symbol s_6_18[4] = { 's', 'i', 'i', 'n' };
151
- static const symbol s_6_19[3] = { 'h', 'o', 'n' };
152
- static const symbol s_6_20[3] = { 'h', 0xE4, 'n' };
153
- static const symbol s_6_21[3] = { 'h', 0xF6, 'n' };
154
- static const symbol s_6_22[1] = { 0xE4 };
155
- static const symbol s_6_23[3] = { 'l', 'l', 0xE4 };
156
- static const symbol s_6_24[2] = { 'n', 0xE4 };
157
- static const symbol s_6_25[3] = { 's', 's', 0xE4 };
158
- static const symbol s_6_26[2] = { 't', 0xE4 };
159
- static const symbol s_6_27[3] = { 'l', 't', 0xE4 };
160
- static const symbol s_6_28[3] = { 's', 't', 0xE4 };
161
- static const symbol s_6_29[3] = { 't', 't', 0xE4 };
162
-
163
- static const struct among a_6[30] =
164
- {
165
- { 1, s_6_0, -1, 8, 0},
166
- { 3, s_6_1, 0, -1, 0},
167
- { 2, s_6_2, 0, -1, 0},
168
- { 3, s_6_3, 0, -1, 0},
169
- { 2, s_6_4, 0, -1, 0},
170
- { 3, s_6_5, 4, -1, 0},
171
- { 3, s_6_6, 4, -1, 0},
172
- { 3, s_6_7, 4, 2, 0},
173
- { 3, s_6_8, -1, -1, 0},
174
- { 3, s_6_9, -1, -1, 0},
175
- { 3, s_6_10, -1, -1, 0},
176
- { 1, s_6_11, -1, 7, 0},
177
- { 3, s_6_12, 11, 1, 0},
178
- { 3, s_6_13, 11, -1, r_VI},
179
- { 4, s_6_14, 11, -1, r_LONG},
180
- { 3, s_6_15, 11, 2, 0},
181
- { 4, s_6_16, 11, -1, r_VI},
182
- { 3, s_6_17, 11, 3, 0},
183
- { 4, s_6_18, 11, -1, r_VI},
184
- { 3, s_6_19, 11, 4, 0},
185
- { 3, s_6_20, 11, 5, 0},
186
- { 3, s_6_21, 11, 6, 0},
187
- { 1, s_6_22, -1, 8, 0},
188
- { 3, s_6_23, 22, -1, 0},
189
- { 2, s_6_24, 22, -1, 0},
190
- { 3, s_6_25, 22, -1, 0},
191
- { 2, s_6_26, 22, -1, 0},
192
- { 3, s_6_27, 26, -1, 0},
193
- { 3, s_6_28, 26, -1, 0},
194
- { 3, s_6_29, 26, 2, 0}
195
- };
196
-
197
- static const symbol s_7_0[3] = { 'e', 'j', 'a' };
198
- static const symbol s_7_1[3] = { 'm', 'm', 'a' };
199
- static const symbol s_7_2[4] = { 'i', 'm', 'm', 'a' };
200
- static const symbol s_7_3[3] = { 'm', 'p', 'a' };
201
- static const symbol s_7_4[4] = { 'i', 'm', 'p', 'a' };
202
- static const symbol s_7_5[3] = { 'm', 'm', 'i' };
203
- static const symbol s_7_6[4] = { 'i', 'm', 'm', 'i' };
204
- static const symbol s_7_7[3] = { 'm', 'p', 'i' };
205
- static const symbol s_7_8[4] = { 'i', 'm', 'p', 'i' };
206
- static const symbol s_7_9[3] = { 'e', 'j', 0xE4 };
207
- static const symbol s_7_10[3] = { 'm', 'm', 0xE4 };
208
- static const symbol s_7_11[4] = { 'i', 'm', 'm', 0xE4 };
209
- static const symbol s_7_12[3] = { 'm', 'p', 0xE4 };
210
- static const symbol s_7_13[4] = { 'i', 'm', 'p', 0xE4 };
211
-
212
- static const struct among a_7[14] =
213
- {
214
- { 3, s_7_0, -1, -1, 0},
215
- { 3, s_7_1, -1, 1, 0},
216
- { 4, s_7_2, 1, -1, 0},
217
- { 3, s_7_3, -1, 1, 0},
218
- { 4, s_7_4, 3, -1, 0},
219
- { 3, s_7_5, -1, 1, 0},
220
- { 4, s_7_6, 5, -1, 0},
221
- { 3, s_7_7, -1, 1, 0},
222
- { 4, s_7_8, 7, -1, 0},
223
- { 3, s_7_9, -1, -1, 0},
224
- { 3, s_7_10, -1, 1, 0},
225
- { 4, s_7_11, 10, -1, 0},
226
- { 3, s_7_12, -1, 1, 0},
227
- { 4, s_7_13, 12, -1, 0}
228
- };
229
-
230
- static const symbol s_8_0[1] = { 'i' };
231
- static const symbol s_8_1[1] = { 'j' };
232
-
233
- static const struct among a_8[2] =
234
- {
235
- { 1, s_8_0, -1, -1, 0},
236
- { 1, s_8_1, -1, -1, 0}
237
- };
238
-
239
- static const symbol s_9_0[3] = { 'm', 'm', 'a' };
240
- static const symbol s_9_1[4] = { 'i', 'm', 'm', 'a' };
241
-
242
- static const struct among a_9[2] =
243
- {
244
- { 3, s_9_0, -1, 1, 0},
245
- { 4, s_9_1, 0, -1, 0}
246
- };
247
-
248
- static const unsigned char g_AEI[] = { 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 };
249
-
250
- static const unsigned char g_C[] = { 119, 223, 119, 1 };
251
-
252
- static const unsigned char g_V1[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
253
-
254
- static const unsigned char g_V2[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
255
-
256
- static const unsigned char g_particle_end[] = { 17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
257
-
258
- static const symbol s_0[] = { 'k', 's', 'e' };
259
- static const symbol s_1[] = { 'k', 's', 'i' };
260
- static const symbol s_2[] = { 'i', 'e' };
261
- static const symbol s_3[] = { 'p', 'o' };
262
- static const symbol s_4[] = { 'p', 'o' };
263
-
264
- static int r_mark_regions(struct SN_env * z) {
265
- z->I[1] = z->l;
266
- z->I[0] = z->l;
267
- if (out_grouping(z, g_V1, 97, 246, 1) < 0) return 0;
268
- {
269
- int ret = in_grouping(z, g_V1, 97, 246, 1);
270
- if (ret < 0) return 0;
271
- z->c += ret;
272
- }
273
- z->I[1] = z->c;
274
- if (out_grouping(z, g_V1, 97, 246, 1) < 0) return 0;
275
- {
276
- int ret = in_grouping(z, g_V1, 97, 246, 1);
277
- if (ret < 0) return 0;
278
- z->c += ret;
279
- }
280
- z->I[0] = z->c;
281
- return 1;
282
- }
283
-
284
- static int r_R2(struct SN_env * z) {
285
- if (!(z->I[0] <= z->c)) return 0;
286
- return 1;
287
- }
288
-
289
- static int r_particle_etc(struct SN_env * z) {
290
- int among_var;
291
-
292
- { int mlimit1;
293
- if (z->c < z->I[1]) return 0;
294
- mlimit1 = z->lb; z->lb = z->I[1];
295
- z->ket = z->c;
296
- among_var = find_among_b(z, a_0, 10);
297
- if (!(among_var)) { z->lb = mlimit1; return 0; }
298
- z->bra = z->c;
299
- z->lb = mlimit1;
300
- }
301
- switch (among_var) {
302
- case 1:
303
- if (in_grouping_b(z, g_particle_end, 97, 246, 0)) return 0;
304
- break;
305
- case 2:
306
- { int ret = r_R2(z);
307
- if (ret <= 0) return ret;
308
- }
309
- break;
310
- }
311
- { int ret = slice_del(z);
312
- if (ret < 0) return ret;
313
- }
314
- return 1;
315
- }
316
-
317
- static int r_possessive(struct SN_env * z) {
318
- int among_var;
319
-
320
- { int mlimit1;
321
- if (z->c < z->I[1]) return 0;
322
- mlimit1 = z->lb; z->lb = z->I[1];
323
- z->ket = z->c;
324
- among_var = find_among_b(z, a_4, 9);
325
- if (!(among_var)) { z->lb = mlimit1; return 0; }
326
- z->bra = z->c;
327
- z->lb = mlimit1;
328
- }
329
- switch (among_var) {
330
- case 1:
331
- { int m2 = z->l - z->c; (void)m2;
332
- if (z->c <= z->lb || z->p[z->c - 1] != 'k') goto lab0;
333
- z->c--;
334
- return 0;
335
- lab0:
336
- z->c = z->l - m2;
337
- }
338
- { int ret = slice_del(z);
339
- if (ret < 0) return ret;
340
- }
341
- break;
342
- case 2:
343
- { int ret = slice_del(z);
344
- if (ret < 0) return ret;
345
- }
346
- z->ket = z->c;
347
- if (!(eq_s_b(z, 3, s_0))) return 0;
348
- z->bra = z->c;
349
- { int ret = slice_from_s(z, 3, s_1);
350
- if (ret < 0) return ret;
351
- }
352
- break;
353
- case 3:
354
- { int ret = slice_del(z);
355
- if (ret < 0) return ret;
356
- }
357
- break;
358
- case 4:
359
- if (z->c - 1 <= z->lb || z->p[z->c - 1] != 97) return 0;
360
- if (!(find_among_b(z, a_1, 6))) return 0;
361
- { int ret = slice_del(z);
362
- if (ret < 0) return ret;
363
- }
364
- break;
365
- case 5:
366
- if (z->c - 1 <= z->lb || z->p[z->c - 1] != 228) return 0;
367
- if (!(find_among_b(z, a_2, 6))) return 0;
368
- { int ret = slice_del(z);
369
- if (ret < 0) return ret;
370
- }
371
- break;
372
- case 6:
373
- if (z->c - 2 <= z->lb || z->p[z->c - 1] != 101) return 0;
374
- if (!(find_among_b(z, a_3, 2))) return 0;
375
- { int ret = slice_del(z);
376
- if (ret < 0) return ret;
377
- }
378
- break;
379
- }
380
- return 1;
381
- }
382
-
383
- static int r_LONG(struct SN_env * z) {
384
- if (!(find_among_b(z, a_5, 7))) return 0;
385
- return 1;
386
- }
387
-
388
- static int r_VI(struct SN_env * z) {
389
- if (z->c <= z->lb || z->p[z->c - 1] != 'i') return 0;
390
- z->c--;
391
- if (in_grouping_b(z, g_V2, 97, 246, 0)) return 0;
392
- return 1;
393
- }
394
-
395
- static int r_case_ending(struct SN_env * z) {
396
- int among_var;
397
-
398
- { int mlimit1;
399
- if (z->c < z->I[1]) return 0;
400
- mlimit1 = z->lb; z->lb = z->I[1];
401
- z->ket = z->c;
402
- among_var = find_among_b(z, a_6, 30);
403
- if (!(among_var)) { z->lb = mlimit1; return 0; }
404
- z->bra = z->c;
405
- z->lb = mlimit1;
406
- }
407
- switch (among_var) {
408
- case 1:
409
- if (z->c <= z->lb || z->p[z->c - 1] != 'a') return 0;
410
- z->c--;
411
- break;
412
- case 2:
413
- if (z->c <= z->lb || z->p[z->c - 1] != 'e') return 0;
414
- z->c--;
415
- break;
416
- case 3:
417
- if (z->c <= z->lb || z->p[z->c - 1] != 'i') return 0;
418
- z->c--;
419
- break;
420
- case 4:
421
- if (z->c <= z->lb || z->p[z->c - 1] != 'o') return 0;
422
- z->c--;
423
- break;
424
- case 5:
425
- if (z->c <= z->lb || z->p[z->c - 1] != 0xE4) return 0;
426
- z->c--;
427
- break;
428
- case 6:
429
- if (z->c <= z->lb || z->p[z->c - 1] != 0xF6) return 0;
430
- z->c--;
431
- break;
432
- case 7:
433
- { int m2 = z->l - z->c; (void)m2;
434
- { int m3 = z->l - z->c; (void)m3;
435
- { int m4 = z->l - z->c; (void)m4;
436
- { int ret = r_LONG(z);
437
- if (ret == 0) goto lab2;
438
- if (ret < 0) return ret;
439
- }
440
- goto lab1;
441
- lab2:
442
- z->c = z->l - m4;
443
- if (!(eq_s_b(z, 2, s_2))) { z->c = z->l - m2; goto lab0; }
444
- }
445
- lab1:
446
- z->c = z->l - m3;
447
- if (z->c <= z->lb) { z->c = z->l - m2; goto lab0; }
448
- z->c--;
449
- }
450
- z->bra = z->c;
451
- lab0:
452
- ;
453
- }
454
- break;
455
- case 8:
456
- if (in_grouping_b(z, g_V1, 97, 246, 0)) return 0;
457
- if (in_grouping_b(z, g_C, 98, 122, 0)) return 0;
458
- break;
459
- }
460
- { int ret = slice_del(z);
461
- if (ret < 0) return ret;
462
- }
463
- z->I[2] = 1;
464
- return 1;
465
- }
466
-
467
- static int r_other_endings(struct SN_env * z) {
468
- int among_var;
469
-
470
- { int mlimit1;
471
- if (z->c < z->I[0]) return 0;
472
- mlimit1 = z->lb; z->lb = z->I[0];
473
- z->ket = z->c;
474
- among_var = find_among_b(z, a_7, 14);
475
- if (!(among_var)) { z->lb = mlimit1; return 0; }
476
- z->bra = z->c;
477
- z->lb = mlimit1;
478
- }
479
- switch (among_var) {
480
- case 1:
481
- { int m2 = z->l - z->c; (void)m2;
482
- if (!(eq_s_b(z, 2, s_3))) goto lab0;
483
- return 0;
484
- lab0:
485
- z->c = z->l - m2;
486
- }
487
- break;
488
- }
489
- { int ret = slice_del(z);
490
- if (ret < 0) return ret;
491
- }
492
- return 1;
493
- }
494
-
495
- static int r_i_plural(struct SN_env * z) {
496
-
497
- { int mlimit1;
498
- if (z->c < z->I[1]) return 0;
499
- mlimit1 = z->lb; z->lb = z->I[1];
500
- z->ket = z->c;
501
- if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 106)) { z->lb = mlimit1; return 0; }
502
- if (!(find_among_b(z, a_8, 2))) { z->lb = mlimit1; return 0; }
503
- z->bra = z->c;
504
- z->lb = mlimit1;
505
- }
506
- { int ret = slice_del(z);
507
- if (ret < 0) return ret;
508
- }
509
- return 1;
510
- }
511
-
512
- static int r_t_plural(struct SN_env * z) {
513
- int among_var;
514
-
515
- { int mlimit1;
516
- if (z->c < z->I[1]) return 0;
517
- mlimit1 = z->lb; z->lb = z->I[1];
518
- z->ket = z->c;
519
- if (z->c <= z->lb || z->p[z->c - 1] != 't') { z->lb = mlimit1; return 0; }
520
- z->c--;
521
- z->bra = z->c;
522
- { int m_test2 = z->l - z->c;
523
- if (in_grouping_b(z, g_V1, 97, 246, 0)) { z->lb = mlimit1; return 0; }
524
- z->c = z->l - m_test2;
525
- }
526
- { int ret = slice_del(z);
527
- if (ret < 0) return ret;
528
- }
529
- z->lb = mlimit1;
530
- }
531
-
532
- { int mlimit3;
533
- if (z->c < z->I[0]) return 0;
534
- mlimit3 = z->lb; z->lb = z->I[0];
535
- z->ket = z->c;
536
- if (z->c - 2 <= z->lb || z->p[z->c - 1] != 97) { z->lb = mlimit3; return 0; }
537
- among_var = find_among_b(z, a_9, 2);
538
- if (!(among_var)) { z->lb = mlimit3; return 0; }
539
- z->bra = z->c;
540
- z->lb = mlimit3;
541
- }
542
- switch (among_var) {
543
- case 1:
544
- { int m4 = z->l - z->c; (void)m4;
545
- if (!(eq_s_b(z, 2, s_4))) goto lab0;
546
- return 0;
547
- lab0:
548
- z->c = z->l - m4;
549
- }
550
- break;
551
- }
552
- { int ret = slice_del(z);
553
- if (ret < 0) return ret;
554
- }
555
- return 1;
556
- }
557
-
558
- static int r_tidy(struct SN_env * z) {
559
-
560
- { int mlimit1;
561
- if (z->c < z->I[1]) return 0;
562
- mlimit1 = z->lb; z->lb = z->I[1];
563
- { int m2 = z->l - z->c; (void)m2;
564
- { int m3 = z->l - z->c; (void)m3;
565
- { int ret = r_LONG(z);
566
- if (ret == 0) goto lab0;
567
- if (ret < 0) return ret;
568
- }
569
- z->c = z->l - m3;
570
- z->ket = z->c;
571
- if (z->c <= z->lb) goto lab0;
572
- z->c--;
573
- z->bra = z->c;
574
- { int ret = slice_del(z);
575
- if (ret < 0) return ret;
576
- }
577
- }
578
- lab0:
579
- z->c = z->l - m2;
580
- }
581
- { int m4 = z->l - z->c; (void)m4;
582
- z->ket = z->c;
583
- if (in_grouping_b(z, g_AEI, 97, 228, 0)) goto lab1;
584
- z->bra = z->c;
585
- if (in_grouping_b(z, g_C, 98, 122, 0)) goto lab1;
586
- { int ret = slice_del(z);
587
- if (ret < 0) return ret;
588
- }
589
- lab1:
590
- z->c = z->l - m4;
591
- }
592
- { int m5 = z->l - z->c; (void)m5;
593
- z->ket = z->c;
594
- if (z->c <= z->lb || z->p[z->c - 1] != 'j') goto lab2;
595
- z->c--;
596
- z->bra = z->c;
597
- { int m6 = z->l - z->c; (void)m6;
598
- if (z->c <= z->lb || z->p[z->c - 1] != 'o') goto lab4;
599
- z->c--;
600
- goto lab3;
601
- lab4:
602
- z->c = z->l - m6;
603
- if (z->c <= z->lb || z->p[z->c - 1] != 'u') goto lab2;
604
- z->c--;
605
- }
606
- lab3:
607
- { int ret = slice_del(z);
608
- if (ret < 0) return ret;
609
- }
610
- lab2:
611
- z->c = z->l - m5;
612
- }
613
- { int m7 = z->l - z->c; (void)m7;
614
- z->ket = z->c;
615
- if (z->c <= z->lb || z->p[z->c - 1] != 'o') goto lab5;
616
- z->c--;
617
- z->bra = z->c;
618
- if (z->c <= z->lb || z->p[z->c - 1] != 'j') goto lab5;
619
- z->c--;
620
- { int ret = slice_del(z);
621
- if (ret < 0) return ret;
622
- }
623
- lab5:
624
- z->c = z->l - m7;
625
- }
626
- z->lb = mlimit1;
627
- }
628
- if (in_grouping_b(z, g_V1, 97, 246, 1) < 0) return 0;
629
- z->ket = z->c;
630
- if (in_grouping_b(z, g_C, 98, 122, 0)) return 0;
631
- z->bra = z->c;
632
- z->S[0] = slice_to(z, z->S[0]);
633
- if (z->S[0] == 0) return -1;
634
- if (!(eq_v_b(z, z->S[0]))) return 0;
635
- { int ret = slice_del(z);
636
- if (ret < 0) return ret;
637
- }
638
- return 1;
639
- }
640
-
641
- extern int finnish_ISO_8859_1_stem(struct SN_env * z) {
642
- { int c1 = z->c;
643
- { int ret = r_mark_regions(z);
644
- if (ret < 0) return ret;
645
- }
646
- z->c = c1;
647
- }
648
- z->I[2] = 0;
649
- z->lb = z->c; z->c = z->l;
650
-
651
- { int m2 = z->l - z->c; (void)m2;
652
- { int ret = r_particle_etc(z);
653
- if (ret < 0) return ret;
654
- }
655
- z->c = z->l - m2;
656
- }
657
- { int m3 = z->l - z->c; (void)m3;
658
- { int ret = r_possessive(z);
659
- if (ret < 0) return ret;
660
- }
661
- z->c = z->l - m3;
662
- }
663
- { int m4 = z->l - z->c; (void)m4;
664
- { int ret = r_case_ending(z);
665
- if (ret < 0) return ret;
666
- }
667
- z->c = z->l - m4;
668
- }
669
- { int m5 = z->l - z->c; (void)m5;
670
- { int ret = r_other_endings(z);
671
- if (ret < 0) return ret;
672
- }
673
- z->c = z->l - m5;
674
- }
675
-
676
- if (!(z->I[2])) goto lab1;
677
- { int m6 = z->l - z->c; (void)m6;
678
- { int ret = r_i_plural(z);
679
- if (ret < 0) return ret;
680
- }
681
- z->c = z->l - m6;
682
- }
683
- goto lab0;
684
- lab1:
685
- { int m7 = z->l - z->c; (void)m7;
686
- { int ret = r_t_plural(z);
687
- if (ret < 0) return ret;
688
- }
689
- z->c = z->l - m7;
690
- }
691
- lab0:
692
- { int m8 = z->l - z->c; (void)m8;
693
- { int ret = r_tidy(z);
694
- if (ret < 0) return ret;
695
- }
696
- z->c = z->l - m8;
697
- }
698
- z->c = z->lb;
699
- return 1;
700
- }
701
-
702
- extern struct SN_env * finnish_ISO_8859_1_create_env(void) { return SN_create_env(1, 3); }
703
-
704
- extern void finnish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 1); }
705
-