isomorfeus-ferret 0.12.4 → 0.12.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +612 -612
  3. data/README.md +80 -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/frb_store.c +34 -5
  7. data/ext/isomorfeus_ferret_ext/frt_posh.h +11 -19
  8. data/ext/isomorfeus_ferret_ext/frt_q_parser.c +1844 -1911
  9. data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +7 -7
  10. data/ext/isomorfeus_ferret_ext/frt_scanner.c +1 -0
  11. data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +1 -0
  12. data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +1 -0
  13. data/ext/isomorfeus_ferret_ext/frt_search.h +1 -1
  14. data/ext/isomorfeus_ferret_ext/libstemmer.c +14 -11
  15. data/ext/isomorfeus_ferret_ext/libstemmer.h +4 -9
  16. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.c +1167 -0
  17. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.h +6 -0
  18. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.c +1433 -0
  19. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.h +6 -0
  20. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +120 -143
  21. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +1 -2
  22. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +217 -237
  23. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +1 -1
  24. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +377 -432
  25. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +1 -1
  26. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +298 -342
  27. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +1 -2
  28. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +530 -524
  29. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +1 -1
  30. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +201 -214
  31. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +1 -1
  32. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +1 -1
  33. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.c +394 -0
  34. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.h +6 -0
  35. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.c +457 -0
  36. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.h +6 -0
  37. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +396 -439
  38. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +1 -1
  39. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +104 -128
  40. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +1 -1
  41. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +242 -273
  42. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +1 -1
  43. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +406 -461
  44. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +1 -2
  45. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +405 -456
  46. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +1 -1
  47. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +108 -126
  48. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +1 -1
  49. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.c +849 -0
  50. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.h +6 -0
  51. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +373 -405
  52. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +1 -1
  53. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +288 -305
  54. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +1 -1
  55. data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.c +1651 -0
  56. data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.h +6 -0
  57. data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.c +546 -0
  58. data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.h +6 -0
  59. data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.c +1171 -0
  60. data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.h +6 -0
  61. data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.c +1436 -0
  62. data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.h +6 -0
  63. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.c +121 -141
  64. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.h +1 -1
  65. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.c +221 -241
  66. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.h +1 -1
  67. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.c +381 -431
  68. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.h +1 -1
  69. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.c +300 -345
  70. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.h +1 -1
  71. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.c +518 -511
  72. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.h +1 -1
  73. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.c +201 -209
  74. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.h +1 -1
  75. data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.c +3660 -0
  76. data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.h +6 -0
  77. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.c +309 -0
  78. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.h +6 -0
  79. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.c +306 -671
  80. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.h +1 -1
  81. data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.c +394 -0
  82. data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.h +6 -0
  83. data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.c +457 -0
  84. data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.h +6 -0
  85. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.c +400 -442
  86. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.h +1 -1
  87. data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.c +824 -0
  88. data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.h +6 -0
  89. data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.c +408 -0
  90. data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.h +6 -0
  91. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.c +105 -127
  92. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.h +1 -1
  93. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.c +245 -276
  94. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.h +1 -1
  95. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.c +409 -464
  96. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.h +1 -1
  97. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.c +376 -408
  98. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.h +1 -1
  99. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.c +272 -287
  100. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.h +1 -1
  101. data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.c +6530 -0
  102. data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.h +6 -0
  103. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.c +407 -458
  104. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.h +1 -1
  105. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.c +110 -125
  106. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.h +1 -1
  107. data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.c +1865 -0
  108. data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.h +6 -0
  109. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.c +698 -806
  110. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.h +1 -1
  111. data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.c +1220 -0
  112. data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.h +6 -0
  113. data/ext/isomorfeus_ferret_ext/stem_api.c +1 -9
  114. data/ext/isomorfeus_ferret_ext/stem_api.h +1 -3
  115. data/ext/isomorfeus_ferret_ext/stem_header.h +30 -26
  116. data/ext/isomorfeus_ferret_ext/stem_modules.h +113 -26
  117. data/ext/isomorfeus_ferret_ext/stem_modules.txt +18 -5
  118. data/ext/isomorfeus_ferret_ext/stem_utilities.c +167 -132
  119. data/ext/isomorfeus_ferret_ext/test.c +7 -1
  120. data/ext/isomorfeus_ferret_ext/test_search.c +0 -1
  121. data/lib/isomorfeus/ferret/version.rb +1 -1
  122. metadata +39 -4
  123. data/ext/isomorfeus_ferret_ext/q_parser.y +0 -1366
@@ -0,0 +1,457 @@
1
+ /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
+
3
+ #include "stem_header.h"
4
+
5
+ extern int irish_UTF_8_stem(struct SN_env * z);
6
+
7
+ static int r_verb_sfx(struct SN_env * z);
8
+ static int r_deriv(struct SN_env * z);
9
+ static int r_noun_sfx(struct SN_env * z);
10
+ static int r_mark_regions(struct SN_env * z);
11
+ static int r_initial_morph(struct SN_env * z);
12
+ static int r_RV(struct SN_env * z);
13
+ static int r_R2(struct SN_env * z);
14
+ static int r_R1(struct SN_env * z);
15
+
16
+ extern struct SN_env * irish_UTF_8_create_env(void);
17
+ extern void irish_UTF_8_close_env(struct SN_env * z);
18
+
19
+ static const symbol s_0_0[2] = { 'b', '\'' };
20
+ static const symbol s_0_1[2] = { 'b', 'h' };
21
+ static const symbol s_0_2[3] = { 'b', 'h', 'f' };
22
+ static const symbol s_0_3[2] = { 'b', 'p' };
23
+ static const symbol s_0_4[2] = { 'c', 'h' };
24
+ static const symbol s_0_5[2] = { 'd', '\'' };
25
+ static const symbol s_0_6[4] = { 'd', '\'', 'f', 'h' };
26
+ static const symbol s_0_7[2] = { 'd', 'h' };
27
+ static const symbol s_0_8[2] = { 'd', 't' };
28
+ static const symbol s_0_9[2] = { 'f', 'h' };
29
+ static const symbol s_0_10[2] = { 'g', 'c' };
30
+ static const symbol s_0_11[2] = { 'g', 'h' };
31
+ static const symbol s_0_12[2] = { 'h', '-' };
32
+ static const symbol s_0_13[2] = { 'm', '\'' };
33
+ static const symbol s_0_14[2] = { 'm', 'b' };
34
+ static const symbol s_0_15[2] = { 'm', 'h' };
35
+ static const symbol s_0_16[2] = { 'n', '-' };
36
+ static const symbol s_0_17[2] = { 'n', 'd' };
37
+ static const symbol s_0_18[2] = { 'n', 'g' };
38
+ static const symbol s_0_19[2] = { 'p', 'h' };
39
+ static const symbol s_0_20[2] = { 's', 'h' };
40
+ static const symbol s_0_21[2] = { 't', '-' };
41
+ static const symbol s_0_22[2] = { 't', 'h' };
42
+ static const symbol s_0_23[2] = { 't', 's' };
43
+
44
+ static const struct among a_0[24] =
45
+ {
46
+ { 2, s_0_0, -1, 1, 0},
47
+ { 2, s_0_1, -1, 4, 0},
48
+ { 3, s_0_2, 1, 2, 0},
49
+ { 2, s_0_3, -1, 8, 0},
50
+ { 2, s_0_4, -1, 5, 0},
51
+ { 2, s_0_5, -1, 1, 0},
52
+ { 4, s_0_6, 5, 2, 0},
53
+ { 2, s_0_7, -1, 6, 0},
54
+ { 2, s_0_8, -1, 9, 0},
55
+ { 2, s_0_9, -1, 2, 0},
56
+ { 2, s_0_10, -1, 5, 0},
57
+ { 2, s_0_11, -1, 7, 0},
58
+ { 2, s_0_12, -1, 1, 0},
59
+ { 2, s_0_13, -1, 1, 0},
60
+ { 2, s_0_14, -1, 4, 0},
61
+ { 2, s_0_15, -1, 10, 0},
62
+ { 2, s_0_16, -1, 1, 0},
63
+ { 2, s_0_17, -1, 6, 0},
64
+ { 2, s_0_18, -1, 7, 0},
65
+ { 2, s_0_19, -1, 8, 0},
66
+ { 2, s_0_20, -1, 3, 0},
67
+ { 2, s_0_21, -1, 1, 0},
68
+ { 2, s_0_22, -1, 9, 0},
69
+ { 2, s_0_23, -1, 3, 0}
70
+ };
71
+
72
+ static const symbol s_1_0[7] = { 0xC3, 0xAD, 'o', 'c', 'h', 't', 'a' };
73
+ static const symbol s_1_1[8] = { 'a', 0xC3, 0xAD, 'o', 'c', 'h', 't', 'a' };
74
+ static const symbol s_1_2[3] = { 'i', 'r', 'e' };
75
+ static const symbol s_1_3[4] = { 'a', 'i', 'r', 'e' };
76
+ static const symbol s_1_4[3] = { 'a', 'b', 'h' };
77
+ static const symbol s_1_5[4] = { 'e', 'a', 'b', 'h' };
78
+ static const symbol s_1_6[3] = { 'i', 'b', 'h' };
79
+ static const symbol s_1_7[4] = { 'a', 'i', 'b', 'h' };
80
+ static const symbol s_1_8[3] = { 'a', 'm', 'h' };
81
+ static const symbol s_1_9[4] = { 'e', 'a', 'm', 'h' };
82
+ static const symbol s_1_10[3] = { 'i', 'm', 'h' };
83
+ static const symbol s_1_11[4] = { 'a', 'i', 'm', 'h' };
84
+ static const symbol s_1_12[6] = { 0xC3, 0xAD, 'o', 'c', 'h', 't' };
85
+ static const symbol s_1_13[7] = { 'a', 0xC3, 0xAD, 'o', 'c', 'h', 't' };
86
+ static const symbol s_1_14[4] = { 'i', 'r', 0xC3, 0xAD };
87
+ static const symbol s_1_15[5] = { 'a', 'i', 'r', 0xC3, 0xAD };
88
+
89
+ static const struct among a_1[16] =
90
+ {
91
+ { 7, s_1_0, -1, 1, 0},
92
+ { 8, s_1_1, 0, 1, 0},
93
+ { 3, s_1_2, -1, 2, 0},
94
+ { 4, s_1_3, 2, 2, 0},
95
+ { 3, s_1_4, -1, 1, 0},
96
+ { 4, s_1_5, 4, 1, 0},
97
+ { 3, s_1_6, -1, 1, 0},
98
+ { 4, s_1_7, 6, 1, 0},
99
+ { 3, s_1_8, -1, 1, 0},
100
+ { 4, s_1_9, 8, 1, 0},
101
+ { 3, s_1_10, -1, 1, 0},
102
+ { 4, s_1_11, 10, 1, 0},
103
+ { 6, s_1_12, -1, 1, 0},
104
+ { 7, s_1_13, 12, 1, 0},
105
+ { 4, s_1_14, -1, 2, 0},
106
+ { 5, s_1_15, 14, 2, 0}
107
+ };
108
+
109
+ static const symbol s_2_0[9] = { 0xC3, 0xB3, 'i', 'd', 'e', 'a', 'c', 'h', 'a' };
110
+ static const symbol s_2_1[7] = { 'p', 'a', 't', 'a', 'c', 'h', 'a' };
111
+ static const symbol s_2_2[5] = { 'a', 'c', 'h', 't', 'a' };
112
+ static const symbol s_2_3[8] = { 'a', 'r', 'c', 'a', 'c', 'h', 't', 'a' };
113
+ static const symbol s_2_4[6] = { 'e', 'a', 'c', 'h', 't', 'a' };
114
+ static const symbol s_2_5[12] = { 'g', 'r', 'a', 'f', 'a', 0xC3, 0xAD, 'o', 'c', 'h', 't', 'a' };
115
+ static const symbol s_2_6[5] = { 'p', 'a', 'i', 't', 'e' };
116
+ static const symbol s_2_7[3] = { 'a', 'c', 'h' };
117
+ static const symbol s_2_8[4] = { 'e', 'a', 'c', 'h' };
118
+ static const symbol s_2_9[8] = { 0xC3, 0xB3, 'i', 'd', 'e', 'a', 'c', 'h' };
119
+ static const symbol s_2_10[7] = { 'g', 'i', 'n', 'e', 'a', 'c', 'h' };
120
+ static const symbol s_2_11[6] = { 'p', 'a', 't', 'a', 'c', 'h' };
121
+ static const symbol s_2_12[10] = { 'g', 'r', 'a', 'f', 'a', 0xC3, 0xAD, 'o', 'c', 'h' };
122
+ static const symbol s_2_13[7] = { 'p', 'a', 't', 'a', 'i', 'g', 'h' };
123
+ static const symbol s_2_14[7] = { 0xC3, 0xB3, 'i', 'd', 'i', 'g', 'h' };
124
+ static const symbol s_2_15[8] = { 'a', 'c', 'h', 't', 0xC3, 0xBA, 'i', 'l' };
125
+ static const symbol s_2_16[9] = { 'e', 'a', 'c', 'h', 't', 0xC3, 0xBA, 'i', 'l' };
126
+ static const symbol s_2_17[6] = { 'g', 'i', 'n', 'e', 'a', 's' };
127
+ static const symbol s_2_18[5] = { 'g', 'i', 'n', 'i', 's' };
128
+ static const symbol s_2_19[4] = { 'a', 'c', 'h', 't' };
129
+ static const symbol s_2_20[7] = { 'a', 'r', 'c', 'a', 'c', 'h', 't' };
130
+ static const symbol s_2_21[5] = { 'e', 'a', 'c', 'h', 't' };
131
+ static const symbol s_2_22[11] = { 'g', 'r', 'a', 'f', 'a', 0xC3, 0xAD, 'o', 'c', 'h', 't' };
132
+ static const symbol s_2_23[10] = { 'a', 'r', 'c', 'a', 'c', 'h', 't', 'a', 0xC3, 0xAD };
133
+ static const symbol s_2_24[14] = { 'g', 'r', 'a', 'f', 'a', 0xC3, 0xAD, 'o', 'c', 'h', 't', 'a', 0xC3, 0xAD };
134
+
135
+ static const struct among a_2[25] =
136
+ {
137
+ { 9, s_2_0, -1, 6, 0},
138
+ { 7, s_2_1, -1, 5, 0},
139
+ { 5, s_2_2, -1, 1, 0},
140
+ { 8, s_2_3, 2, 2, 0},
141
+ { 6, s_2_4, 2, 1, 0},
142
+ { 12, s_2_5, -1, 4, 0},
143
+ { 5, s_2_6, -1, 5, 0},
144
+ { 3, s_2_7, -1, 1, 0},
145
+ { 4, s_2_8, 7, 1, 0},
146
+ { 8, s_2_9, 8, 6, 0},
147
+ { 7, s_2_10, 8, 3, 0},
148
+ { 6, s_2_11, 7, 5, 0},
149
+ { 10, s_2_12, -1, 4, 0},
150
+ { 7, s_2_13, -1, 5, 0},
151
+ { 7, s_2_14, -1, 6, 0},
152
+ { 8, s_2_15, -1, 1, 0},
153
+ { 9, s_2_16, 15, 1, 0},
154
+ { 6, s_2_17, -1, 3, 0},
155
+ { 5, s_2_18, -1, 3, 0},
156
+ { 4, s_2_19, -1, 1, 0},
157
+ { 7, s_2_20, 19, 2, 0},
158
+ { 5, s_2_21, 19, 1, 0},
159
+ { 11, s_2_22, -1, 4, 0},
160
+ { 10, s_2_23, -1, 2, 0},
161
+ { 14, s_2_24, -1, 4, 0}
162
+ };
163
+
164
+ static const symbol s_3_0[4] = { 'i', 'm', 'i', 'd' };
165
+ static const symbol s_3_1[5] = { 'a', 'i', 'm', 'i', 'd' };
166
+ static const symbol s_3_2[5] = { 0xC3, 0xAD, 'm', 'i', 'd' };
167
+ static const symbol s_3_3[6] = { 'a', 0xC3, 0xAD, 'm', 'i', 'd' };
168
+ static const symbol s_3_4[3] = { 'a', 'd', 'h' };
169
+ static const symbol s_3_5[4] = { 'e', 'a', 'd', 'h' };
170
+ static const symbol s_3_6[5] = { 'f', 'a', 'i', 'd', 'h' };
171
+ static const symbol s_3_7[4] = { 'f', 'i', 'd', 'h' };
172
+ static const symbol s_3_8[4] = { 0xC3, 0xA1, 'i', 'l' };
173
+ static const symbol s_3_9[3] = { 'a', 'i', 'n' };
174
+ static const symbol s_3_10[4] = { 't', 'e', 'a', 'r' };
175
+ static const symbol s_3_11[3] = { 't', 'a', 'r' };
176
+
177
+ static const struct among a_3[12] =
178
+ {
179
+ { 4, s_3_0, -1, 1, 0},
180
+ { 5, s_3_1, 0, 1, 0},
181
+ { 5, s_3_2, -1, 1, 0},
182
+ { 6, s_3_3, 2, 1, 0},
183
+ { 3, s_3_4, -1, 2, 0},
184
+ { 4, s_3_5, 4, 2, 0},
185
+ { 5, s_3_6, -1, 1, 0},
186
+ { 4, s_3_7, -1, 1, 0},
187
+ { 4, s_3_8, -1, 2, 0},
188
+ { 3, s_3_9, -1, 2, 0},
189
+ { 4, s_3_10, -1, 2, 0},
190
+ { 3, s_3_11, -1, 2, 0}
191
+ };
192
+
193
+ static const unsigned char g_v[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 2 };
194
+
195
+ static const symbol s_0[] = { 'f' };
196
+ static const symbol s_1[] = { 's' };
197
+ static const symbol s_2[] = { 'b' };
198
+ static const symbol s_3[] = { 'c' };
199
+ static const symbol s_4[] = { 'd' };
200
+ static const symbol s_5[] = { 'g' };
201
+ static const symbol s_6[] = { 'p' };
202
+ static const symbol s_7[] = { 't' };
203
+ static const symbol s_8[] = { 'm' };
204
+ static const symbol s_9[] = { 'a', 'r', 'c' };
205
+ static const symbol s_10[] = { 'g', 'i', 'n' };
206
+ static const symbol s_11[] = { 'g', 'r', 'a', 'f' };
207
+ static const symbol s_12[] = { 'p', 'a', 'i', 't', 'e' };
208
+ static const symbol s_13[] = { 0xC3, 0xB3, 'i', 'd' };
209
+
210
+ static int r_mark_regions(struct SN_env * z) {
211
+ z->I[2] = z->l;
212
+ z->I[1] = z->l;
213
+ z->I[0] = z->l;
214
+ { int c1 = z->c;
215
+ {
216
+ int ret = out_grouping_U(z, g_v, 97, 250, 1);
217
+ if (ret < 0) goto lab0;
218
+ z->c += ret;
219
+ }
220
+ z->I[2] = z->c;
221
+ {
222
+ int ret = in_grouping_U(z, g_v, 97, 250, 1);
223
+ if (ret < 0) goto lab0;
224
+ z->c += ret;
225
+ }
226
+ z->I[1] = z->c;
227
+ {
228
+ int ret = out_grouping_U(z, g_v, 97, 250, 1);
229
+ if (ret < 0) goto lab0;
230
+ z->c += ret;
231
+ }
232
+ {
233
+ int ret = in_grouping_U(z, g_v, 97, 250, 1);
234
+ if (ret < 0) goto lab0;
235
+ z->c += ret;
236
+ }
237
+ z->I[0] = z->c;
238
+ lab0:
239
+ z->c = c1;
240
+ }
241
+ return 1;
242
+ }
243
+
244
+ static int r_initial_morph(struct SN_env * z) {
245
+ int among_var;
246
+ z->bra = z->c;
247
+ among_var = find_among(z, a_0, 24);
248
+ if (!(among_var)) return 0;
249
+ z->ket = z->c;
250
+ switch (among_var) {
251
+ case 1:
252
+ { int ret = slice_del(z);
253
+ if (ret < 0) return ret;
254
+ }
255
+ break;
256
+ case 2:
257
+ { int ret = slice_from_s(z, 1, s_0);
258
+ if (ret < 0) return ret;
259
+ }
260
+ break;
261
+ case 3:
262
+ { int ret = slice_from_s(z, 1, s_1);
263
+ if (ret < 0) return ret;
264
+ }
265
+ break;
266
+ case 4:
267
+ { int ret = slice_from_s(z, 1, s_2);
268
+ if (ret < 0) return ret;
269
+ }
270
+ break;
271
+ case 5:
272
+ { int ret = slice_from_s(z, 1, s_3);
273
+ if (ret < 0) return ret;
274
+ }
275
+ break;
276
+ case 6:
277
+ { int ret = slice_from_s(z, 1, s_4);
278
+ if (ret < 0) return ret;
279
+ }
280
+ break;
281
+ case 7:
282
+ { int ret = slice_from_s(z, 1, s_5);
283
+ if (ret < 0) return ret;
284
+ }
285
+ break;
286
+ case 8:
287
+ { int ret = slice_from_s(z, 1, s_6);
288
+ if (ret < 0) return ret;
289
+ }
290
+ break;
291
+ case 9:
292
+ { int ret = slice_from_s(z, 1, s_7);
293
+ if (ret < 0) return ret;
294
+ }
295
+ break;
296
+ case 10:
297
+ { int ret = slice_from_s(z, 1, s_8);
298
+ if (ret < 0) return ret;
299
+ }
300
+ break;
301
+ }
302
+ return 1;
303
+ }
304
+
305
+ static int r_RV(struct SN_env * z) {
306
+ if (!(z->I[2] <= z->c)) return 0;
307
+ return 1;
308
+ }
309
+
310
+ static int r_R1(struct SN_env * z) {
311
+ if (!(z->I[1] <= z->c)) return 0;
312
+ return 1;
313
+ }
314
+
315
+ static int r_R2(struct SN_env * z) {
316
+ if (!(z->I[0] <= z->c)) return 0;
317
+ return 1;
318
+ }
319
+
320
+ static int r_noun_sfx(struct SN_env * z) {
321
+ int among_var;
322
+ z->ket = z->c;
323
+ among_var = find_among_b(z, a_1, 16);
324
+ if (!(among_var)) return 0;
325
+ z->bra = z->c;
326
+ switch (among_var) {
327
+ case 1:
328
+ { int ret = r_R1(z);
329
+ if (ret <= 0) return ret;
330
+ }
331
+ { int ret = slice_del(z);
332
+ if (ret < 0) return ret;
333
+ }
334
+ break;
335
+ case 2:
336
+ { int ret = r_R2(z);
337
+ if (ret <= 0) return ret;
338
+ }
339
+ { int ret = slice_del(z);
340
+ if (ret < 0) return ret;
341
+ }
342
+ break;
343
+ }
344
+ return 1;
345
+ }
346
+
347
+ static int r_deriv(struct SN_env * z) {
348
+ int among_var;
349
+ z->ket = z->c;
350
+ among_var = find_among_b(z, a_2, 25);
351
+ if (!(among_var)) return 0;
352
+ z->bra = z->c;
353
+ switch (among_var) {
354
+ case 1:
355
+ { int ret = r_R2(z);
356
+ if (ret <= 0) return ret;
357
+ }
358
+ { int ret = slice_del(z);
359
+ if (ret < 0) return ret;
360
+ }
361
+ break;
362
+ case 2:
363
+ { int ret = slice_from_s(z, 3, s_9);
364
+ if (ret < 0) return ret;
365
+ }
366
+ break;
367
+ case 3:
368
+ { int ret = slice_from_s(z, 3, s_10);
369
+ if (ret < 0) return ret;
370
+ }
371
+ break;
372
+ case 4:
373
+ { int ret = slice_from_s(z, 4, s_11);
374
+ if (ret < 0) return ret;
375
+ }
376
+ break;
377
+ case 5:
378
+ { int ret = slice_from_s(z, 5, s_12);
379
+ if (ret < 0) return ret;
380
+ }
381
+ break;
382
+ case 6:
383
+ { int ret = slice_from_s(z, 4, s_13);
384
+ if (ret < 0) return ret;
385
+ }
386
+ break;
387
+ }
388
+ return 1;
389
+ }
390
+
391
+ static int r_verb_sfx(struct SN_env * z) {
392
+ int among_var;
393
+ z->ket = z->c;
394
+ if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((282896 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
395
+ among_var = find_among_b(z, a_3, 12);
396
+ if (!(among_var)) return 0;
397
+ z->bra = z->c;
398
+ switch (among_var) {
399
+ case 1:
400
+ { int ret = r_RV(z);
401
+ if (ret <= 0) return ret;
402
+ }
403
+ { int ret = slice_del(z);
404
+ if (ret < 0) return ret;
405
+ }
406
+ break;
407
+ case 2:
408
+ { int ret = r_R1(z);
409
+ if (ret <= 0) return ret;
410
+ }
411
+ { int ret = slice_del(z);
412
+ if (ret < 0) return ret;
413
+ }
414
+ break;
415
+ }
416
+ return 1;
417
+ }
418
+
419
+ extern int irish_UTF_8_stem(struct SN_env * z) {
420
+ { int c1 = z->c;
421
+ { int ret = r_initial_morph(z);
422
+ if (ret < 0) return ret;
423
+ }
424
+ z->c = c1;
425
+ }
426
+
427
+ { int ret = r_mark_regions(z);
428
+ if (ret < 0) return ret;
429
+ }
430
+ z->lb = z->c; z->c = z->l;
431
+
432
+ { int m2 = z->l - z->c; (void)m2;
433
+ { int ret = r_noun_sfx(z);
434
+ if (ret < 0) return ret;
435
+ }
436
+ z->c = z->l - m2;
437
+ }
438
+ { int m3 = z->l - z->c; (void)m3;
439
+ { int ret = r_deriv(z);
440
+ if (ret < 0) return ret;
441
+ }
442
+ z->c = z->l - m3;
443
+ }
444
+ { int m4 = z->l - z->c; (void)m4;
445
+ { int ret = r_verb_sfx(z);
446
+ if (ret < 0) return ret;
447
+ }
448
+ z->c = z->l - m4;
449
+ }
450
+ z->c = z->lb;
451
+ return 1;
452
+ }
453
+
454
+ extern struct SN_env * irish_UTF_8_create_env(void) { return SN_create_env(0, 3); }
455
+
456
+ extern void irish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
457
+
@@ -0,0 +1,6 @@
1
+ /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
+
3
+ extern struct SN_env * irish_UTF_8_create_env(void);
4
+ extern void irish_UTF_8_close_env(struct SN_env * z);
5
+
6
+ extern int irish_UTF_8_stem(struct SN_env * z);