00001
00002
00003 #include <limits.h>
00004 #include "finnish.h"
00005
00006 static int tr_VI(Xapian::Stem::Internal * this_ptr) {
00007 return (static_cast<Xapian::InternalStemFinnish *>(this_ptr))->r_VI();
00008 }
00009
00010 static int tr_LONG(Xapian::Stem::Internal * this_ptr) {
00011 return (static_cast<Xapian::InternalStemFinnish *>(this_ptr))->r_LONG();
00012 }
00013
00014 static const among_function af[2] =
00015 {
00016 tr_VI,
00017 tr_LONG
00018 };
00019
00020 static const symbol s_pool[] = {
00021 #define s_0_0 0
00022 'p', 'a',
00023 #define s_0_1 2
00024 's', 't', 'i',
00025 #define s_0_2 5
00026 'k', 'a', 'a', 'n',
00027 #define s_0_3 9
00028 'h', 'a', 'n',
00029 #define s_0_4 12
00030 'k', 'i', 'n',
00031 #define s_0_5 15
00032 'h', 0xC3, 0xA4, 'n',
00033 #define s_0_6 19
00034 'k', 0xC3, 0xA4, 0xC3, 0xA4, 'n',
00035 #define s_0_7 25
00036 'k', 'o',
00037 #define s_0_8 27
00038 'p', 0xC3, 0xA4,
00039 #define s_0_9 30
00040 'k', 0xC3, 0xB6,
00041 #define s_1_0 33
00042 'l', 'l', 'a',
00043 #define s_1_1 36
00044 'n', 'a',
00045 #define s_1_2 38
00046 's', 's', 'a',
00047 #define s_1_3 41
00048 't', 'a',
00049 #define s_1_4 43
00050 'l', 't', 'a',
00051 #define s_1_5 46
00052 's', 't', 'a',
00053 #define s_2_0 49
00054 'l', 'l', 0xC3, 0xA4,
00055 #define s_2_1 53
00056 'n', 0xC3, 0xA4,
00057 #define s_2_2 56
00058 's', 's', 0xC3, 0xA4,
00059 #define s_2_3 60
00060 't', 0xC3, 0xA4,
00061 #define s_2_4 63
00062 'l', 't', 0xC3, 0xA4,
00063 #define s_2_5 67
00064 's', 't', 0xC3, 0xA4,
00065 #define s_3_0 71
00066 'l', 'l', 'e',
00067 #define s_3_1 74
00068 'i', 'n', 'e',
00069 #define s_4_0 77
00070 'n', 's', 'a',
00071 #define s_4_1 80
00072 'm', 'm', 'e',
00073 #define s_4_2 83
00074 'n', 'n', 'e',
00075 #define s_4_3 86
00076 'n', 'i',
00077 #define s_4_4 88
00078 's', 'i',
00079 #define s_4_5 90
00080 'a', 'n',
00081 #define s_4_6 92
00082 'e', 'n',
00083 #define s_4_7 94
00084 0xC3, 0xA4, 'n',
00085 #define s_4_8 97
00086 'n', 's', 0xC3, 0xA4,
00087 #define s_5_0 101
00088 'a', 'a',
00089 #define s_5_1 103
00090 'e', 'e',
00091 #define s_5_2 105
00092 'i', 'i',
00093 #define s_5_3 107
00094 'o', 'o',
00095 #define s_5_4 109
00096 'u', 'u',
00097 #define s_5_5 111
00098 0xC3, 0xA4, 0xC3, 0xA4,
00099 #define s_5_6 115
00100 0xC3, 0xB6, 0xC3, 0xB6,
00101 #define s_6_0 119
00102 'a',
00103 #define s_6_1 120
00104 'l', 'l', 'a',
00105 #define s_6_2 123
00106 'n', 'a',
00107 #define s_6_3 125
00108 's', 's', 'a',
00109 #define s_6_4 128
00110 't', 'a',
00111 #define s_6_5 130
00112 'l', 't', 'a',
00113 #define s_6_6 133
00114 's', 't', 'a',
00115 #define s_6_7 136
00116 't', 't', 'a',
00117 #define s_6_8 139
00118 'l', 'l', 'e',
00119 #define s_6_9 142
00120 'i', 'n', 'e',
00121 #define s_6_10 145
00122 'k', 's', 'i',
00123 #define s_6_11 148
00124 'n',
00125 #define s_6_12 149
00126 'h', 'a', 'n',
00127 #define s_6_13 152
00128 'd', 'e', 'n',
00129 #define s_6_14 155
00130 's', 'e', 'e', 'n',
00131 #define s_6_15 159
00132 'h', 'e', 'n',
00133 #define s_6_16 162
00134 't', 't', 'e', 'n',
00135 #define s_6_17 166
00136 'h', 'i', 'n',
00137 #define s_6_18 169
00138 's', 'i', 'i', 'n',
00139 #define s_6_19 173
00140 'h', 'o', 'n',
00141 #define s_6_20 176
00142 'h', 0xC3, 0xA4, 'n',
00143 #define s_6_21 180
00144 'h', 0xC3, 0xB6, 'n',
00145 #define s_6_22 184
00146 0xC3, 0xA4,
00147 #define s_6_23 186
00148 'l', 'l', 0xC3, 0xA4,
00149 #define s_6_24 190
00150 'n', 0xC3, 0xA4,
00151 #define s_6_25 193
00152 's', 's', 0xC3, 0xA4,
00153 #define s_6_26 197
00154 't', 0xC3, 0xA4,
00155 #define s_6_27 200
00156 'l', 't', 0xC3, 0xA4,
00157 #define s_6_28 204
00158 's', 't', 0xC3, 0xA4,
00159 #define s_6_29 208
00160 't', 't', 0xC3, 0xA4,
00161 #define s_7_0 212
00162 'e', 'j', 'a',
00163 #define s_7_1 215
00164 'm', 'm', 'a',
00165 #define s_7_2 218
00166 'i', 'm', 'm', 'a',
00167 #define s_7_3 222
00168 'm', 'p', 'a',
00169 #define s_7_4 225
00170 'i', 'm', 'p', 'a',
00171 #define s_7_5 229
00172 'm', 'm', 'i',
00173 #define s_7_6 232
00174 'i', 'm', 'm', 'i',
00175 #define s_7_7 236
00176 'm', 'p', 'i',
00177 #define s_7_8 239
00178 'i', 'm', 'p', 'i',
00179 #define s_7_9 243
00180 'e', 'j', 0xC3, 0xA4,
00181 #define s_7_10 247
00182 'm', 'm', 0xC3, 0xA4,
00183 #define s_7_11 251
00184 'i', 'm', 'm', 0xC3, 0xA4,
00185 #define s_7_12 256
00186 'm', 'p', 0xC3, 0xA4,
00187 #define s_7_13 260
00188 'i', 'm', 'p', 0xC3, 0xA4,
00189 #define s_8_0 265
00190 'i',
00191 #define s_8_1 266
00192 'j',
00193 #define s_9_0 267
00194 'm', 'm', 'a',
00195 #define s_9_1 270
00196 'i', 'm', 'm', 'a',
00197 };
00198
00199
00200 static const struct among a_0[10] =
00201 {
00202 { 2, s_0_0, -1, 1},
00203 { 3, s_0_1, -1, 2},
00204 { 4, s_0_2, -1, 1},
00205 { 3, s_0_3, -1, 1},
00206 { 3, s_0_4, -1, 1},
00207 { 4, s_0_5, -1, 1},
00208 { 6, s_0_6, -1, 1},
00209 { 2, s_0_7, -1, 1},
00210 { 3, s_0_8, -1, 1},
00211 { 3, s_0_9, -1, 1}
00212 };
00213
00214
00215 static const struct among a_1[6] =
00216 {
00217 { 3, s_1_0, -1, -1},
00218 { 2, s_1_1, -1, -1},
00219 { 3, s_1_2, -1, -1},
00220 { 2, s_1_3, -1, -1},
00221 { 3, s_1_4, 3, -1},
00222 { 3, s_1_5, 3, -1}
00223 };
00224
00225
00226 static const struct among a_2[6] =
00227 {
00228 { 4, s_2_0, -1, -1},
00229 { 3, s_2_1, -1, -1},
00230 { 4, s_2_2, -1, -1},
00231 { 3, s_2_3, -1, -1},
00232 { 4, s_2_4, 3, -1},
00233 { 4, s_2_5, 3, -1}
00234 };
00235
00236
00237 static const struct among a_3[2] =
00238 {
00239 { 3, s_3_0, -1, -1},
00240 { 3, s_3_1, -1, -1}
00241 };
00242
00243
00244 static const struct among a_4[9] =
00245 {
00246 { 3, s_4_0, -1, 3},
00247 { 3, s_4_1, -1, 3},
00248 { 3, s_4_2, -1, 3},
00249 { 2, s_4_3, -1, 2},
00250 { 2, s_4_4, -1, 1},
00251 { 2, s_4_5, -1, 4},
00252 { 2, s_4_6, -1, 6},
00253 { 3, s_4_7, -1, 5},
00254 { 4, s_4_8, -1, 3}
00255 };
00256
00257
00258 static const struct among a_5[7] =
00259 {
00260 { 2, s_5_0, -1, -1},
00261 { 2, s_5_1, -1, -1},
00262 { 2, s_5_2, -1, -1},
00263 { 2, s_5_3, -1, -1},
00264 { 2, s_5_4, -1, -1},
00265 { 4, s_5_5, -1, -1},
00266 { 4, s_5_6, -1, -1}
00267 };
00268
00269
00270 static const struct among a_6[30] =
00271 {
00272 { 1, s_6_0, -1, 8},
00273 { 3, s_6_1, 0, -1},
00274 { 2, s_6_2, 0, -1},
00275 { 3, s_6_3, 0, -1},
00276 { 2, s_6_4, 0, -1},
00277 { 3, s_6_5, 4, -1},
00278 { 3, s_6_6, 4, -1},
00279 { 3, s_6_7, 4, 9},
00280 { 3, s_6_8, -1, -1},
00281 { 3, s_6_9, -1, -1},
00282 { 3, s_6_10, -1, -1},
00283 { 1, s_6_11, -1, 7},
00284 { 3, s_6_12, 11, 1},
00285 { 3, s_6_13, 11, -1},
00286 { 4, s_6_14, 11, -1},
00287 { 3, s_6_15, 11, 2},
00288 { 4, s_6_16, 11, -1},
00289 { 3, s_6_17, 11, 3},
00290 { 4, s_6_18, 11, -1},
00291 { 3, s_6_19, 11, 4},
00292 { 4, s_6_20, 11, 5},
00293 { 4, s_6_21, 11, 6},
00294 { 2, s_6_22, -1, 8},
00295 { 4, s_6_23, 22, -1},
00296 { 3, s_6_24, 22, -1},
00297 { 4, s_6_25, 22, -1},
00298 { 3, s_6_26, 22, -1},
00299 { 4, s_6_27, 26, -1},
00300 { 4, s_6_28, 26, -1},
00301 { 4, s_6_29, 26, 9}
00302 };
00303
00304 static const unsigned char af_6[30] =
00305 {
00306 0,
00307 0,
00308 0,
00309 0,
00310 0,
00311 0,
00312 0,
00313 0,
00314 0,
00315 0,
00316 0,
00317 0,
00318 0,
00319 1 ,
00320 2 ,
00321 0,
00322 1 ,
00323 0,
00324 1 ,
00325 0,
00326 0,
00327 0,
00328 0,
00329 0,
00330 0,
00331 0,
00332 0,
00333 0,
00334 0,
00335 0
00336 };
00337
00338
00339 static const struct among a_7[14] =
00340 {
00341 { 3, s_7_0, -1, -1},
00342 { 3, s_7_1, -1, 1},
00343 { 4, s_7_2, 1, -1},
00344 { 3, s_7_3, -1, 1},
00345 { 4, s_7_4, 3, -1},
00346 { 3, s_7_5, -1, 1},
00347 { 4, s_7_6, 5, -1},
00348 { 3, s_7_7, -1, 1},
00349 { 4, s_7_8, 7, -1},
00350 { 4, s_7_9, -1, -1},
00351 { 4, s_7_10, -1, 1},
00352 { 5, s_7_11, 10, -1},
00353 { 4, s_7_12, -1, 1},
00354 { 5, s_7_13, 12, -1}
00355 };
00356
00357
00358 static const struct among a_8[2] =
00359 {
00360 { 1, s_8_0, -1, -1},
00361 { 1, s_8_1, -1, -1}
00362 };
00363
00364
00365 static const struct among a_9[2] =
00366 {
00367 { 3, s_9_0, -1, 1},
00368 { 4, s_9_1, 0, -1}
00369 };
00370
00371 static const unsigned char g_AEI[] = { 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 };
00372
00373 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 };
00374
00375 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 };
00376
00377 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 };
00378
00379 static const symbol s_0[] = { 'k', 's', 'e' };
00380 static const symbol s_1[] = { 'k', 's', 'i' };
00381 static const symbol s_2[] = { 0xC3, 0xA4 };
00382 static const symbol s_3[] = { 0xC3, 0xB6 };
00383 static const symbol s_4[] = { 'i', 'e' };
00384 static const symbol s_5[] = { 'p', 'o' };
00385 static const symbol s_6[] = { 'p', 'o' };
00386
00387 int Xapian::InternalStemFinnish::r_mark_regions() {
00388 I_p1 = l;
00389 I_p2 = l;
00390 if (out_grouping_U(g_V1, 97, 246, 1) < 0) return 0;
00391 { int ret = in_grouping_U(g_V1, 97, 246, 1);
00392 if (ret < 0) return 0;
00393 c += ret;
00394 }
00395 I_p1 = c;
00396 if (out_grouping_U(g_V1, 97, 246, 1) < 0) return 0;
00397 { int ret = in_grouping_U(g_V1, 97, 246, 1);
00398 if (ret < 0) return 0;
00399 c += ret;
00400 }
00401 I_p2 = c;
00402 return 1;
00403 }
00404
00405 int Xapian::InternalStemFinnish::r_R2() {
00406 if (!(I_p2 <= c)) return 0;
00407 return 1;
00408 }
00409
00410 int Xapian::InternalStemFinnish::r_particle_etc() {
00411 int among_var;
00412 { int m1 = l - c; (void)m1;
00413 int mlimit1;
00414 if (c < I_p1) return 0;
00415 c = I_p1;
00416 mlimit1 = lb; lb = c;
00417 c = l - m1;
00418 ket = c;
00419 among_var = find_among_b(s_pool, a_0, 10, 0, 0);
00420 if (!(among_var)) { lb = mlimit1; return 0; }
00421 bra = c;
00422 lb = mlimit1;
00423 }
00424 switch(among_var) {
00425 case 0: return 0;
00426 case 1:
00427 if (in_grouping_b_U(g_particle_end, 97, 246, 0)) return 0;
00428 break;
00429 case 2:
00430 { int ret = r_R2();
00431 if (ret <= 0) return ret;
00432 }
00433 break;
00434 }
00435 if (slice_del() == -1) return -1;
00436 return 1;
00437 }
00438
00439 int Xapian::InternalStemFinnish::r_possessive() {
00440 int among_var;
00441 { int m1 = l - c; (void)m1;
00442 int mlimit1;
00443 if (c < I_p1) return 0;
00444 c = I_p1;
00445 mlimit1 = lb; lb = c;
00446 c = l - m1;
00447 ket = c;
00448 among_var = find_among_b(s_pool, a_4, 9, 0, 0);
00449 if (!(among_var)) { lb = mlimit1; return 0; }
00450 bra = c;
00451 lb = mlimit1;
00452 }
00453 switch(among_var) {
00454 case 0: return 0;
00455 case 1:
00456 { int m2 = l - c; (void)m2;
00457 if (c <= lb || p[c - 1] != 'k') goto lab0;
00458 c--;
00459 return 0;
00460 lab0:
00461 c = l - m2;
00462 }
00463 if (slice_del() == -1) return -1;
00464 break;
00465 case 2:
00466 if (slice_del() == -1) return -1;
00467 ket = c;
00468 if (!(eq_s_b(3, s_0))) return 0;
00469 bra = c;
00470 { int ret = slice_from_s(3, s_1);
00471 if (ret < 0) return ret;
00472 }
00473 break;
00474 case 3:
00475 if (slice_del() == -1) return -1;
00476 break;
00477 case 4:
00478 if (c - 1 <= lb || p[c - 1] != 97) return 0;
00479 if (!(find_among_b(s_pool, a_1, 6, 0, 0))) return 0;
00480 if (slice_del() == -1) return -1;
00481 break;
00482 case 5:
00483 if (c - 2 <= lb || p[c - 1] != 164) return 0;
00484 if (!(find_among_b(s_pool, a_2, 6, 0, 0))) return 0;
00485 if (slice_del() == -1) return -1;
00486 break;
00487 case 6:
00488 if (c - 2 <= lb || p[c - 1] != 101) return 0;
00489 if (!(find_among_b(s_pool, a_3, 2, 0, 0))) return 0;
00490 if (slice_del() == -1) return -1;
00491 break;
00492 }
00493 return 1;
00494 }
00495
00496 int Xapian::InternalStemFinnish::r_LONG() {
00497 if (!(find_among_b(s_pool, a_5, 7, 0, 0))) return 0;
00498 return 1;
00499 }
00500
00501 int Xapian::InternalStemFinnish::r_VI() {
00502 if (c <= lb || p[c - 1] != 'i') return 0;
00503 c--;
00504 if (in_grouping_b_U(g_V2, 97, 246, 0)) return 0;
00505 return 1;
00506 }
00507
00508 int Xapian::InternalStemFinnish::r_case_ending() {
00509 int among_var;
00510 { int m1 = l - c; (void)m1;
00511 int mlimit1;
00512 if (c < I_p1) return 0;
00513 c = I_p1;
00514 mlimit1 = lb; lb = c;
00515 c = l - m1;
00516 ket = c;
00517 among_var = find_among_b(s_pool, a_6, 30, af_6, af);
00518 if (!(among_var)) { lb = mlimit1; return 0; }
00519 bra = c;
00520 lb = mlimit1;
00521 }
00522 switch(among_var) {
00523 case 0: return 0;
00524 case 1:
00525 if (c <= lb || p[c - 1] != 'a') return 0;
00526 c--;
00527 break;
00528 case 2:
00529 if (c <= lb || p[c - 1] != 'e') return 0;
00530 c--;
00531 break;
00532 case 3:
00533 if (c <= lb || p[c - 1] != 'i') return 0;
00534 c--;
00535 break;
00536 case 4:
00537 if (c <= lb || p[c - 1] != 'o') return 0;
00538 c--;
00539 break;
00540 case 5:
00541 if (!(eq_s_b(2, s_2))) return 0;
00542 break;
00543 case 6:
00544 if (!(eq_s_b(2, s_3))) return 0;
00545 break;
00546 case 7:
00547 { int m2 = l - c; (void)m2;
00548 { int m3 = l - c; (void)m3;
00549 { int m4 = l - c; (void)m4;
00550 { int ret = r_LONG();
00551 if (ret == 0) goto lab2;
00552 if (ret < 0) return ret;
00553 }
00554 goto lab1;
00555 lab2:
00556 c = l - m4;
00557 if (!(eq_s_b(2, s_4))) { c = l - m2; goto lab0; }
00558 }
00559 lab1:
00560 c = l - m3;
00561 { int ret = skip_utf8(p, c, lb, 0, -1);
00562 if (ret < 0) { c = l - m2; goto lab0; }
00563 c = ret;
00564 }
00565 }
00566 bra = c;
00567 lab0:
00568 ;
00569 }
00570 break;
00571 case 8:
00572 if (in_grouping_b_U(g_V1, 97, 246, 0)) return 0;
00573 if (out_grouping_b_U(g_V1, 97, 246, 0)) return 0;
00574 break;
00575 case 9:
00576 if (c <= lb || p[c - 1] != 'e') return 0;
00577 c--;
00578 break;
00579 }
00580 if (slice_del() == -1) return -1;
00581 B_ending_removed = 1;
00582 return 1;
00583 }
00584
00585 int Xapian::InternalStemFinnish::r_other_endings() {
00586 int among_var;
00587 { int m1 = l - c; (void)m1;
00588 int mlimit1;
00589 if (c < I_p2) return 0;
00590 c = I_p2;
00591 mlimit1 = lb; lb = c;
00592 c = l - m1;
00593 ket = c;
00594 among_var = find_among_b(s_pool, a_7, 14, 0, 0);
00595 if (!(among_var)) { lb = mlimit1; return 0; }
00596 bra = c;
00597 lb = mlimit1;
00598 }
00599 switch(among_var) {
00600 case 0: return 0;
00601 case 1:
00602 { int m2 = l - c; (void)m2;
00603 if (!(eq_s_b(2, s_5))) goto lab0;
00604 return 0;
00605 lab0:
00606 c = l - m2;
00607 }
00608 break;
00609 }
00610 if (slice_del() == -1) return -1;
00611 return 1;
00612 }
00613
00614 int Xapian::InternalStemFinnish::r_i_plural() {
00615 { int m1 = l - c; (void)m1;
00616 int mlimit1;
00617 if (c < I_p1) return 0;
00618 c = I_p1;
00619 mlimit1 = lb; lb = c;
00620 c = l - m1;
00621 ket = c;
00622 if (c <= lb || (p[c - 1] != 105 && p[c - 1] != 106)) { lb = mlimit1; return 0; }
00623 if (!(find_among_b(s_pool, a_8, 2, 0, 0))) { lb = mlimit1; return 0; }
00624 bra = c;
00625 lb = mlimit1;
00626 }
00627 if (slice_del() == -1) return -1;
00628 return 1;
00629 }
00630
00631 int Xapian::InternalStemFinnish::r_t_plural() {
00632 int among_var;
00633 { int m1 = l - c; (void)m1;
00634 int mlimit1;
00635 if (c < I_p1) return 0;
00636 c = I_p1;
00637 mlimit1 = lb; lb = c;
00638 c = l - m1;
00639 ket = c;
00640 if (c <= lb || p[c - 1] != 't') { lb = mlimit1; return 0; }
00641 c--;
00642 bra = c;
00643 { int m_test2 = l - c;
00644 if (in_grouping_b_U(g_V1, 97, 246, 0)) { lb = mlimit1; return 0; }
00645 c = l - m_test2;
00646 }
00647 if (slice_del() == -1) return -1;
00648 lb = mlimit1;
00649 }
00650 { int m3 = l - c; (void)m3;
00651 int mlimit3;
00652 if (c < I_p2) return 0;
00653 c = I_p2;
00654 mlimit3 = lb; lb = c;
00655 c = l - m3;
00656 ket = c;
00657 if (c - 2 <= lb || p[c - 1] != 97) { lb = mlimit3; return 0; }
00658 among_var = find_among_b(s_pool, a_9, 2, 0, 0);
00659 if (!(among_var)) { lb = mlimit3; return 0; }
00660 bra = c;
00661 lb = mlimit3;
00662 }
00663 switch(among_var) {
00664 case 0: return 0;
00665 case 1:
00666 { int m4 = l - c; (void)m4;
00667 if (!(eq_s_b(2, s_6))) goto lab0;
00668 return 0;
00669 lab0:
00670 c = l - m4;
00671 }
00672 break;
00673 }
00674 if (slice_del() == -1) return -1;
00675 return 1;
00676 }
00677
00678 int Xapian::InternalStemFinnish::r_tidy() {
00679 { int m1 = l - c; (void)m1;
00680 int mlimit1;
00681 if (c < I_p1) return 0;
00682 c = I_p1;
00683 mlimit1 = lb; lb = c;
00684 c = l - m1;
00685 { int m2 = l - c; (void)m2;
00686 { int m3 = l - c; (void)m3;
00687 { int ret = r_LONG();
00688 if (ret == 0) goto lab0;
00689 if (ret < 0) return ret;
00690 }
00691 c = l - m3;
00692 ket = c;
00693 { int ret = skip_utf8(p, c, lb, 0, -1);
00694 if (ret < 0) goto lab0;
00695 c = ret;
00696 }
00697 bra = c;
00698 if (slice_del() == -1) return -1;
00699 }
00700 lab0:
00701 c = l - m2;
00702 }
00703 { int m4 = l - c; (void)m4;
00704 ket = c;
00705 if (in_grouping_b_U(g_AEI, 97, 228, 0)) goto lab1;
00706 bra = c;
00707 if (out_grouping_b_U(g_V1, 97, 246, 0)) goto lab1;
00708 if (slice_del() == -1) return -1;
00709 lab1:
00710 c = l - m4;
00711 }
00712 { int m5 = l - c; (void)m5;
00713 ket = c;
00714 if (c <= lb || p[c - 1] != 'j') goto lab2;
00715 c--;
00716 bra = c;
00717 { int m6 = l - c; (void)m6;
00718 if (c <= lb || p[c - 1] != 'o') goto lab4;
00719 c--;
00720 goto lab3;
00721 lab4:
00722 c = l - m6;
00723 if (c <= lb || p[c - 1] != 'u') goto lab2;
00724 c--;
00725 }
00726 lab3:
00727 if (slice_del() == -1) return -1;
00728 lab2:
00729 c = l - m5;
00730 }
00731 { int m7 = l - c; (void)m7;
00732 ket = c;
00733 if (c <= lb || p[c - 1] != 'o') goto lab5;
00734 c--;
00735 bra = c;
00736 if (c <= lb || p[c - 1] != 'j') goto lab5;
00737 c--;
00738 if (slice_del() == -1) return -1;
00739 lab5:
00740 c = l - m7;
00741 }
00742 lb = mlimit1;
00743 }
00744 if (in_grouping_b_U(g_V1, 97, 246, 1) < 0) return 0;
00745 ket = c;
00746 { int ret = skip_utf8(p, c, lb, 0, -1);
00747 if (ret < 0) return 0;
00748 c = ret;
00749 }
00750 bra = c;
00751 { symbol * ret = slice_to(S_x);
00752 if (ret == 0) return -1;
00753 S_x = ret;
00754 }
00755 if (!(eq_v_b(S_x))) return 0;
00756 if (slice_del() == -1) return -1;
00757 return 1;
00758 }
00759
00760 int Xapian::InternalStemFinnish::stem() {
00761 { int c1 = c;
00762 { int ret = r_mark_regions();
00763 if (ret == 0) goto lab0;
00764 if (ret < 0) return ret;
00765 }
00766 lab0:
00767 c = c1;
00768 }
00769 B_ending_removed = 0;
00770 lb = c; c = l;
00771
00772 { int m2 = l - c; (void)m2;
00773 { int ret = r_particle_etc();
00774 if (ret == 0) goto lab1;
00775 if (ret < 0) return ret;
00776 }
00777 lab1:
00778 c = l - m2;
00779 }
00780 { int m3 = l - c; (void)m3;
00781 { int ret = r_possessive();
00782 if (ret == 0) goto lab2;
00783 if (ret < 0) return ret;
00784 }
00785 lab2:
00786 c = l - m3;
00787 }
00788 { int m4 = l - c; (void)m4;
00789 { int ret = r_case_ending();
00790 if (ret == 0) goto lab3;
00791 if (ret < 0) return ret;
00792 }
00793 lab3:
00794 c = l - m4;
00795 }
00796 { int m5 = l - c; (void)m5;
00797 { int ret = r_other_endings();
00798 if (ret == 0) goto lab4;
00799 if (ret < 0) return ret;
00800 }
00801 lab4:
00802 c = l - m5;
00803 }
00804 { int m6 = l - c; (void)m6;
00805 if (!(B_ending_removed)) goto lab6;
00806 { int m7 = l - c; (void)m7;
00807 { int ret = r_i_plural();
00808 if (ret == 0) goto lab7;
00809 if (ret < 0) return ret;
00810 }
00811 lab7:
00812 c = l - m7;
00813 }
00814 goto lab5;
00815 lab6:
00816 c = l - m6;
00817 { int m8 = l - c; (void)m8;
00818 { int ret = r_t_plural();
00819 if (ret == 0) goto lab8;
00820 if (ret < 0) return ret;
00821 }
00822 lab8:
00823 c = l - m8;
00824 }
00825 }
00826 lab5:
00827 { int m9 = l - c; (void)m9;
00828 { int ret = r_tidy();
00829 if (ret == 0) goto lab9;
00830 if (ret < 0) return ret;
00831 }
00832 lab9:
00833 c = l - m9;
00834 }
00835 c = lb;
00836 return 1;
00837 }
00838
00839 Xapian::InternalStemFinnish::InternalStemFinnish()
00840 : B_ending_removed(0), S_x(0), I_p2(0), I_p1(0)
00841 {
00842 S_x = create_s();
00843 }
00844
00845 Xapian::InternalStemFinnish::~InternalStemFinnish()
00846 {
00847 lose_s(S_x);
00848 }
00849
00850 const char *
00851 Xapian::InternalStemFinnish::get_description() const
00852 {
00853 return "finnish";
00854 }