isomorfeus-ferret 0.12.2 → 0.12.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +612 -612
  3. data/README.md +80 -44
  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_search.c +14 -2
  7. data/ext/isomorfeus_ferret_ext/frb_store.c +34 -5
  8. data/ext/isomorfeus_ferret_ext/frt_posh.h +11 -19
  9. data/ext/isomorfeus_ferret_ext/frt_q_parser.c +1844 -1911
  10. data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +12 -15
  11. data/ext/isomorfeus_ferret_ext/frt_scanner.c +1 -0
  12. data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +1 -0
  13. data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +1 -0
  14. data/ext/isomorfeus_ferret_ext/frt_search.h +1 -1
  15. data/ext/isomorfeus_ferret_ext/libstemmer.c +14 -11
  16. data/ext/isomorfeus_ferret_ext/libstemmer.h +4 -9
  17. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.c +1167 -0
  18. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.h +6 -0
  19. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.c +1433 -0
  20. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.h +6 -0
  21. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +120 -143
  22. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +1 -2
  23. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +217 -237
  24. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +1 -1
  25. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +377 -432
  26. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +1 -1
  27. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +298 -342
  28. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +1 -2
  29. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +530 -524
  30. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +1 -1
  31. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +201 -214
  32. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +1 -1
  33. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +1 -1
  34. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.c +394 -0
  35. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.h +6 -0
  36. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.c +457 -0
  37. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.h +6 -0
  38. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +396 -439
  39. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +1 -1
  40. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +104 -128
  41. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +1 -1
  42. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +242 -273
  43. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +1 -1
  44. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +406 -461
  45. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +1 -2
  46. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +405 -456
  47. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +1 -1
  48. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +108 -126
  49. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +1 -1
  50. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.c +849 -0
  51. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.h +6 -0
  52. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +373 -405
  53. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +1 -1
  54. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +288 -305
  55. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +1 -1
  56. data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.c +1651 -0
  57. data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.h +6 -0
  58. data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.c +546 -0
  59. data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.h +6 -0
  60. data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.c +1171 -0
  61. data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.h +6 -0
  62. data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.c +1436 -0
  63. data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.h +6 -0
  64. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.c +121 -141
  65. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.h +1 -1
  66. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.c +221 -241
  67. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.h +1 -1
  68. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.c +381 -431
  69. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.h +1 -1
  70. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.c +300 -345
  71. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.h +1 -1
  72. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.c +518 -511
  73. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.h +1 -1
  74. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.c +201 -209
  75. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.h +1 -1
  76. data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.c +3660 -0
  77. data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.h +6 -0
  78. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.c +309 -0
  79. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.h +6 -0
  80. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.c +306 -671
  81. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.h +1 -1
  82. data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.c +394 -0
  83. data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.h +6 -0
  84. data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.c +457 -0
  85. data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.h +6 -0
  86. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.c +400 -442
  87. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.h +1 -1
  88. data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.c +824 -0
  89. data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.h +6 -0
  90. data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.c +408 -0
  91. data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.h +6 -0
  92. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.c +105 -127
  93. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.h +1 -1
  94. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.c +245 -276
  95. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.h +1 -1
  96. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.c +409 -464
  97. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.h +1 -1
  98. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.c +376 -408
  99. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.h +1 -1
  100. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.c +272 -287
  101. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.h +1 -1
  102. data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.c +6530 -0
  103. data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.h +6 -0
  104. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.c +407 -458
  105. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.h +1 -1
  106. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.c +110 -125
  107. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.h +1 -1
  108. data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.c +1865 -0
  109. data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.h +6 -0
  110. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.c +698 -806
  111. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.h +1 -1
  112. data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.c +1220 -0
  113. data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.h +6 -0
  114. data/ext/isomorfeus_ferret_ext/stem_api.c +1 -9
  115. data/ext/isomorfeus_ferret_ext/stem_api.h +1 -3
  116. data/ext/isomorfeus_ferret_ext/stem_header.h +30 -26
  117. data/ext/isomorfeus_ferret_ext/stem_modules.h +113 -26
  118. data/ext/isomorfeus_ferret_ext/stem_modules.txt +18 -5
  119. data/ext/isomorfeus_ferret_ext/stem_utilities.c +167 -132
  120. data/ext/isomorfeus_ferret_ext/test.c +7 -1
  121. data/ext/isomorfeus_ferret_ext/test_search.c +0 -1
  122. data/lib/isomorfeus/ferret/index/index.rb +1 -1
  123. data/lib/isomorfeus/ferret/version.rb +1 -1
  124. metadata +43 -7
  125. data/ext/isomorfeus_ferret_ext/q_parser.y +0 -1366
@@ -0,0 +1,6 @@
1
+ /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2
+
3
+ extern struct SN_env * catalan_ISO_8859_1_create_env(void);
4
+ extern void catalan_ISO_8859_1_close_env(struct SN_env * z);
5
+
6
+ extern int catalan_ISO_8859_1_stem(struct SN_env * z);
@@ -1,5 +1,4 @@
1
-
2
- /* This file was generated automatically by the Snowball to ANSI C compiler */
1
+ /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
3
2
 
4
3
  #include "stem_header.h"
5
4
 
@@ -49,38 +48,38 @@ static const symbol s_0_31[4] = { 'e', 'r', 'e', 't' };
49
48
 
50
49
  static const struct among a_0[32] =
51
50
  {
52
- /* 0 */ { 3, s_0_0, -1, 1, 0},
53
- /* 1 */ { 5, s_0_1, 0, 1, 0},
54
- /* 2 */ { 4, s_0_2, -1, 1, 0},
55
- /* 3 */ { 1, s_0_3, -1, 1, 0},
56
- /* 4 */ { 5, s_0_4, 3, 1, 0},
57
- /* 5 */ { 4, s_0_5, 3, 1, 0},
58
- /* 6 */ { 6, s_0_6, 5, 1, 0},
59
- /* 7 */ { 3, s_0_7, 3, 1, 0},
60
- /* 8 */ { 4, s_0_8, 3, 1, 0},
61
- /* 9 */ { 3, s_0_9, 3, 1, 0},
62
- /* 10 */ { 2, s_0_10, -1, 1, 0},
63
- /* 11 */ { 5, s_0_11, 10, 1, 0},
64
- /* 12 */ { 4, s_0_12, 10, 1, 0},
65
- /* 13 */ { 2, s_0_13, -1, 1, 0},
66
- /* 14 */ { 5, s_0_14, 13, 1, 0},
67
- /* 15 */ { 4, s_0_15, 13, 1, 0},
68
- /* 16 */ { 1, s_0_16, -1, 2, 0},
69
- /* 17 */ { 4, s_0_17, 16, 1, 0},
70
- /* 18 */ { 2, s_0_18, 16, 1, 0},
71
- /* 19 */ { 5, s_0_19, 18, 1, 0},
72
- /* 20 */ { 7, s_0_20, 19, 1, 0},
73
- /* 21 */ { 4, s_0_21, 18, 1, 0},
74
- /* 22 */ { 5, s_0_22, 18, 1, 0},
75
- /* 23 */ { 4, s_0_23, 18, 1, 0},
76
- /* 24 */ { 3, s_0_24, 16, 1, 0},
77
- /* 25 */ { 6, s_0_25, 24, 1, 0},
78
- /* 26 */ { 5, s_0_26, 24, 1, 0},
79
- /* 27 */ { 3, s_0_27, 16, 1, 0},
80
- /* 28 */ { 3, s_0_28, 16, 1, 0},
81
- /* 29 */ { 5, s_0_29, 28, 1, 0},
82
- /* 30 */ { 2, s_0_30, -1, 1, 0},
83
- /* 31 */ { 4, s_0_31, 30, 1, 0}
51
+ { 3, s_0_0, -1, 1, 0},
52
+ { 5, s_0_1, 0, 1, 0},
53
+ { 4, s_0_2, -1, 1, 0},
54
+ { 1, s_0_3, -1, 1, 0},
55
+ { 5, s_0_4, 3, 1, 0},
56
+ { 4, s_0_5, 3, 1, 0},
57
+ { 6, s_0_6, 5, 1, 0},
58
+ { 3, s_0_7, 3, 1, 0},
59
+ { 4, s_0_8, 3, 1, 0},
60
+ { 3, s_0_9, 3, 1, 0},
61
+ { 2, s_0_10, -1, 1, 0},
62
+ { 5, s_0_11, 10, 1, 0},
63
+ { 4, s_0_12, 10, 1, 0},
64
+ { 2, s_0_13, -1, 1, 0},
65
+ { 5, s_0_14, 13, 1, 0},
66
+ { 4, s_0_15, 13, 1, 0},
67
+ { 1, s_0_16, -1, 2, 0},
68
+ { 4, s_0_17, 16, 1, 0},
69
+ { 2, s_0_18, 16, 1, 0},
70
+ { 5, s_0_19, 18, 1, 0},
71
+ { 7, s_0_20, 19, 1, 0},
72
+ { 4, s_0_21, 18, 1, 0},
73
+ { 5, s_0_22, 18, 1, 0},
74
+ { 4, s_0_23, 18, 1, 0},
75
+ { 3, s_0_24, 16, 1, 0},
76
+ { 6, s_0_25, 24, 1, 0},
77
+ { 5, s_0_26, 24, 1, 0},
78
+ { 3, s_0_27, 16, 1, 0},
79
+ { 3, s_0_28, 16, 1, 0},
80
+ { 5, s_0_29, 28, 1, 0},
81
+ { 2, s_0_30, -1, 1, 0},
82
+ { 4, s_0_31, 30, 1, 0}
84
83
  };
85
84
 
86
85
  static const symbol s_1_0[2] = { 'g', 'd' };
@@ -90,10 +89,10 @@ static const symbol s_1_3[2] = { 'k', 't' };
90
89
 
91
90
  static const struct among a_1[4] =
92
91
  {
93
- /* 0 */ { 2, s_1_0, -1, -1, 0},
94
- /* 1 */ { 2, s_1_1, -1, -1, 0},
95
- /* 2 */ { 2, s_1_2, -1, -1, 0},
96
- /* 3 */ { 2, s_1_3, -1, -1, 0}
92
+ { 2, s_1_0, -1, -1, 0},
93
+ { 2, s_1_1, -1, -1, 0},
94
+ { 2, s_1_2, -1, -1, 0},
95
+ { 2, s_1_3, -1, -1, 0}
97
96
  };
98
97
 
99
98
  static const symbol s_2_0[2] = { 'i', 'g' };
@@ -104,13 +103,15 @@ static const symbol s_2_4[4] = { 'l', 0xF8, 's', 't' };
104
103
 
105
104
  static const struct among a_2[5] =
106
105
  {
107
- /* 0 */ { 2, s_2_0, -1, 1, 0},
108
- /* 1 */ { 3, s_2_1, 0, 1, 0},
109
- /* 2 */ { 4, s_2_2, 1, 1, 0},
110
- /* 3 */ { 3, s_2_3, -1, 1, 0},
111
- /* 4 */ { 4, s_2_4, -1, 2, 0}
106
+ { 2, s_2_0, -1, 1, 0},
107
+ { 3, s_2_1, 0, 1, 0},
108
+ { 4, s_2_2, 1, 1, 0},
109
+ { 3, s_2_3, -1, 1, 0},
110
+ { 4, s_2_4, -1, 2, 0}
112
111
  };
113
112
 
113
+ static const unsigned char g_c[] = { 119, 223, 119, 1 };
114
+
114
115
  static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 };
115
116
 
116
117
  static const unsigned char g_s_ending[] = { 239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 };
@@ -120,54 +121,49 @@ static const symbol s_1[] = { 'i', 'g' };
120
121
  static const symbol s_2[] = { 'l', 0xF8, 's' };
121
122
 
122
123
  static int r_mark_regions(struct SN_env * z) {
123
- z->I[0] = z->l;
124
- { int c_test = z->c; /* test, line 33 */
125
- { int ret = z->c + 3;
126
- if (0 > ret || ret > z->l) return 0;
127
- z->c = ret; /* hop, line 33 */
128
- }
129
- z->I[1] = z->c; /* setmark x, line 33 */
130
- z->c = c_test;
124
+ z->I[1] = z->l;
125
+ { int c_test1 = z->c;
126
+ z->c = z->c + 3;
127
+ if (z->c > z->l) return 0;
128
+ z->I[0] = z->c;
129
+ z->c = c_test1;
131
130
  }
132
- if (out_grouping(z, g_v, 97, 248, 1) < 0) return 0; /* goto */ /* grouping v, line 34 */
133
- { /* gopast */ /* non v, line 34 */
131
+ if (out_grouping(z, g_v, 97, 248, 1) < 0) return 0;
132
+ {
134
133
  int ret = in_grouping(z, g_v, 97, 248, 1);
135
134
  if (ret < 0) return 0;
136
135
  z->c += ret;
137
136
  }
138
- z->I[0] = z->c; /* setmark p1, line 34 */
139
- /* try, line 35 */
140
- if (!(z->I[0] < z->I[1])) goto lab0;
141
- z->I[0] = z->I[1];
137
+ z->I[1] = z->c;
138
+
139
+ if (!(z->I[1] < z->I[0])) goto lab0;
140
+ z->I[1] = z->I[0];
142
141
  lab0:
143
142
  return 1;
144
143
  }
145
144
 
146
145
  static int r_main_suffix(struct SN_env * z) {
147
146
  int among_var;
148
- { int mlimit; /* setlimit, line 41 */
149
- int m1 = z->l - z->c; (void)m1;
150
- if (z->c < z->I[0]) return 0;
151
- z->c = z->I[0]; /* tomark, line 41 */
152
- mlimit = z->lb; z->lb = z->c;
153
- z->c = z->l - m1;
154
- z->ket = z->c; /* [, line 41 */
155
- if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851440 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
156
- among_var = find_among_b(z, a_0, 32); /* substring, line 41 */
157
- if (!(among_var)) { z->lb = mlimit; return 0; }
158
- z->bra = z->c; /* ], line 41 */
159
- z->lb = mlimit;
147
+
148
+ { int mlimit1;
149
+ if (z->c < z->I[1]) return 0;
150
+ mlimit1 = z->lb; z->lb = z->I[1];
151
+ z->ket = z->c;
152
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851440 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
153
+ among_var = find_among_b(z, a_0, 32);
154
+ if (!(among_var)) { z->lb = mlimit1; return 0; }
155
+ z->bra = z->c;
156
+ z->lb = mlimit1;
160
157
  }
161
- switch(among_var) {
162
- case 0: return 0;
158
+ switch (among_var) {
163
159
  case 1:
164
- { int ret = slice_del(z); /* delete, line 48 */
160
+ { int ret = slice_del(z);
165
161
  if (ret < 0) return ret;
166
162
  }
167
163
  break;
168
164
  case 2:
169
165
  if (in_grouping_b(z, g_s_ending, 97, 229, 0)) return 0;
170
- { int ret = slice_del(z); /* delete, line 50 */
166
+ { int ret = slice_del(z);
171
167
  if (ret < 0) return ret;
172
168
  }
173
169
  break;
@@ -176,25 +172,23 @@ static int r_main_suffix(struct SN_env * z) {
176
172
  }
177
173
 
178
174
  static int r_consonant_pair(struct SN_env * z) {
179
- { int m_test = z->l - z->c; /* test, line 55 */
180
- { int mlimit; /* setlimit, line 56 */
181
- int m1 = z->l - z->c; (void)m1;
182
- if (z->c < z->I[0]) return 0;
183
- z->c = z->I[0]; /* tomark, line 56 */
184
- mlimit = z->lb; z->lb = z->c;
185
- z->c = z->l - m1;
186
- z->ket = z->c; /* [, line 56 */
187
- if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit; return 0; }
188
- if (!(find_among_b(z, a_1, 4))) { z->lb = mlimit; return 0; } /* substring, line 56 */
189
- z->bra = z->c; /* ], line 56 */
190
- z->lb = mlimit;
175
+ { int m_test1 = z->l - z->c;
176
+
177
+ { int mlimit2;
178
+ if (z->c < z->I[1]) return 0;
179
+ mlimit2 = z->lb; z->lb = z->I[1];
180
+ z->ket = z->c;
181
+ if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit2; return 0; }
182
+ if (!(find_among_b(z, a_1, 4))) { z->lb = mlimit2; return 0; }
183
+ z->bra = z->c;
184
+ z->lb = mlimit2;
191
185
  }
192
- z->c = z->l - m_test;
186
+ z->c = z->l - m_test1;
193
187
  }
194
188
  if (z->c <= z->lb) return 0;
195
- z->c--; /* next, line 62 */
196
- z->bra = z->c; /* ], line 62 */
197
- { int ret = slice_del(z); /* delete, line 62 */
189
+ z->c--;
190
+ z->bra = z->c;
191
+ { int ret = slice_del(z);
198
192
  if (ret < 0) return ret;
199
193
  }
200
194
  return 1;
@@ -202,47 +196,42 @@ static int r_consonant_pair(struct SN_env * z) {
202
196
 
203
197
  static int r_other_suffix(struct SN_env * z) {
204
198
  int among_var;
205
- { int m1 = z->l - z->c; (void)m1; /* do, line 66 */
206
- z->ket = z->c; /* [, line 66 */
199
+ { int m1 = z->l - z->c; (void)m1;
200
+ z->ket = z->c;
207
201
  if (!(eq_s_b(z, 2, s_0))) goto lab0;
208
- z->bra = z->c; /* ], line 66 */
202
+ z->bra = z->c;
209
203
  if (!(eq_s_b(z, 2, s_1))) goto lab0;
210
- { int ret = slice_del(z); /* delete, line 66 */
204
+ { int ret = slice_del(z);
211
205
  if (ret < 0) return ret;
212
206
  }
213
207
  lab0:
214
208
  z->c = z->l - m1;
215
209
  }
216
- { int mlimit; /* setlimit, line 67 */
217
- int m2 = z->l - z->c; (void)m2;
218
- if (z->c < z->I[0]) return 0;
219
- z->c = z->I[0]; /* tomark, line 67 */
220
- mlimit = z->lb; z->lb = z->c;
221
- z->c = z->l - m2;
222
- z->ket = z->c; /* [, line 67 */
223
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
224
- among_var = find_among_b(z, a_2, 5); /* substring, line 67 */
225
- if (!(among_var)) { z->lb = mlimit; return 0; }
226
- z->bra = z->c; /* ], line 67 */
227
- z->lb = mlimit;
210
+
211
+ { int mlimit2;
212
+ if (z->c < z->I[1]) return 0;
213
+ mlimit2 = z->lb; z->lb = z->I[1];
214
+ z->ket = z->c;
215
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit2; return 0; }
216
+ among_var = find_among_b(z, a_2, 5);
217
+ if (!(among_var)) { z->lb = mlimit2; return 0; }
218
+ z->bra = z->c;
219
+ z->lb = mlimit2;
228
220
  }
229
- switch(among_var) {
230
- case 0: return 0;
221
+ switch (among_var) {
231
222
  case 1:
232
- { int ret = slice_del(z); /* delete, line 70 */
223
+ { int ret = slice_del(z);
233
224
  if (ret < 0) return ret;
234
225
  }
235
- { int m3 = z->l - z->c; (void)m3; /* do, line 70 */
226
+ { int m3 = z->l - z->c; (void)m3;
236
227
  { int ret = r_consonant_pair(z);
237
- if (ret == 0) goto lab1; /* call consonant_pair, line 70 */
238
228
  if (ret < 0) return ret;
239
229
  }
240
- lab1:
241
230
  z->c = z->l - m3;
242
231
  }
243
232
  break;
244
233
  case 2:
245
- { int ret = slice_from_s(z, 3, s_2); /* <-, line 72 */
234
+ { int ret = slice_from_s(z, 3, s_2);
246
235
  if (ret < 0) return ret;
247
236
  }
248
237
  break;
@@ -251,74 +240,62 @@ static int r_other_suffix(struct SN_env * z) {
251
240
  }
252
241
 
253
242
  static int r_undouble(struct SN_env * z) {
254
- { int mlimit; /* setlimit, line 76 */
255
- int m1 = z->l - z->c; (void)m1;
256
- if (z->c < z->I[0]) return 0;
257
- z->c = z->I[0]; /* tomark, line 76 */
258
- mlimit = z->lb; z->lb = z->c;
259
- z->c = z->l - m1;
260
- z->ket = z->c; /* [, line 76 */
261
- if (out_grouping_b(z, g_v, 97, 248, 0)) { z->lb = mlimit; return 0; }
262
- z->bra = z->c; /* ], line 76 */
263
- z->S[0] = slice_to(z, z->S[0]); /* -> ch, line 76 */
264
- if (z->S[0] == 0) return -1; /* -> ch, line 76 */
265
- z->lb = mlimit;
243
+
244
+ { int mlimit1;
245
+ if (z->c < z->I[1]) return 0;
246
+ mlimit1 = z->lb; z->lb = z->I[1];
247
+ z->ket = z->c;
248
+ if (in_grouping_b(z, g_c, 98, 122, 0)) { z->lb = mlimit1; return 0; }
249
+ z->bra = z->c;
250
+ z->S[0] = slice_to(z, z->S[0]);
251
+ if (z->S[0] == 0) return -1;
252
+ z->lb = mlimit1;
266
253
  }
267
- if (!(eq_v_b(z, z->S[0]))) return 0; /* name ch, line 77 */
268
- { int ret = slice_del(z); /* delete, line 78 */
254
+ if (!(eq_v_b(z, z->S[0]))) return 0;
255
+ { int ret = slice_del(z);
269
256
  if (ret < 0) return ret;
270
257
  }
271
258
  return 1;
272
259
  }
273
260
 
274
261
  extern int danish_ISO_8859_1_stem(struct SN_env * z) {
275
- { int c1 = z->c; /* do, line 84 */
262
+ { int c1 = z->c;
276
263
  { int ret = r_mark_regions(z);
277
- if (ret == 0) goto lab0; /* call mark_regions, line 84 */
278
264
  if (ret < 0) return ret;
279
265
  }
280
- lab0:
281
266
  z->c = c1;
282
267
  }
283
- z->lb = z->c; z->c = z->l; /* backwards, line 85 */
268
+ z->lb = z->c; z->c = z->l;
284
269
 
285
- { int m2 = z->l - z->c; (void)m2; /* do, line 86 */
270
+ { int m2 = z->l - z->c; (void)m2;
286
271
  { int ret = r_main_suffix(z);
287
- if (ret == 0) goto lab1; /* call main_suffix, line 86 */
288
272
  if (ret < 0) return ret;
289
273
  }
290
- lab1:
291
274
  z->c = z->l - m2;
292
275
  }
293
- { int m3 = z->l - z->c; (void)m3; /* do, line 87 */
276
+ { int m3 = z->l - z->c; (void)m3;
294
277
  { int ret = r_consonant_pair(z);
295
- if (ret == 0) goto lab2; /* call consonant_pair, line 87 */
296
278
  if (ret < 0) return ret;
297
279
  }
298
- lab2:
299
280
  z->c = z->l - m3;
300
281
  }
301
- { int m4 = z->l - z->c; (void)m4; /* do, line 88 */
282
+ { int m4 = z->l - z->c; (void)m4;
302
283
  { int ret = r_other_suffix(z);
303
- if (ret == 0) goto lab3; /* call other_suffix, line 88 */
304
284
  if (ret < 0) return ret;
305
285
  }
306
- lab3:
307
286
  z->c = z->l - m4;
308
287
  }
309
- { int m5 = z->l - z->c; (void)m5; /* do, line 89 */
288
+ { int m5 = z->l - z->c; (void)m5;
310
289
  { int ret = r_undouble(z);
311
- if (ret == 0) goto lab4; /* call undouble, line 89 */
312
290
  if (ret < 0) return ret;
313
291
  }
314
- lab4:
315
292
  z->c = z->l - m5;
316
293
  }
317
294
  z->c = z->lb;
318
295
  return 1;
319
296
  }
320
297
 
321
- extern struct SN_env * danish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2, 0); }
298
+ extern struct SN_env * danish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2); }
322
299
 
323
300
  extern void danish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 1); }
324
301
 
@@ -1,5 +1,4 @@
1
-
2
- /* This file was generated automatically by the Snowball to ANSI C compiler */
1
+ /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
3
2
 
4
3
  extern struct SN_env * danish_ISO_8859_1_create_env(void);
5
4
  extern void danish_ISO_8859_1_close_env(struct SN_env * z);