ruby-stemmer 0.9.3-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/MIT-LICENSE +21 -0
  2. data/README.rdoc +113 -0
  3. data/Rakefile +70 -0
  4. data/TODO +0 -0
  5. data/VERSION +1 -0
  6. data/ext/lingua/extconf.rb +40 -0
  7. data/ext/lingua/stemmer.c +115 -0
  8. data/lib/lingua/1.8/stemmer_native.so +0 -0
  9. data/lib/lingua/1.9/stemmer_native.so +0 -0
  10. data/lib/lingua/stemmer.rb +60 -0
  11. data/libstemmer_c/MANIFEST +72 -0
  12. data/libstemmer_c/Makefile +9 -0
  13. data/libstemmer_c/Makefile.windows +15 -0
  14. data/libstemmer_c/README +125 -0
  15. data/libstemmer_c/examples/stemwords.c +209 -0
  16. data/libstemmer_c/include/libstemmer.h +79 -0
  17. data/libstemmer_c/libstemmer/libstemmer.c +93 -0
  18. data/libstemmer_c/libstemmer/libstemmer_utf8.c +93 -0
  19. data/libstemmer_c/libstemmer/modules.h +195 -0
  20. data/libstemmer_c/libstemmer/modules.txt +51 -0
  21. data/libstemmer_c/libstemmer/modules_utf8.h +123 -0
  22. data/libstemmer_c/libstemmer/modules_utf8.txt +50 -0
  23. data/libstemmer_c/mkinc.mak +86 -0
  24. data/libstemmer_c/mkinc_utf8.mak +54 -0
  25. data/libstemmer_c/runtime/api.c +66 -0
  26. data/libstemmer_c/runtime/api.h +26 -0
  27. data/libstemmer_c/runtime/header.h +58 -0
  28. data/libstemmer_c/runtime/utilities.c +478 -0
  29. data/libstemmer_c/src_c/stem_ISO_8859_1_danish.c +337 -0
  30. data/libstemmer_c/src_c/stem_ISO_8859_1_danish.h +16 -0
  31. data/libstemmer_c/src_c/stem_ISO_8859_1_dutch.c +624 -0
  32. data/libstemmer_c/src_c/stem_ISO_8859_1_dutch.h +16 -0
  33. data/libstemmer_c/src_c/stem_ISO_8859_1_english.c +1117 -0
  34. data/libstemmer_c/src_c/stem_ISO_8859_1_english.h +16 -0
  35. data/libstemmer_c/src_c/stem_ISO_8859_1_finnish.c +762 -0
  36. data/libstemmer_c/src_c/stem_ISO_8859_1_finnish.h +16 -0
  37. data/libstemmer_c/src_c/stem_ISO_8859_1_french.c +1246 -0
  38. data/libstemmer_c/src_c/stem_ISO_8859_1_french.h +16 -0
  39. data/libstemmer_c/src_c/stem_ISO_8859_1_german.c +503 -0
  40. data/libstemmer_c/src_c/stem_ISO_8859_1_german.h +16 -0
  41. data/libstemmer_c/src_c/stem_ISO_8859_1_hungarian.c +1230 -0
  42. data/libstemmer_c/src_c/stem_ISO_8859_1_hungarian.h +16 -0
  43. data/libstemmer_c/src_c/stem_ISO_8859_1_italian.c +1065 -0
  44. data/libstemmer_c/src_c/stem_ISO_8859_1_italian.h +16 -0
  45. data/libstemmer_c/src_c/stem_ISO_8859_1_latin.c +443 -0
  46. data/libstemmer_c/src_c/stem_ISO_8859_1_latin.h +16 -0
  47. data/libstemmer_c/src_c/stem_ISO_8859_1_norwegian.c +297 -0
  48. data/libstemmer_c/src_c/stem_ISO_8859_1_norwegian.h +16 -0
  49. data/libstemmer_c/src_c/stem_ISO_8859_1_porter.c +749 -0
  50. data/libstemmer_c/src_c/stem_ISO_8859_1_porter.h +16 -0
  51. data/libstemmer_c/src_c/stem_ISO_8859_1_portuguese.c +1017 -0
  52. data/libstemmer_c/src_c/stem_ISO_8859_1_portuguese.h +16 -0
  53. data/libstemmer_c/src_c/stem_ISO_8859_1_spanish.c +1093 -0
  54. data/libstemmer_c/src_c/stem_ISO_8859_1_spanish.h +16 -0
  55. data/libstemmer_c/src_c/stem_ISO_8859_1_swedish.c +307 -0
  56. data/libstemmer_c/src_c/stem_ISO_8859_1_swedish.h +16 -0
  57. data/libstemmer_c/src_c/stem_ISO_8859_2_romanian.c +998 -0
  58. data/libstemmer_c/src_c/stem_ISO_8859_2_romanian.h +16 -0
  59. data/libstemmer_c/src_c/stem_KOI8_R_russian.c +700 -0
  60. data/libstemmer_c/src_c/stem_KOI8_R_russian.h +16 -0
  61. data/libstemmer_c/src_c/stem_UTF_8_danish.c +339 -0
  62. data/libstemmer_c/src_c/stem_UTF_8_danish.h +16 -0
  63. data/libstemmer_c/src_c/stem_UTF_8_dutch.c +634 -0
  64. data/libstemmer_c/src_c/stem_UTF_8_dutch.h +16 -0
  65. data/libstemmer_c/src_c/stem_UTF_8_english.c +1125 -0
  66. data/libstemmer_c/src_c/stem_UTF_8_english.h +16 -0
  67. data/libstemmer_c/src_c/stem_UTF_8_finnish.c +768 -0
  68. data/libstemmer_c/src_c/stem_UTF_8_finnish.h +16 -0
  69. data/libstemmer_c/src_c/stem_UTF_8_french.c +1256 -0
  70. data/libstemmer_c/src_c/stem_UTF_8_french.h +16 -0
  71. data/libstemmer_c/src_c/stem_UTF_8_german.c +509 -0
  72. data/libstemmer_c/src_c/stem_UTF_8_german.h +16 -0
  73. data/libstemmer_c/src_c/stem_UTF_8_hungarian.c +1234 -0
  74. data/libstemmer_c/src_c/stem_UTF_8_hungarian.h +16 -0
  75. data/libstemmer_c/src_c/stem_UTF_8_italian.c +1073 -0
  76. data/libstemmer_c/src_c/stem_UTF_8_italian.h +16 -0
  77. data/libstemmer_c/src_c/stem_UTF_8_latin.c +443 -0
  78. data/libstemmer_c/src_c/stem_UTF_8_latin.h +16 -0
  79. data/libstemmer_c/src_c/stem_UTF_8_norwegian.c +299 -0
  80. data/libstemmer_c/src_c/stem_UTF_8_norwegian.h +16 -0
  81. data/libstemmer_c/src_c/stem_UTF_8_porter.c +755 -0
  82. data/libstemmer_c/src_c/stem_UTF_8_porter.h +16 -0
  83. data/libstemmer_c/src_c/stem_UTF_8_portuguese.c +1023 -0
  84. data/libstemmer_c/src_c/stem_UTF_8_portuguese.h +16 -0
  85. data/libstemmer_c/src_c/stem_UTF_8_romanian.c +1004 -0
  86. data/libstemmer_c/src_c/stem_UTF_8_romanian.h +16 -0
  87. data/libstemmer_c/src_c/stem_UTF_8_russian.c +694 -0
  88. data/libstemmer_c/src_c/stem_UTF_8_russian.h +16 -0
  89. data/libstemmer_c/src_c/stem_UTF_8_spanish.c +1097 -0
  90. data/libstemmer_c/src_c/stem_UTF_8_spanish.h +16 -0
  91. data/libstemmer_c/src_c/stem_UTF_8_swedish.c +309 -0
  92. data/libstemmer_c/src_c/stem_UTF_8_swedish.h +16 -0
  93. data/libstemmer_c/src_c/stem_UTF_8_turkish.c +2205 -0
  94. data/libstemmer_c/src_c/stem_UTF_8_turkish.h +16 -0
  95. data/test/helper.rb +3 -0
  96. data/test/lingua/test_stemmer.rb +99 -0
  97. metadata +162 -0
@@ -0,0 +1,700 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "../runtime/header.h"
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+ extern int russian_KOI8_R_stem(struct SN_env * z);
10
+ #ifdef __cplusplus
11
+ }
12
+ #endif
13
+ static int r_tidy_up(struct SN_env * z);
14
+ static int r_derivational(struct SN_env * z);
15
+ static int r_noun(struct SN_env * z);
16
+ static int r_verb(struct SN_env * z);
17
+ static int r_reflexive(struct SN_env * z);
18
+ static int r_adjectival(struct SN_env * z);
19
+ static int r_adjective(struct SN_env * z);
20
+ static int r_perfective_gerund(struct SN_env * z);
21
+ static int r_R2(struct SN_env * z);
22
+ static int r_mark_regions(struct SN_env * z);
23
+ #ifdef __cplusplus
24
+ extern "C" {
25
+ #endif
26
+
27
+
28
+ extern struct SN_env * russian_KOI8_R_create_env(void);
29
+ extern void russian_KOI8_R_close_env(struct SN_env * z);
30
+
31
+
32
+ #ifdef __cplusplus
33
+ }
34
+ #endif
35
+ static const symbol s_0_0[3] = { 0xD7, 0xDB, 0xC9 };
36
+ static const symbol s_0_1[4] = { 0xC9, 0xD7, 0xDB, 0xC9 };
37
+ static const symbol s_0_2[4] = { 0xD9, 0xD7, 0xDB, 0xC9 };
38
+ static const symbol s_0_3[1] = { 0xD7 };
39
+ static const symbol s_0_4[2] = { 0xC9, 0xD7 };
40
+ static const symbol s_0_5[2] = { 0xD9, 0xD7 };
41
+ static const symbol s_0_6[5] = { 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
42
+ static const symbol s_0_7[6] = { 0xC9, 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
43
+ static const symbol s_0_8[6] = { 0xD9, 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
44
+
45
+ static const struct among a_0[9] =
46
+ {
47
+ /* 0 */ { 3, s_0_0, -1, 1, 0},
48
+ /* 1 */ { 4, s_0_1, 0, 2, 0},
49
+ /* 2 */ { 4, s_0_2, 0, 2, 0},
50
+ /* 3 */ { 1, s_0_3, -1, 1, 0},
51
+ /* 4 */ { 2, s_0_4, 3, 2, 0},
52
+ /* 5 */ { 2, s_0_5, 3, 2, 0},
53
+ /* 6 */ { 5, s_0_6, -1, 1, 0},
54
+ /* 7 */ { 6, s_0_7, 6, 2, 0},
55
+ /* 8 */ { 6, s_0_8, 6, 2, 0}
56
+ };
57
+
58
+ static const symbol s_1_0[2] = { 0xC0, 0xC0 };
59
+ static const symbol s_1_1[2] = { 0xC5, 0xC0 };
60
+ static const symbol s_1_2[2] = { 0xCF, 0xC0 };
61
+ static const symbol s_1_3[2] = { 0xD5, 0xC0 };
62
+ static const symbol s_1_4[2] = { 0xC5, 0xC5 };
63
+ static const symbol s_1_5[2] = { 0xC9, 0xC5 };
64
+ static const symbol s_1_6[2] = { 0xCF, 0xC5 };
65
+ static const symbol s_1_7[2] = { 0xD9, 0xC5 };
66
+ static const symbol s_1_8[2] = { 0xC9, 0xC8 };
67
+ static const symbol s_1_9[2] = { 0xD9, 0xC8 };
68
+ static const symbol s_1_10[3] = { 0xC9, 0xCD, 0xC9 };
69
+ static const symbol s_1_11[3] = { 0xD9, 0xCD, 0xC9 };
70
+ static const symbol s_1_12[2] = { 0xC5, 0xCA };
71
+ static const symbol s_1_13[2] = { 0xC9, 0xCA };
72
+ static const symbol s_1_14[2] = { 0xCF, 0xCA };
73
+ static const symbol s_1_15[2] = { 0xD9, 0xCA };
74
+ static const symbol s_1_16[2] = { 0xC5, 0xCD };
75
+ static const symbol s_1_17[2] = { 0xC9, 0xCD };
76
+ static const symbol s_1_18[2] = { 0xCF, 0xCD };
77
+ static const symbol s_1_19[2] = { 0xD9, 0xCD };
78
+ static const symbol s_1_20[3] = { 0xC5, 0xC7, 0xCF };
79
+ static const symbol s_1_21[3] = { 0xCF, 0xC7, 0xCF };
80
+ static const symbol s_1_22[2] = { 0xC1, 0xD1 };
81
+ static const symbol s_1_23[2] = { 0xD1, 0xD1 };
82
+ static const symbol s_1_24[3] = { 0xC5, 0xCD, 0xD5 };
83
+ static const symbol s_1_25[3] = { 0xCF, 0xCD, 0xD5 };
84
+
85
+ static const struct among a_1[26] =
86
+ {
87
+ /* 0 */ { 2, s_1_0, -1, 1, 0},
88
+ /* 1 */ { 2, s_1_1, -1, 1, 0},
89
+ /* 2 */ { 2, s_1_2, -1, 1, 0},
90
+ /* 3 */ { 2, s_1_3, -1, 1, 0},
91
+ /* 4 */ { 2, s_1_4, -1, 1, 0},
92
+ /* 5 */ { 2, s_1_5, -1, 1, 0},
93
+ /* 6 */ { 2, s_1_6, -1, 1, 0},
94
+ /* 7 */ { 2, s_1_7, -1, 1, 0},
95
+ /* 8 */ { 2, s_1_8, -1, 1, 0},
96
+ /* 9 */ { 2, s_1_9, -1, 1, 0},
97
+ /* 10 */ { 3, s_1_10, -1, 1, 0},
98
+ /* 11 */ { 3, s_1_11, -1, 1, 0},
99
+ /* 12 */ { 2, s_1_12, -1, 1, 0},
100
+ /* 13 */ { 2, s_1_13, -1, 1, 0},
101
+ /* 14 */ { 2, s_1_14, -1, 1, 0},
102
+ /* 15 */ { 2, s_1_15, -1, 1, 0},
103
+ /* 16 */ { 2, s_1_16, -1, 1, 0},
104
+ /* 17 */ { 2, s_1_17, -1, 1, 0},
105
+ /* 18 */ { 2, s_1_18, -1, 1, 0},
106
+ /* 19 */ { 2, s_1_19, -1, 1, 0},
107
+ /* 20 */ { 3, s_1_20, -1, 1, 0},
108
+ /* 21 */ { 3, s_1_21, -1, 1, 0},
109
+ /* 22 */ { 2, s_1_22, -1, 1, 0},
110
+ /* 23 */ { 2, s_1_23, -1, 1, 0},
111
+ /* 24 */ { 3, s_1_24, -1, 1, 0},
112
+ /* 25 */ { 3, s_1_25, -1, 1, 0}
113
+ };
114
+
115
+ static const symbol s_2_0[2] = { 0xC5, 0xCD };
116
+ static const symbol s_2_1[2] = { 0xCE, 0xCE };
117
+ static const symbol s_2_2[2] = { 0xD7, 0xDB };
118
+ static const symbol s_2_3[3] = { 0xC9, 0xD7, 0xDB };
119
+ static const symbol s_2_4[3] = { 0xD9, 0xD7, 0xDB };
120
+ static const symbol s_2_5[1] = { 0xDD };
121
+ static const symbol s_2_6[2] = { 0xC0, 0xDD };
122
+ static const symbol s_2_7[3] = { 0xD5, 0xC0, 0xDD };
123
+
124
+ static const struct among a_2[8] =
125
+ {
126
+ /* 0 */ { 2, s_2_0, -1, 1, 0},
127
+ /* 1 */ { 2, s_2_1, -1, 1, 0},
128
+ /* 2 */ { 2, s_2_2, -1, 1, 0},
129
+ /* 3 */ { 3, s_2_3, 2, 2, 0},
130
+ /* 4 */ { 3, s_2_4, 2, 2, 0},
131
+ /* 5 */ { 1, s_2_5, -1, 1, 0},
132
+ /* 6 */ { 2, s_2_6, 5, 1, 0},
133
+ /* 7 */ { 3, s_2_7, 6, 2, 0}
134
+ };
135
+
136
+ static const symbol s_3_0[2] = { 0xD3, 0xD1 };
137
+ static const symbol s_3_1[2] = { 0xD3, 0xD8 };
138
+
139
+ static const struct among a_3[2] =
140
+ {
141
+ /* 0 */ { 2, s_3_0, -1, 1, 0},
142
+ /* 1 */ { 2, s_3_1, -1, 1, 0}
143
+ };
144
+
145
+ static const symbol s_4_0[1] = { 0xC0 };
146
+ static const symbol s_4_1[2] = { 0xD5, 0xC0 };
147
+ static const symbol s_4_2[2] = { 0xCC, 0xC1 };
148
+ static const symbol s_4_3[3] = { 0xC9, 0xCC, 0xC1 };
149
+ static const symbol s_4_4[3] = { 0xD9, 0xCC, 0xC1 };
150
+ static const symbol s_4_5[2] = { 0xCE, 0xC1 };
151
+ static const symbol s_4_6[3] = { 0xC5, 0xCE, 0xC1 };
152
+ static const symbol s_4_7[3] = { 0xC5, 0xD4, 0xC5 };
153
+ static const symbol s_4_8[3] = { 0xC9, 0xD4, 0xC5 };
154
+ static const symbol s_4_9[3] = { 0xCA, 0xD4, 0xC5 };
155
+ static const symbol s_4_10[4] = { 0xC5, 0xCA, 0xD4, 0xC5 };
156
+ static const symbol s_4_11[4] = { 0xD5, 0xCA, 0xD4, 0xC5 };
157
+ static const symbol s_4_12[2] = { 0xCC, 0xC9 };
158
+ static const symbol s_4_13[3] = { 0xC9, 0xCC, 0xC9 };
159
+ static const symbol s_4_14[3] = { 0xD9, 0xCC, 0xC9 };
160
+ static const symbol s_4_15[1] = { 0xCA };
161
+ static const symbol s_4_16[2] = { 0xC5, 0xCA };
162
+ static const symbol s_4_17[2] = { 0xD5, 0xCA };
163
+ static const symbol s_4_18[1] = { 0xCC };
164
+ static const symbol s_4_19[2] = { 0xC9, 0xCC };
165
+ static const symbol s_4_20[2] = { 0xD9, 0xCC };
166
+ static const symbol s_4_21[2] = { 0xC5, 0xCD };
167
+ static const symbol s_4_22[2] = { 0xC9, 0xCD };
168
+ static const symbol s_4_23[2] = { 0xD9, 0xCD };
169
+ static const symbol s_4_24[1] = { 0xCE };
170
+ static const symbol s_4_25[2] = { 0xC5, 0xCE };
171
+ static const symbol s_4_26[2] = { 0xCC, 0xCF };
172
+ static const symbol s_4_27[3] = { 0xC9, 0xCC, 0xCF };
173
+ static const symbol s_4_28[3] = { 0xD9, 0xCC, 0xCF };
174
+ static const symbol s_4_29[2] = { 0xCE, 0xCF };
175
+ static const symbol s_4_30[3] = { 0xC5, 0xCE, 0xCF };
176
+ static const symbol s_4_31[3] = { 0xCE, 0xCE, 0xCF };
177
+ static const symbol s_4_32[2] = { 0xC0, 0xD4 };
178
+ static const symbol s_4_33[3] = { 0xD5, 0xC0, 0xD4 };
179
+ static const symbol s_4_34[2] = { 0xC5, 0xD4 };
180
+ static const symbol s_4_35[3] = { 0xD5, 0xC5, 0xD4 };
181
+ static const symbol s_4_36[2] = { 0xC9, 0xD4 };
182
+ static const symbol s_4_37[2] = { 0xD1, 0xD4 };
183
+ static const symbol s_4_38[2] = { 0xD9, 0xD4 };
184
+ static const symbol s_4_39[2] = { 0xD4, 0xD8 };
185
+ static const symbol s_4_40[3] = { 0xC9, 0xD4, 0xD8 };
186
+ static const symbol s_4_41[3] = { 0xD9, 0xD4, 0xD8 };
187
+ static const symbol s_4_42[3] = { 0xC5, 0xDB, 0xD8 };
188
+ static const symbol s_4_43[3] = { 0xC9, 0xDB, 0xD8 };
189
+ static const symbol s_4_44[2] = { 0xCE, 0xD9 };
190
+ static const symbol s_4_45[3] = { 0xC5, 0xCE, 0xD9 };
191
+
192
+ static const struct among a_4[46] =
193
+ {
194
+ /* 0 */ { 1, s_4_0, -1, 2, 0},
195
+ /* 1 */ { 2, s_4_1, 0, 2, 0},
196
+ /* 2 */ { 2, s_4_2, -1, 1, 0},
197
+ /* 3 */ { 3, s_4_3, 2, 2, 0},
198
+ /* 4 */ { 3, s_4_4, 2, 2, 0},
199
+ /* 5 */ { 2, s_4_5, -1, 1, 0},
200
+ /* 6 */ { 3, s_4_6, 5, 2, 0},
201
+ /* 7 */ { 3, s_4_7, -1, 1, 0},
202
+ /* 8 */ { 3, s_4_8, -1, 2, 0},
203
+ /* 9 */ { 3, s_4_9, -1, 1, 0},
204
+ /* 10 */ { 4, s_4_10, 9, 2, 0},
205
+ /* 11 */ { 4, s_4_11, 9, 2, 0},
206
+ /* 12 */ { 2, s_4_12, -1, 1, 0},
207
+ /* 13 */ { 3, s_4_13, 12, 2, 0},
208
+ /* 14 */ { 3, s_4_14, 12, 2, 0},
209
+ /* 15 */ { 1, s_4_15, -1, 1, 0},
210
+ /* 16 */ { 2, s_4_16, 15, 2, 0},
211
+ /* 17 */ { 2, s_4_17, 15, 2, 0},
212
+ /* 18 */ { 1, s_4_18, -1, 1, 0},
213
+ /* 19 */ { 2, s_4_19, 18, 2, 0},
214
+ /* 20 */ { 2, s_4_20, 18, 2, 0},
215
+ /* 21 */ { 2, s_4_21, -1, 1, 0},
216
+ /* 22 */ { 2, s_4_22, -1, 2, 0},
217
+ /* 23 */ { 2, s_4_23, -1, 2, 0},
218
+ /* 24 */ { 1, s_4_24, -1, 1, 0},
219
+ /* 25 */ { 2, s_4_25, 24, 2, 0},
220
+ /* 26 */ { 2, s_4_26, -1, 1, 0},
221
+ /* 27 */ { 3, s_4_27, 26, 2, 0},
222
+ /* 28 */ { 3, s_4_28, 26, 2, 0},
223
+ /* 29 */ { 2, s_4_29, -1, 1, 0},
224
+ /* 30 */ { 3, s_4_30, 29, 2, 0},
225
+ /* 31 */ { 3, s_4_31, 29, 1, 0},
226
+ /* 32 */ { 2, s_4_32, -1, 1, 0},
227
+ /* 33 */ { 3, s_4_33, 32, 2, 0},
228
+ /* 34 */ { 2, s_4_34, -1, 1, 0},
229
+ /* 35 */ { 3, s_4_35, 34, 2, 0},
230
+ /* 36 */ { 2, s_4_36, -1, 2, 0},
231
+ /* 37 */ { 2, s_4_37, -1, 2, 0},
232
+ /* 38 */ { 2, s_4_38, -1, 2, 0},
233
+ /* 39 */ { 2, s_4_39, -1, 1, 0},
234
+ /* 40 */ { 3, s_4_40, 39, 2, 0},
235
+ /* 41 */ { 3, s_4_41, 39, 2, 0},
236
+ /* 42 */ { 3, s_4_42, -1, 1, 0},
237
+ /* 43 */ { 3, s_4_43, -1, 2, 0},
238
+ /* 44 */ { 2, s_4_44, -1, 1, 0},
239
+ /* 45 */ { 3, s_4_45, 44, 2, 0}
240
+ };
241
+
242
+ static const symbol s_5_0[1] = { 0xC0 };
243
+ static const symbol s_5_1[2] = { 0xC9, 0xC0 };
244
+ static const symbol s_5_2[2] = { 0xD8, 0xC0 };
245
+ static const symbol s_5_3[1] = { 0xC1 };
246
+ static const symbol s_5_4[1] = { 0xC5 };
247
+ static const symbol s_5_5[2] = { 0xC9, 0xC5 };
248
+ static const symbol s_5_6[2] = { 0xD8, 0xC5 };
249
+ static const symbol s_5_7[2] = { 0xC1, 0xC8 };
250
+ static const symbol s_5_8[2] = { 0xD1, 0xC8 };
251
+ static const symbol s_5_9[3] = { 0xC9, 0xD1, 0xC8 };
252
+ static const symbol s_5_10[1] = { 0xC9 };
253
+ static const symbol s_5_11[2] = { 0xC5, 0xC9 };
254
+ static const symbol s_5_12[2] = { 0xC9, 0xC9 };
255
+ static const symbol s_5_13[3] = { 0xC1, 0xCD, 0xC9 };
256
+ static const symbol s_5_14[3] = { 0xD1, 0xCD, 0xC9 };
257
+ static const symbol s_5_15[4] = { 0xC9, 0xD1, 0xCD, 0xC9 };
258
+ static const symbol s_5_16[1] = { 0xCA };
259
+ static const symbol s_5_17[2] = { 0xC5, 0xCA };
260
+ static const symbol s_5_18[3] = { 0xC9, 0xC5, 0xCA };
261
+ static const symbol s_5_19[2] = { 0xC9, 0xCA };
262
+ static const symbol s_5_20[2] = { 0xCF, 0xCA };
263
+ static const symbol s_5_21[2] = { 0xC1, 0xCD };
264
+ static const symbol s_5_22[2] = { 0xC5, 0xCD };
265
+ static const symbol s_5_23[3] = { 0xC9, 0xC5, 0xCD };
266
+ static const symbol s_5_24[2] = { 0xCF, 0xCD };
267
+ static const symbol s_5_25[2] = { 0xD1, 0xCD };
268
+ static const symbol s_5_26[3] = { 0xC9, 0xD1, 0xCD };
269
+ static const symbol s_5_27[1] = { 0xCF };
270
+ static const symbol s_5_28[1] = { 0xD1 };
271
+ static const symbol s_5_29[2] = { 0xC9, 0xD1 };
272
+ static const symbol s_5_30[2] = { 0xD8, 0xD1 };
273
+ static const symbol s_5_31[1] = { 0xD5 };
274
+ static const symbol s_5_32[2] = { 0xC5, 0xD7 };
275
+ static const symbol s_5_33[2] = { 0xCF, 0xD7 };
276
+ static const symbol s_5_34[1] = { 0xD8 };
277
+ static const symbol s_5_35[1] = { 0xD9 };
278
+
279
+ static const struct among a_5[36] =
280
+ {
281
+ /* 0 */ { 1, s_5_0, -1, 1, 0},
282
+ /* 1 */ { 2, s_5_1, 0, 1, 0},
283
+ /* 2 */ { 2, s_5_2, 0, 1, 0},
284
+ /* 3 */ { 1, s_5_3, -1, 1, 0},
285
+ /* 4 */ { 1, s_5_4, -1, 1, 0},
286
+ /* 5 */ { 2, s_5_5, 4, 1, 0},
287
+ /* 6 */ { 2, s_5_6, 4, 1, 0},
288
+ /* 7 */ { 2, s_5_7, -1, 1, 0},
289
+ /* 8 */ { 2, s_5_8, -1, 1, 0},
290
+ /* 9 */ { 3, s_5_9, 8, 1, 0},
291
+ /* 10 */ { 1, s_5_10, -1, 1, 0},
292
+ /* 11 */ { 2, s_5_11, 10, 1, 0},
293
+ /* 12 */ { 2, s_5_12, 10, 1, 0},
294
+ /* 13 */ { 3, s_5_13, 10, 1, 0},
295
+ /* 14 */ { 3, s_5_14, 10, 1, 0},
296
+ /* 15 */ { 4, s_5_15, 14, 1, 0},
297
+ /* 16 */ { 1, s_5_16, -1, 1, 0},
298
+ /* 17 */ { 2, s_5_17, 16, 1, 0},
299
+ /* 18 */ { 3, s_5_18, 17, 1, 0},
300
+ /* 19 */ { 2, s_5_19, 16, 1, 0},
301
+ /* 20 */ { 2, s_5_20, 16, 1, 0},
302
+ /* 21 */ { 2, s_5_21, -1, 1, 0},
303
+ /* 22 */ { 2, s_5_22, -1, 1, 0},
304
+ /* 23 */ { 3, s_5_23, 22, 1, 0},
305
+ /* 24 */ { 2, s_5_24, -1, 1, 0},
306
+ /* 25 */ { 2, s_5_25, -1, 1, 0},
307
+ /* 26 */ { 3, s_5_26, 25, 1, 0},
308
+ /* 27 */ { 1, s_5_27, -1, 1, 0},
309
+ /* 28 */ { 1, s_5_28, -1, 1, 0},
310
+ /* 29 */ { 2, s_5_29, 28, 1, 0},
311
+ /* 30 */ { 2, s_5_30, 28, 1, 0},
312
+ /* 31 */ { 1, s_5_31, -1, 1, 0},
313
+ /* 32 */ { 2, s_5_32, -1, 1, 0},
314
+ /* 33 */ { 2, s_5_33, -1, 1, 0},
315
+ /* 34 */ { 1, s_5_34, -1, 1, 0},
316
+ /* 35 */ { 1, s_5_35, -1, 1, 0}
317
+ };
318
+
319
+ static const symbol s_6_0[3] = { 0xCF, 0xD3, 0xD4 };
320
+ static const symbol s_6_1[4] = { 0xCF, 0xD3, 0xD4, 0xD8 };
321
+
322
+ static const struct among a_6[2] =
323
+ {
324
+ /* 0 */ { 3, s_6_0, -1, 1, 0},
325
+ /* 1 */ { 4, s_6_1, -1, 1, 0}
326
+ };
327
+
328
+ static const symbol s_7_0[4] = { 0xC5, 0xCA, 0xDB, 0xC5 };
329
+ static const symbol s_7_1[1] = { 0xCE };
330
+ static const symbol s_7_2[1] = { 0xD8 };
331
+ static const symbol s_7_3[3] = { 0xC5, 0xCA, 0xDB };
332
+
333
+ static const struct among a_7[4] =
334
+ {
335
+ /* 0 */ { 4, s_7_0, -1, 1, 0},
336
+ /* 1 */ { 1, s_7_1, -1, 2, 0},
337
+ /* 2 */ { 1, s_7_2, -1, 3, 0},
338
+ /* 3 */ { 3, s_7_3, -1, 1, 0}
339
+ };
340
+
341
+ static const unsigned char g_v[] = { 35, 130, 34, 18 };
342
+
343
+ static const symbol s_0[] = { 0xC1 };
344
+ static const symbol s_1[] = { 0xD1 };
345
+ static const symbol s_2[] = { 0xC1 };
346
+ static const symbol s_3[] = { 0xD1 };
347
+ static const symbol s_4[] = { 0xC1 };
348
+ static const symbol s_5[] = { 0xD1 };
349
+ static const symbol s_6[] = { 0xCE };
350
+ static const symbol s_7[] = { 0xCE };
351
+ static const symbol s_8[] = { 0xCE };
352
+ static const symbol s_9[] = { 0xC9 };
353
+
354
+ static int r_mark_regions(struct SN_env * z) {
355
+ z->I[0] = z->l;
356
+ z->I[1] = z->l;
357
+ { int c1 = z->c; /* do, line 63 */
358
+ { /* gopast */ /* grouping v, line 64 */
359
+ int ret = out_grouping(z, g_v, 192, 220, 1);
360
+ if (ret < 0) goto lab0;
361
+ z->c += ret;
362
+ }
363
+ z->I[0] = z->c; /* setmark pV, line 64 */
364
+ { /* gopast */ /* non v, line 64 */
365
+ int ret = in_grouping(z, g_v, 192, 220, 1);
366
+ if (ret < 0) goto lab0;
367
+ z->c += ret;
368
+ }
369
+ { /* gopast */ /* grouping v, line 65 */
370
+ int ret = out_grouping(z, g_v, 192, 220, 1);
371
+ if (ret < 0) goto lab0;
372
+ z->c += ret;
373
+ }
374
+ { /* gopast */ /* non v, line 65 */
375
+ int ret = in_grouping(z, g_v, 192, 220, 1);
376
+ if (ret < 0) goto lab0;
377
+ z->c += ret;
378
+ }
379
+ z->I[1] = z->c; /* setmark p2, line 65 */
380
+ lab0:
381
+ z->c = c1;
382
+ }
383
+ return 1;
384
+ }
385
+
386
+ static int r_R2(struct SN_env * z) {
387
+ if (!(z->I[1] <= z->c)) return 0;
388
+ return 1;
389
+ }
390
+
391
+ static int r_perfective_gerund(struct SN_env * z) {
392
+ int among_var;
393
+ z->ket = z->c; /* [, line 74 */
394
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((25166336 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
395
+ among_var = find_among_b(z, a_0, 9); /* substring, line 74 */
396
+ if (!(among_var)) return 0;
397
+ z->bra = z->c; /* ], line 74 */
398
+ switch(among_var) {
399
+ case 0: return 0;
400
+ case 1:
401
+ { int m1 = z->l - z->c; (void)m1; /* or, line 78 */
402
+ if (!(eq_s_b(z, 1, s_0))) goto lab1;
403
+ goto lab0;
404
+ lab1:
405
+ z->c = z->l - m1;
406
+ if (!(eq_s_b(z, 1, s_1))) return 0;
407
+ }
408
+ lab0:
409
+ { int ret = slice_del(z); /* delete, line 78 */
410
+ if (ret < 0) return ret;
411
+ }
412
+ break;
413
+ case 2:
414
+ { int ret = slice_del(z); /* delete, line 85 */
415
+ if (ret < 0) return ret;
416
+ }
417
+ break;
418
+ }
419
+ return 1;
420
+ }
421
+
422
+ static int r_adjective(struct SN_env * z) {
423
+ int among_var;
424
+ z->ket = z->c; /* [, line 90 */
425
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((2271009 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
426
+ among_var = find_among_b(z, a_1, 26); /* substring, line 90 */
427
+ if (!(among_var)) return 0;
428
+ z->bra = z->c; /* ], line 90 */
429
+ switch(among_var) {
430
+ case 0: return 0;
431
+ case 1:
432
+ { int ret = slice_del(z); /* delete, line 99 */
433
+ if (ret < 0) return ret;
434
+ }
435
+ break;
436
+ }
437
+ return 1;
438
+ }
439
+
440
+ static int r_adjectival(struct SN_env * z) {
441
+ int among_var;
442
+ { int ret = r_adjective(z);
443
+ if (ret == 0) return 0; /* call adjective, line 104 */
444
+ if (ret < 0) return ret;
445
+ }
446
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
447
+ z->ket = z->c; /* [, line 112 */
448
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((671113216 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->c = z->l - m_keep; goto lab0; }
449
+ among_var = find_among_b(z, a_2, 8); /* substring, line 112 */
450
+ if (!(among_var)) { z->c = z->l - m_keep; goto lab0; }
451
+ z->bra = z->c; /* ], line 112 */
452
+ switch(among_var) {
453
+ case 0: { z->c = z->l - m_keep; goto lab0; }
454
+ case 1:
455
+ { int m1 = z->l - z->c; (void)m1; /* or, line 117 */
456
+ if (!(eq_s_b(z, 1, s_2))) goto lab2;
457
+ goto lab1;
458
+ lab2:
459
+ z->c = z->l - m1;
460
+ if (!(eq_s_b(z, 1, s_3))) { z->c = z->l - m_keep; goto lab0; }
461
+ }
462
+ lab1:
463
+ { int ret = slice_del(z); /* delete, line 117 */
464
+ if (ret < 0) return ret;
465
+ }
466
+ break;
467
+ case 2:
468
+ { int ret = slice_del(z); /* delete, line 124 */
469
+ if (ret < 0) return ret;
470
+ }
471
+ break;
472
+ }
473
+ lab0:
474
+ ;
475
+ }
476
+ return 1;
477
+ }
478
+
479
+ static int r_reflexive(struct SN_env * z) {
480
+ int among_var;
481
+ z->ket = z->c; /* [, line 131 */
482
+ if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 209 && z->p[z->c - 1] != 216)) return 0;
483
+ among_var = find_among_b(z, a_3, 2); /* substring, line 131 */
484
+ if (!(among_var)) return 0;
485
+ z->bra = z->c; /* ], line 131 */
486
+ switch(among_var) {
487
+ case 0: return 0;
488
+ case 1:
489
+ { int ret = slice_del(z); /* delete, line 134 */
490
+ if (ret < 0) return ret;
491
+ }
492
+ break;
493
+ }
494
+ return 1;
495
+ }
496
+
497
+ static int r_verb(struct SN_env * z) {
498
+ int among_var;
499
+ z->ket = z->c; /* [, line 139 */
500
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((51443235 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
501
+ among_var = find_among_b(z, a_4, 46); /* substring, line 139 */
502
+ if (!(among_var)) return 0;
503
+ z->bra = z->c; /* ], line 139 */
504
+ switch(among_var) {
505
+ case 0: return 0;
506
+ case 1:
507
+ { int m1 = z->l - z->c; (void)m1; /* or, line 145 */
508
+ if (!(eq_s_b(z, 1, s_4))) goto lab1;
509
+ goto lab0;
510
+ lab1:
511
+ z->c = z->l - m1;
512
+ if (!(eq_s_b(z, 1, s_5))) return 0;
513
+ }
514
+ lab0:
515
+ { int ret = slice_del(z); /* delete, line 145 */
516
+ if (ret < 0) return ret;
517
+ }
518
+ break;
519
+ case 2:
520
+ { int ret = slice_del(z); /* delete, line 153 */
521
+ if (ret < 0) return ret;
522
+ }
523
+ break;
524
+ }
525
+ return 1;
526
+ }
527
+
528
+ static int r_noun(struct SN_env * z) {
529
+ int among_var;
530
+ z->ket = z->c; /* [, line 162 */
531
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((60991267 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
532
+ among_var = find_among_b(z, a_5, 36); /* substring, line 162 */
533
+ if (!(among_var)) return 0;
534
+ z->bra = z->c; /* ], line 162 */
535
+ switch(among_var) {
536
+ case 0: return 0;
537
+ case 1:
538
+ { int ret = slice_del(z); /* delete, line 169 */
539
+ if (ret < 0) return ret;
540
+ }
541
+ break;
542
+ }
543
+ return 1;
544
+ }
545
+
546
+ static int r_derivational(struct SN_env * z) {
547
+ int among_var;
548
+ z->ket = z->c; /* [, line 178 */
549
+ if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 212 && z->p[z->c - 1] != 216)) return 0;
550
+ among_var = find_among_b(z, a_6, 2); /* substring, line 178 */
551
+ if (!(among_var)) return 0;
552
+ z->bra = z->c; /* ], line 178 */
553
+ { int ret = r_R2(z);
554
+ if (ret == 0) return 0; /* call R2, line 178 */
555
+ if (ret < 0) return ret;
556
+ }
557
+ switch(among_var) {
558
+ case 0: return 0;
559
+ case 1:
560
+ { int ret = slice_del(z); /* delete, line 181 */
561
+ if (ret < 0) return ret;
562
+ }
563
+ break;
564
+ }
565
+ return 1;
566
+ }
567
+
568
+ static int r_tidy_up(struct SN_env * z) {
569
+ int among_var;
570
+ z->ket = z->c; /* [, line 186 */
571
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((151011360 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
572
+ among_var = find_among_b(z, a_7, 4); /* substring, line 186 */
573
+ if (!(among_var)) return 0;
574
+ z->bra = z->c; /* ], line 186 */
575
+ switch(among_var) {
576
+ case 0: return 0;
577
+ case 1:
578
+ { int ret = slice_del(z); /* delete, line 190 */
579
+ if (ret < 0) return ret;
580
+ }
581
+ z->ket = z->c; /* [, line 191 */
582
+ if (!(eq_s_b(z, 1, s_6))) return 0;
583
+ z->bra = z->c; /* ], line 191 */
584
+ if (!(eq_s_b(z, 1, s_7))) return 0;
585
+ { int ret = slice_del(z); /* delete, line 191 */
586
+ if (ret < 0) return ret;
587
+ }
588
+ break;
589
+ case 2:
590
+ if (!(eq_s_b(z, 1, s_8))) return 0;
591
+ { int ret = slice_del(z); /* delete, line 194 */
592
+ if (ret < 0) return ret;
593
+ }
594
+ break;
595
+ case 3:
596
+ { int ret = slice_del(z); /* delete, line 196 */
597
+ if (ret < 0) return ret;
598
+ }
599
+ break;
600
+ }
601
+ return 1;
602
+ }
603
+
604
+ extern int russian_KOI8_R_stem(struct SN_env * z) {
605
+ { int c1 = z->c; /* do, line 203 */
606
+ { int ret = r_mark_regions(z);
607
+ if (ret == 0) goto lab0; /* call mark_regions, line 203 */
608
+ if (ret < 0) return ret;
609
+ }
610
+ lab0:
611
+ z->c = c1;
612
+ }
613
+ z->lb = z->c; z->c = z->l; /* backwards, line 204 */
614
+
615
+ { int mlimit; /* setlimit, line 204 */
616
+ int m2 = z->l - z->c; (void)m2;
617
+ if (z->c < z->I[0]) return 0;
618
+ z->c = z->I[0]; /* tomark, line 204 */
619
+ mlimit = z->lb; z->lb = z->c;
620
+ z->c = z->l - m2;
621
+ { int m3 = z->l - z->c; (void)m3; /* do, line 205 */
622
+ { int m4 = z->l - z->c; (void)m4; /* or, line 206 */
623
+ { int ret = r_perfective_gerund(z);
624
+ if (ret == 0) goto lab3; /* call perfective_gerund, line 206 */
625
+ if (ret < 0) return ret;
626
+ }
627
+ goto lab2;
628
+ lab3:
629
+ z->c = z->l - m4;
630
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 207 */
631
+ { int ret = r_reflexive(z);
632
+ if (ret == 0) { z->c = z->l - m_keep; goto lab4; } /* call reflexive, line 207 */
633
+ if (ret < 0) return ret;
634
+ }
635
+ lab4:
636
+ ;
637
+ }
638
+ { int m5 = z->l - z->c; (void)m5; /* or, line 208 */
639
+ { int ret = r_adjectival(z);
640
+ if (ret == 0) goto lab6; /* call adjectival, line 208 */
641
+ if (ret < 0) return ret;
642
+ }
643
+ goto lab5;
644
+ lab6:
645
+ z->c = z->l - m5;
646
+ { int ret = r_verb(z);
647
+ if (ret == 0) goto lab7; /* call verb, line 208 */
648
+ if (ret < 0) return ret;
649
+ }
650
+ goto lab5;
651
+ lab7:
652
+ z->c = z->l - m5;
653
+ { int ret = r_noun(z);
654
+ if (ret == 0) goto lab1; /* call noun, line 208 */
655
+ if (ret < 0) return ret;
656
+ }
657
+ }
658
+ lab5:
659
+ ;
660
+ }
661
+ lab2:
662
+ lab1:
663
+ z->c = z->l - m3;
664
+ }
665
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 211 */
666
+ z->ket = z->c; /* [, line 211 */
667
+ if (!(eq_s_b(z, 1, s_9))) { z->c = z->l - m_keep; goto lab8; }
668
+ z->bra = z->c; /* ], line 211 */
669
+ { int ret = slice_del(z); /* delete, line 211 */
670
+ if (ret < 0) return ret;
671
+ }
672
+ lab8:
673
+ ;
674
+ }
675
+ { int m6 = z->l - z->c; (void)m6; /* do, line 214 */
676
+ { int ret = r_derivational(z);
677
+ if (ret == 0) goto lab9; /* call derivational, line 214 */
678
+ if (ret < 0) return ret;
679
+ }
680
+ lab9:
681
+ z->c = z->l - m6;
682
+ }
683
+ { int m7 = z->l - z->c; (void)m7; /* do, line 215 */
684
+ { int ret = r_tidy_up(z);
685
+ if (ret == 0) goto lab10; /* call tidy_up, line 215 */
686
+ if (ret < 0) return ret;
687
+ }
688
+ lab10:
689
+ z->c = z->l - m7;
690
+ }
691
+ z->lb = mlimit;
692
+ }
693
+ z->c = z->lb;
694
+ return 1;
695
+ }
696
+
697
+ extern struct SN_env * russian_KOI8_R_create_env(void) { return SN_create_env(0, 2, 0); }
698
+
699
+ extern void russian_KOI8_R_close_env(struct SN_env * z) { SN_close_env(z, 0); }
700
+