Commit cbcc8726 authored by Peter Eisentraut's avatar Peter Eisentraut

Update snowball

Update to snowball tag v2.0.0.  Major changes are new stemmers for
Basque, Catalan, and Hindi.

Discussion: https://www.postgresql.org/message-id/flat/a8eeabd6-2be1-43fe-401e-a97594c38478%402ndquadrant.com
parent 57cb8063
......@@ -23,6 +23,8 @@ OBJS = \
utilities.o
OBJS += \
stem_ISO_8859_1_basque.o \
stem_ISO_8859_1_catalan.o \
stem_ISO_8859_1_danish.o \
stem_ISO_8859_1_dutch.o \
stem_ISO_8859_1_english.o \
......@@ -41,6 +43,8 @@ OBJS += \
stem_ISO_8859_2_romanian.o \
stem_KOI8_R_russian.o \
stem_UTF_8_arabic.o \
stem_UTF_8_basque.o \
stem_UTF_8_catalan.o \
stem_UTF_8_danish.o \
stem_UTF_8_dutch.o \
stem_UTF_8_english.o \
......@@ -48,6 +52,7 @@ OBJS += \
stem_UTF_8_french.o \
stem_UTF_8_german.o \
stem_UTF_8_greek.o \
stem_UTF_8_hindi.o \
stem_UTF_8_hungarian.o \
stem_UTF_8_indonesian.o \
stem_UTF_8_irish.o \
......@@ -70,6 +75,8 @@ OBJS += \
# must come after creation of that language
LANGUAGES= \
arabic arabic \
basque basque \
catalan catalan \
danish danish \
dutch dutch \
english english \
......@@ -77,6 +84,7 @@ LANGUAGES= \
french french \
german german \
greek greek \
hindi english \
hungarian hungarian \
indonesian indonesian \
irish irish \
......
......@@ -7,7 +7,7 @@ This module uses the word stemming code developed by the Snowball project,
http://snowballstem.org (formerly http://snowball.tartarus.org)
which is released by them under a BSD-style license.
The Snowball project is not currently making formal releases; it's best
The Snowball project does not often make formal releases; it's best
to pull from their git repository
git clone https://github.com/snowballstem/snowball.git
......@@ -29,8 +29,8 @@ We choose to include the derived files in the PostgreSQL distribution
because most installations will not have the Snowball compiler available.
We are currently synced with the Snowball git commit
4456b82c26c02493e8807a66f30593a98c5d2888
of 2019-06-24.
c70ed64f9d41c1032fba4e962b054f8e9d489a74 (tag v2.0.0)
of 2019-10-02.
To update the PostgreSQL sources from a new Snowball version:
......@@ -44,6 +44,9 @@ do
sed 's|\.\./runtime/header\.h|header.h|' $f >libstemmer/`basename $f`
done
Do not copy stemmers that are listed in libstemmer/modules.txt as
nonstandard, such as "german2" or "lovins".
2. Copy the *.c files in snowball/runtime/ to
src/backend/snowball/libstemmer, and edit them to remove direct inclusions
of system headers such as <stdio.h> --- they should only include "header.h".
......
......@@ -26,6 +26,8 @@
/* Now we can include the original Snowball header.h */
#include "snowball/libstemmer/header.h"
#include "snowball/libstemmer/stem_ISO_8859_1_basque.h"
#include "snowball/libstemmer/stem_ISO_8859_1_catalan.h"
#include "snowball/libstemmer/stem_ISO_8859_1_danish.h"
#include "snowball/libstemmer/stem_ISO_8859_1_dutch.h"
#include "snowball/libstemmer/stem_ISO_8859_1_english.h"
......@@ -44,6 +46,8 @@
#include "snowball/libstemmer/stem_ISO_8859_2_romanian.h"
#include "snowball/libstemmer/stem_KOI8_R_russian.h"
#include "snowball/libstemmer/stem_UTF_8_arabic.h"
#include "snowball/libstemmer/stem_UTF_8_basque.h"
#include "snowball/libstemmer/stem_UTF_8_catalan.h"
#include "snowball/libstemmer/stem_UTF_8_danish.h"
#include "snowball/libstemmer/stem_UTF_8_dutch.h"
#include "snowball/libstemmer/stem_UTF_8_english.h"
......@@ -51,6 +55,7 @@
#include "snowball/libstemmer/stem_UTF_8_french.h"
#include "snowball/libstemmer/stem_UTF_8_german.h"
#include "snowball/libstemmer/stem_UTF_8_greek.h"
#include "snowball/libstemmer/stem_UTF_8_hindi.h"
#include "snowball/libstemmer/stem_UTF_8_hungarian.h"
#include "snowball/libstemmer/stem_UTF_8_indonesian.h"
#include "snowball/libstemmer/stem_UTF_8_irish.h"
......@@ -92,6 +97,8 @@ static const stemmer_module stemmer_modules[] =
/*
* Stemmers list from Snowball distribution
*/
STEMMER_MODULE(basque, PG_LATIN1, ISO_8859_1),
STEMMER_MODULE(catalan, PG_LATIN1, ISO_8859_1),
STEMMER_MODULE(danish, PG_LATIN1, ISO_8859_1),
STEMMER_MODULE(dutch, PG_LATIN1, ISO_8859_1),
STEMMER_MODULE(english, PG_LATIN1, ISO_8859_1),
......@@ -110,6 +117,8 @@ static const stemmer_module stemmer_modules[] =
STEMMER_MODULE(romanian, PG_LATIN2, ISO_8859_2),
STEMMER_MODULE(russian, PG_KOI8R, KOI8_R),
STEMMER_MODULE(arabic, PG_UTF8, UTF_8),
STEMMER_MODULE(basque, PG_UTF8, UTF_8),
STEMMER_MODULE(catalan, PG_UTF8, UTF_8),
STEMMER_MODULE(danish, PG_UTF8, UTF_8),
STEMMER_MODULE(dutch, PG_UTF8, UTF_8),
STEMMER_MODULE(english, PG_UTF8, UTF_8),
......@@ -117,6 +126,7 @@ static const stemmer_module stemmer_modules[] =
STEMMER_MODULE(french, PG_UTF8, UTF_8),
STEMMER_MODULE(german, PG_UTF8, UTF_8),
STEMMER_MODULE(greek, PG_UTF8, UTF_8),
STEMMER_MODULE(hindi, PG_UTF8, UTF_8),
STEMMER_MODULE(hungarian, PG_UTF8, UTF_8),
STEMMER_MODULE(indonesian, PG_UTF8, UTF_8),
STEMMER_MODULE(irish, PG_UTF8, UTF_8),
......
......@@ -61,4 +61,3 @@ extern int SN_set_current(struct SN_env * z, int size, const symbol * s)
z->c = 0;
return err;
}
This diff is collapsed.
This diff is collapsed.
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -241,10 +240,8 @@ static int r_other_suffix(struct SN_env * z) { /* backwardmode */
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 72 */
{ int ret = r_consonant_pair(z); /* call consonant_pair, line 72 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m3;
}
break;
......@@ -279,44 +276,34 @@ static int r_undouble(struct SN_env * z) { /* backwardmode */
extern int danish_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 86 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 86 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 87 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 88 */
{ int ret = r_main_suffix(z); /* call main_suffix, line 88 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 89 */
{ int ret = r_consonant_pair(z); /* call consonant_pair, line 89 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 90 */
{ int ret = r_other_suffix(z); /* call other_suffix, line 90 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 91 */
{ int ret = r_undouble(z); /* call undouble, line 91 */
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
lab4:
z->c = z->l - m5;
}
z->c = z->lb;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -383,8 +382,9 @@ static int r_prelude(struct SN_env * z) { /* forwardmode */
z->c = c2;
}
{ int c3 = z->c; /* do, line 29 */
while(1) { /* repeat, line 29 */
int c4 = z->c;
/* repeat, line 29 */
while(1) { int c4 = z->c;
while(1) { /* goto, line 29 */
int c5 = z->c;
if (in_grouping(z, g_v, 97, 121, 0)) goto lab4; /* grouping v, line 29 */
......@@ -940,8 +940,9 @@ static int r_exception1(struct SN_env * z) { /* forwardmode */
static int r_postlude(struct SN_env * z) { /* forwardmode */
if (!(z->B[0])) return 0; /* Boolean test Y_found, line 203 */
while(1) { /* repeat, line 203 */
int c1 = z->c;
/* repeat, line 203 */
while(1) { int c1 = z->c;
while(1) { /* goto, line 203 */
int c2 = z->c;
z->bra = z->c; /* [, line 203 */
......@@ -989,91 +990,71 @@ extern int english_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
z->c = c1;
/* do, line 209 */
{ int ret = r_prelude(z); /* call prelude, line 209 */
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
lab4:
/* do, line 210 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 210 */
if (ret == 0) goto lab5;
if (ret < 0) return ret;
}
lab5:
z->lb = z->c; z->c = z->l; /* backwards, line 211 */
{ int m3 = z->l - z->c; (void)m3; /* do, line 213 */
{ int ret = r_Step_1a(z); /* call Step_1a, line 213 */
if (ret == 0) goto lab6;
if (ret < 0) return ret;
}
lab6:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* or, line 215 */
{ int ret = r_exception2(z); /* call exception2, line 215 */
if (ret == 0) goto lab8;
if (ret == 0) goto lab5;
if (ret < 0) return ret;
}
goto lab7;
lab8:
goto lab4;
lab5:
z->c = z->l - m4;
{ int m5 = z->l - z->c; (void)m5; /* do, line 217 */
{ int ret = r_Step_1b(z); /* call Step_1b, line 217 */
if (ret == 0) goto lab9;
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m5;
}
{ int m6 = z->l - z->c; (void)m6; /* do, line 218 */
{ int ret = r_Step_1c(z); /* call Step_1c, line 218 */
if (ret == 0) goto lab10;
if (ret < 0) return ret;
}
lab10:
z->c = z->l - m6;
}
{ int m7 = z->l - z->c; (void)m7; /* do, line 220 */
{ int ret = r_Step_2(z); /* call Step_2, line 220 */
if (ret == 0) goto lab11;
if (ret < 0) return ret;
}
lab11:
z->c = z->l - m7;
}
{ int m8 = z->l - z->c; (void)m8; /* do, line 221 */
{ int ret = r_Step_3(z); /* call Step_3, line 221 */
if (ret == 0) goto lab12;
if (ret < 0) return ret;
}
lab12:
z->c = z->l - m8;
}
{ int m9 = z->l - z->c; (void)m9; /* do, line 222 */
{ int ret = r_Step_4(z); /* call Step_4, line 222 */
if (ret == 0) goto lab13;
if (ret < 0) return ret;
}
lab13:
z->c = z->l - m9;
}
{ int m10 = z->l - z->c; (void)m10; /* do, line 224 */
{ int ret = r_Step_5(z); /* call Step_5, line 224 */
if (ret == 0) goto lab14;
if (ret < 0) return ret;
}
lab14:
z->c = z->l - m10;
}
}
lab7:
lab4:
z->c = z->lb;
{ int c11 = z->c; /* do, line 227 */
{ int ret = r_postlude(z); /* call postlude, line 227 */
if (ret == 0) goto lab15;
if (ret < 0) return ret;
}
lab15:
z->c = c11;
}
}
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -655,10 +654,8 @@ static int r_tidy(struct SN_env * z) { /* backwardmode */
extern int finnish_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 186 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 186 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->B[0] = 0; /* unset ending_removed, line 187 */
......@@ -666,63 +663,49 @@ extern int finnish_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int m2 = z->l - z->c; (void)m2; /* do, line 189 */
{ int ret = r_particle_etc(z); /* call particle_etc, line 189 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 190 */
{ int ret = r_possessive(z); /* call possessive, line 190 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 191 */
{ int ret = r_case_ending(z); /* call case_ending, line 191 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 192 */
{ int ret = r_other_endings(z); /* call other_endings, line 192 */
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
lab4:
z->c = z->l - m5;
}
/* or, line 193 */
if (!(z->B[0])) goto lab6; /* Boolean test ending_removed, line 193 */
if (!(z->B[0])) goto lab1; /* Boolean test ending_removed, line 193 */
{ int m6 = z->l - z->c; (void)m6; /* do, line 193 */
{ int ret = r_i_plural(z); /* call i_plural, line 193 */
if (ret == 0) goto lab7;
if (ret < 0) return ret;
}
lab7:
z->c = z->l - m6;
}
goto lab5;
lab6:
goto lab0;
lab1:
{ int m7 = z->l - z->c; (void)m7; /* do, line 193 */
{ int ret = r_t_plural(z); /* call t_plural, line 193 */
if (ret == 0) goto lab8;
if (ret < 0) return ret;
}
lab8:
z->c = z->l - m7;
}
lab5:
lab0:
{ int m8 = z->l - z->c; (void)m8; /* do, line 194 */
{ int ret = r_tidy(z); /* call tidy, line 194 */
if (ret == 0) goto lab9;
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m8;
}
z->c = z->lb;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -411,8 +410,9 @@ static const symbol s_33[] = { 'i' };
static const symbol s_34[] = { 'c' };
static int r_prelude(struct SN_env * z) { /* forwardmode */
while(1) { /* repeat, line 38 */
int c1 = z->c;
/* repeat, line 38 */
while(1) { int c1 = z->c;
while(1) { /* goto, line 38 */
int c2 = z->c;
{ int c3 = z->c; /* or, line 44 */
......@@ -569,8 +569,9 @@ static int r_mark_regions(struct SN_env * z) { /* forwardmode */
static int r_postlude(struct SN_env * z) { /* forwardmode */
int among_var;
while(1) { /* repeat, line 79 */
int c1 = z->c;
/* repeat, line 79 */
while(1) { int c1 = z->c;
z->bra = z->c; /* [, line 81 */
if (z->c >= z->l || z->p[z->c + 0] >> 5 != 2 || !((35652352 >> (z->p[z->c + 0] & 0x1f)) & 1)) among_var = 7; else /* substring, line 81 */
among_var = find_among(z, a_1, 7);
......@@ -1124,8 +1125,7 @@ static int r_un_double(struct SN_env * z) { /* backwardmode */
static int r_un_accent(struct SN_env * z) { /* backwardmode */
{ int i = 1;
while(1) { /* atleast, line 222 */
if (out_grouping_b(z, g_v, 97, 251, 0)) goto lab0; /* non v, line 222 */
while(1) { if (out_grouping_b(z, g_v, 97, 251, 0)) goto lab0; /* non v, line 222 */
i--;
continue;
lab0:
......@@ -1154,18 +1154,14 @@ lab1:
extern int french_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 229 */
{ int ret = r_prelude(z); /* call prelude, line 229 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
/* do, line 230 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 230 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->lb = z->c; z->c = z->l; /* backwards, line 231 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 233 */
......@@ -1173,85 +1169,79 @@ lab1:
{ int m4 = z->l - z->c; (void)m4; /* and, line 239 */
{ int m5 = z->l - z->c; (void)m5; /* or, line 235 */
{ int ret = r_standard_suffix(z); /* call standard_suffix, line 235 */
if (ret == 0) goto lab6;
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
goto lab5;
lab6:
goto lab3;
lab4:
z->c = z->l - m5;
{ int ret = r_i_verb_suffix(z); /* call i_verb_suffix, line 236 */
if (ret == 0) goto lab7;
if (ret == 0) goto lab5;
if (ret < 0) return ret;
}
goto lab5;
lab7:
goto lab3;
lab5:
z->c = z->l - m5;
{ int ret = r_verb_suffix(z); /* call verb_suffix, line 237 */
if (ret == 0) goto lab4;
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
}
lab5:
lab3:
z->c = z->l - m4;
{ int m6 = z->l - z->c; (void)m6; /* try, line 240 */
z->ket = z->c; /* [, line 240 */
{ int m7 = z->l - z->c; (void)m7; /* or, line 240 */
if (z->c <= z->lb || z->p[z->c - 1] != 'Y') goto lab10; /* literal, line 240 */
if (z->c <= z->lb || z->p[z->c - 1] != 'Y') goto lab8; /* literal, line 240 */
z->c--;
z->bra = z->c; /* ], line 240 */
{ int ret = slice_from_s(z, 1, s_33); /* <-, line 240 */
if (ret < 0) return ret;
}
goto lab9;
lab10:
goto lab7;
lab8:
z->c = z->l - m7;
if (z->c <= z->lb || z->p[z->c - 1] != 0xE7) { z->c = z->l - m6; goto lab8; } /* literal, line 241 */
if (z->c <= z->lb || z->p[z->c - 1] != 0xE7) { z->c = z->l - m6; goto lab6; } /* literal, line 241 */
z->c--;
z->bra = z->c; /* ], line 241 */
{ int ret = slice_from_s(z, 1, s_34); /* <-, line 241 */
if (ret < 0) return ret;
}
}
lab9:
lab8:
lab7:
lab6:
;
}
}
goto lab3;
lab4:
goto lab1;
lab2:
z->c = z->l - m3;
{ int ret = r_residual_suffix(z); /* call residual_suffix, line 244 */
if (ret == 0) goto lab2;
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
}
lab3:
lab2:
lab1:
lab0:
z->c = z->l - m2;
}
{ int m8 = z->l - z->c; (void)m8; /* do, line 249 */
{ int ret = r_un_double(z); /* call un_double, line 249 */
if (ret == 0) goto lab11;
if (ret < 0) return ret;
}
lab11:
z->c = z->l - m8;
}
{ int m9 = z->l - z->c; (void)m9; /* do, line 250 */
{ int ret = r_un_accent(z); /* call un_accent, line 250 */
if (ret == 0) goto lab12;
if (ret < 0) return ret;
}
lab12:
z->c = z->l - m9;
}
z->c = z->lb;
{ int c10 = z->c; /* do, line 252 */
{ int ret = r_postlude(z); /* call postlude, line 252 */
if (ret == 0) goto lab13;
if (ret < 0) return ret;
}
lab13:
z->c = c10;
}
return 1;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -126,8 +125,9 @@ static const symbol s_10[] = { 'e', 'n' };
static int r_prelude(struct SN_env * z) { /* forwardmode */
{ int c_test1 = z->c; /* test, line 35 */
while(1) { /* repeat, line 35 */
int c2 = z->c;
/* repeat, line 35 */
while(1) { int c2 = z->c;
{ int c3 = z->c; /* or, line 38 */
z->bra = z->c; /* [, line 37 */
if (z->c == z->l || z->p[z->c] != 0xDF) goto lab2; /* literal, line 37 */
......@@ -150,8 +150,9 @@ static int r_prelude(struct SN_env * z) { /* forwardmode */
}
z->c = c_test1;
}
while(1) { /* repeat, line 41 */
int c4 = z->c;
/* repeat, line 41 */
while(1) { int c4 = z->c;
while(1) { /* goto, line 41 */
int c5 = z->c;
if (in_grouping(z, g_v, 97, 252, 0)) goto lab4; /* grouping v, line 42 */
......@@ -233,8 +234,9 @@ lab0:
static int r_postlude(struct SN_env * z) { /* forwardmode */
int among_var;
while(1) { /* repeat, line 60 */
int c1 = z->c;
/* repeat, line 60 */
while(1) { int c1 = z->c;
z->bra = z->c; /* [, line 62 */
among_var = find_among(z, a_0, 6); /* substring, line 62 */
if (!(among_var)) goto lab0;
......@@ -463,35 +465,27 @@ static int r_standard_suffix(struct SN_env * z) { /* backwardmode */
extern int german_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 134 */
{ int ret = r_prelude(z); /* call prelude, line 134 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
{ int c2 = z->c; /* do, line 135 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 135 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = c2;
}
z->lb = z->c; z->c = z->l; /* backwards, line 136 */
/* do, line 137 */
{ int ret = r_standard_suffix(z); /* call standard_suffix, line 137 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->lb;
{ int c3 = z->c; /* do, line 138 */
{ int ret = r_postlude(z); /* call postlude, line 138 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = c3;
}
return 1;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -314,8 +313,9 @@ static int r_remove_second_order_prefix(struct SN_env * z) { /* forwardmode */
extern int indonesian_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
z->I[0] = 0; /* $measure = <integer expression>, line 172 */
{ int c1 = z->c; /* do, line 173 */
while(1) { /* repeat, line 173 */
int c2 = z->c;
/* repeat, line 173 */
while(1) { int c2 = z->c;
{ /* gopast */ /* grouping vowel, line 173 */
int ret = out_grouping(z, g_vowel, 97, 117, 1);
if (ret < 0) goto lab1;
......@@ -335,19 +335,15 @@ extern int indonesian_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int m3 = z->l - z->c; (void)m3; /* do, line 177 */
{ int ret = r_remove_particle(z); /* call remove_particle, line 177 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
if (!(z->I[0] > 2)) return 0; /* $(<integer expression> > <integer expression>), line 178 */
{ int m4 = z->l - z->c; (void)m4; /* do, line 179 */
{ int ret = r_remove_possessive_pronoun(z); /* call remove_possessive_pronoun, line 179 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
z->c = z->lb;
......@@ -355,56 +351,54 @@ extern int indonesian_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int c5 = z->c; /* or, line 188 */
{ int c_test6 = z->c; /* test, line 182 */
{ int ret = r_remove_first_order_prefix(z); /* call remove_first_order_prefix, line 183 */
if (ret == 0) goto lab5;
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
{ int c7 = z->c; /* do, line 184 */
{ int c_test8 = z->c; /* test, line 185 */
if (!(z->I[0] > 2)) goto lab6; /* $(<integer expression> > <integer expression>), line 185 */
if (!(z->I[0] > 2)) goto lab4; /* $(<integer expression> > <integer expression>), line 185 */
z->lb = z->c; z->c = z->l; /* backwards, line 185 */
{ int ret = r_remove_suffix(z); /* call remove_suffix, line 185 */
if (ret == 0) goto lab6;
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
z->c = z->lb;
z->c = c_test8;
}
if (!(z->I[0] > 2)) goto lab6; /* $(<integer expression> > <integer expression>), line 186 */
if (!(z->I[0] > 2)) goto lab4; /* $(<integer expression> > <integer expression>), line 186 */
{ int ret = r_remove_second_order_prefix(z); /* call remove_second_order_prefix, line 186 */
if (ret == 0) goto lab6;
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
lab6:
lab4:
z->c = c7;
}
z->c = c_test6;
}
goto lab4;
lab5:
goto lab2;
lab3:
z->c = c5;
{ int c9 = z->c; /* do, line 189 */
{ int ret = r_remove_second_order_prefix(z); /* call remove_second_order_prefix, line 189 */
if (ret == 0) goto lab7;
if (ret < 0) return ret;
}
lab7:
z->c = c9;
}
{ int c10 = z->c; /* do, line 190 */
if (!(z->I[0] > 2)) goto lab8; /* $(<integer expression> > <integer expression>), line 190 */
if (!(z->I[0] > 2)) goto lab5; /* $(<integer expression> > <integer expression>), line 190 */
z->lb = z->c; z->c = z->l; /* backwards, line 190 */
{ int ret = r_remove_suffix(z); /* call remove_suffix, line 190 */
if (ret == 0) goto lab8;
if (ret == 0) goto lab5;
if (ret < 0) return ret;
}
z->c = z->lb;
lab8:
lab5:
z->c = c10;
}
}
lab4:
lab2:
return 1;
}
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -442,42 +441,32 @@ static int r_verb_sfx(struct SN_env * z) { /* backwardmode */
extern int irish_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 144 */
{ int ret = r_initial_morph(z); /* call initial_morph, line 144 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
/* do, line 145 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 145 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->lb = z->c; z->c = z->l; /* backwards, line 146 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 147 */
{ int ret = r_noun_sfx(z); /* call noun_sfx, line 147 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 148 */
{ int ret = r_deriv(z); /* call deriv, line 148 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 149 */
{ int ret = r_verb_sfx(z); /* call verb_sfx, line 149 */
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
lab4:
z->c = z->l - m4;
}
z->c = z->lb;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -492,8 +491,9 @@ static const symbol s_17[] = { 'i', 'c' };
static int r_prelude(struct SN_env * z) { /* forwardmode */
int among_var;
{ int c_test1 = z->c; /* test, line 35 */
while(1) { /* repeat, line 35 */
int c2 = z->c;
/* repeat, line 35 */
while(1) { int c2 = z->c;
z->bra = z->c; /* [, line 36 */
among_var = find_among(z, a_0, 7); /* substring, line 36 */
if (!(among_var)) goto lab0;
......@@ -541,8 +541,9 @@ static int r_prelude(struct SN_env * z) { /* forwardmode */
}
z->c = c_test1;
}
while(1) { /* repeat, line 46 */
int c3 = z->c;
/* repeat, line 46 */
while(1) { int c3 = z->c;
while(1) { /* goto, line 46 */
int c4 = z->c;
if (in_grouping(z, g_v, 97, 249, 0)) goto lab2; /* grouping v, line 47 */
......@@ -664,8 +665,9 @@ static int r_mark_regions(struct SN_env * z) { /* forwardmode */
static int r_postlude(struct SN_env * z) { /* forwardmode */
int among_var;
while(1) { /* repeat, line 70 */
int c1 = z->c;
/* repeat, line 70 */
while(1) { int c1 = z->c;
z->bra = z->c; /* [, line 72 */
if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 85)) among_var = 3; else /* substring, line 72 */
among_var = find_among(z, a_1, 3);
......@@ -967,61 +969,51 @@ static int r_vowel_suffix(struct SN_env * z) { /* backwardmode */
extern int italian_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 182 */
{ int ret = r_prelude(z); /* call prelude, line 182 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
/* do, line 183 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 183 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->lb = z->c; z->c = z->l; /* backwards, line 184 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 185 */
{ int ret = r_attached_pronoun(z); /* call attached_pronoun, line 185 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 186 */
{ int m4 = z->l - z->c; (void)m4; /* or, line 186 */
{ int ret = r_standard_suffix(z); /* call standard_suffix, line 186 */
if (ret == 0) goto lab5;
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
goto lab4;
lab5:
goto lab1;
lab2:
z->c = z->l - m4;
{ int ret = r_verb_suffix(z); /* call verb_suffix, line 186 */
if (ret == 0) goto lab3;
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
}
lab4:
lab3:
lab1:
lab0:
z->c = z->l - m3;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 187 */
{ int ret = r_vowel_suffix(z); /* call vowel_suffix, line 187 */
if (ret == 0) goto lab6;
if (ret < 0) return ret;
}
lab6:
z->c = z->l - m5;
}
z->c = z->lb;
{ int c6 = z->c; /* do, line 189 */
{ int ret = r_postlude(z); /* call postlude, line 189 */
if (ret == 0) goto lab7;
if (ret < 0) return ret;
}
lab7:
z->c = c6;
}
return 1;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -241,36 +240,28 @@ static int r_other_suffix(struct SN_env * z) { /* backwardmode */
extern int norwegian_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 74 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 74 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 75 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 76 */
{ int ret = r_main_suffix(z); /* call main_suffix, line 76 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 77 */
{ int ret = r_consonant_pair(z); /* call consonant_pair, line 77 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 78 */
{ int ret = r_other_suffix(z); /* call other_suffix, line 78 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
z->c = z->lb;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -575,8 +574,9 @@ extern int porter_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
z->c = c1;
}
{ int c2 = z->c; /* do, line 117 */
while(1) { /* repeat, line 117 */
int c3 = z->c;
/* repeat, line 117 */
while(1) { int c3 = z->c;
while(1) { /* goto, line 117 */
int c4 = z->c;
if (in_grouping(z, g_v, 97, 121, 0)) goto lab3; /* grouping v, line 117 */
......@@ -634,95 +634,80 @@ extern int porter_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int m6 = z->l - z->c; (void)m6; /* do, line 127 */
{ int ret = r_Step_1a(z); /* call Step_1a, line 127 */
if (ret == 0) goto lab5;
if (ret < 0) return ret;
}
lab5:
z->c = z->l - m6;
}
{ int m7 = z->l - z->c; (void)m7; /* do, line 128 */
{ int ret = r_Step_1b(z); /* call Step_1b, line 128 */
if (ret == 0) goto lab6;
if (ret < 0) return ret;
}
lab6:
z->c = z->l - m7;
}
{ int m8 = z->l - z->c; (void)m8; /* do, line 129 */
{ int ret = r_Step_1c(z); /* call Step_1c, line 129 */
if (ret == 0) goto lab7;
if (ret < 0) return ret;
}
lab7:
z->c = z->l - m8;
}
{ int m9 = z->l - z->c; (void)m9; /* do, line 130 */
{ int ret = r_Step_2(z); /* call Step_2, line 130 */
if (ret == 0) goto lab8;
if (ret < 0) return ret;
}
lab8:
z->c = z->l - m9;
}
{ int m10 = z->l - z->c; (void)m10; /* do, line 131 */
{ int ret = r_Step_3(z); /* call Step_3, line 131 */
if (ret == 0) goto lab9;
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m10;
}
{ int m11 = z->l - z->c; (void)m11; /* do, line 132 */
{ int ret = r_Step_4(z); /* call Step_4, line 132 */
if (ret == 0) goto lab10;
if (ret < 0) return ret;
}
lab10:
z->c = z->l - m11;
}
{ int m12 = z->l - z->c; (void)m12; /* do, line 133 */
{ int ret = r_Step_5a(z); /* call Step_5a, line 133 */
if (ret == 0) goto lab11;
if (ret < 0) return ret;
}
lab11:
z->c = z->l - m12;
}
{ int m13 = z->l - z->c; (void)m13; /* do, line 134 */
{ int ret = r_Step_5b(z); /* call Step_5b, line 134 */
if (ret == 0) goto lab12;
if (ret < 0) return ret;
}
lab12:
z->c = z->l - m13;
}
z->c = z->lb;
{ int c14 = z->c; /* do, line 137 */
if (!(z->B[0])) goto lab13; /* Boolean test Y_found, line 137 */
while(1) { /* repeat, line 137 */
int c15 = z->c;
if (!(z->B[0])) goto lab5; /* Boolean test Y_found, line 137 */
/* repeat, line 137 */
while(1) { int c15 = z->c;
while(1) { /* goto, line 137 */
int c16 = z->c;
z->bra = z->c; /* [, line 137 */
if (z->c == z->l || z->p[z->c] != 'Y') goto lab15; /* literal, line 137 */
if (z->c == z->l || z->p[z->c] != 'Y') goto lab7; /* literal, line 137 */
z->c++;
z->ket = z->c; /* ], line 137 */
z->c = c16;
break;
lab15:
lab7:
z->c = c16;
if (z->c >= z->l) goto lab14;
if (z->c >= z->l) goto lab6;
z->c++; /* goto, line 137 */
}
{ int ret = slice_from_s(z, 1, s_23); /* <-, line 137 */
if (ret < 0) return ret;
}
continue;
lab14:
lab6:
z->c = c15;
break;
}
lab13:
lab5:
z->c = c14;
}
return 1;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -475,8 +474,9 @@ static const symbol s_10[] = { 'c' };
static int r_prelude(struct SN_env * z) { /* forwardmode */
int among_var;
while(1) { /* repeat, line 36 */
int c1 = z->c;
/* repeat, line 36 */
while(1) { int c1 = z->c;
z->bra = z->c; /* [, line 37 */
if (z->c >= z->l || (z->p[z->c + 0] != 227 && z->p[z->c + 0] != 245)) among_var = 3; else /* substring, line 37 */
among_var = find_among(z, a_0, 3);
......@@ -588,8 +588,9 @@ static int r_mark_regions(struct SN_env * z) { /* forwardmode */
static int r_postlude(struct SN_env * z) { /* forwardmode */
int among_var;
while(1) { /* repeat, line 62 */
int c1 = z->c;
/* repeat, line 62 */
while(1) { int c1 = z->c;
z->bra = z->c; /* [, line 63 */
if (z->c + 1 >= z->l || z->p[z->c + 1] != 126) among_var = 3; else /* substring, line 63 */
among_var = find_among(z, a_1, 3);
......@@ -879,18 +880,14 @@ static int r_residual_form(struct SN_env * z) { /* backwardmode */
extern int portuguese_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 202 */
{ int ret = r_prelude(z); /* call prelude, line 202 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
/* do, line 203 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 203 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->lb = z->c; z->c = z->l; /* backwards, line 204 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 205 */
......@@ -898,67 +895,63 @@ lab1:
{ int m4 = z->l - z->c; (void)m4; /* and, line 207 */
{ int m5 = z->l - z->c; (void)m5; /* or, line 206 */
{ int ret = r_standard_suffix(z); /* call standard_suffix, line 206 */
if (ret == 0) goto lab6;
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
goto lab5;
lab6:
goto lab3;
lab4:
z->c = z->l - m5;
{ int ret = r_verb_suffix(z); /* call verb_suffix, line 206 */
if (ret == 0) goto lab4;
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
}
lab5:
lab3:
z->c = z->l - m4;
{ int m6 = z->l - z->c; (void)m6; /* do, line 207 */
z->ket = z->c; /* [, line 207 */
if (z->c <= z->lb || z->p[z->c - 1] != 'i') goto lab7; /* literal, line 207 */
if (z->c <= z->lb || z->p[z->c - 1] != 'i') goto lab5; /* literal, line 207 */
z->c--;
z->bra = z->c; /* ], line 207 */
{ int m_test7 = z->l - z->c; /* test, line 207 */
if (z->c <= z->lb || z->p[z->c - 1] != 'c') goto lab7; /* literal, line 207 */
if (z->c <= z->lb || z->p[z->c - 1] != 'c') goto lab5; /* literal, line 207 */
z->c--;
z->c = z->l - m_test7;
}
{ int ret = r_RV(z); /* call RV, line 207 */
if (ret == 0) goto lab7;
if (ret == 0) goto lab5;
if (ret < 0) return ret;
}
{ int ret = slice_del(z); /* delete, line 207 */
if (ret < 0) return ret;
}
lab7:
lab5:
z->c = z->l - m6;
}
}
goto lab3;
lab4:
goto lab1;
lab2:
z->c = z->l - m3;
{ int ret = r_residual_suffix(z); /* call residual_suffix, line 209 */
if (ret == 0) goto lab2;
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
}
lab3:
lab2:
lab1:
lab0:
z->c = z->l - m2;
}
{ int m8 = z->l - z->c; (void)m8; /* do, line 211 */
{ int ret = r_residual_form(z); /* call residual_form, line 211 */
if (ret == 0) goto lab8;
if (ret < 0) return ret;
}
lab8:
z->c = z->l - m8;
}
z->c = z->lb;
{ int c9 = z->c; /* do, line 213 */
{ int ret = r_postlude(z); /* call postlude, line 213 */
if (ret == 0) goto lab9;
if (ret < 0) return ret;
}
lab9:
z->c = c9;
}
return 1;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -586,8 +585,9 @@ static int r_mark_regions(struct SN_env * z) { /* forwardmode */
static int r_postlude(struct SN_env * z) { /* forwardmode */
int among_var;
while(1) { /* repeat, line 49 */
int c1 = z->c;
/* repeat, line 49 */
while(1) { int c1 = z->c;
z->bra = z->c; /* [, line 50 */
if (z->c >= z->l || z->p[z->c + 0] >> 5 != 7 || !((67641858 >> (z->p[z->c + 0] & 0x1f)) & 1)) among_var = 6; else /* substring, line 50 */
among_var = find_among(z, a_0, 6);
......@@ -985,60 +985,52 @@ static int r_residual_suffix(struct SN_env * z) { /* backwardmode */
extern int spanish_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
/* do, line 216 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 216 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->lb = z->c; z->c = z->l; /* backwards, line 217 */
{ int m1 = z->l - z->c; (void)m1; /* do, line 218 */
{ int ret = r_attached_pronoun(z); /* call attached_pronoun, line 218 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m1;
}
{ int m2 = z->l - z->c; (void)m2; /* do, line 219 */
{ int m3 = z->l - z->c; (void)m3; /* or, line 219 */
{ int ret = r_standard_suffix(z); /* call standard_suffix, line 219 */
if (ret == 0) goto lab4;
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
goto lab3;
lab4:
goto lab1;
lab2:
z->c = z->l - m3;
{ int ret = r_y_verb_suffix(z); /* call y_verb_suffix, line 220 */
if (ret == 0) goto lab5;
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
goto lab3;
lab5:
goto lab1;
lab3:
z->c = z->l - m3;
{ int ret = r_verb_suffix(z); /* call verb_suffix, line 221 */
if (ret == 0) goto lab2;
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
}
lab3:
lab2:
lab1:
lab0:
z->c = z->l - m2;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 223 */
{ int ret = r_residual_suffix(z); /* call residual_suffix, line 223 */
if (ret == 0) goto lab6;
if (ret < 0) return ret;
}
lab6:
z->c = z->l - m4;
}
z->c = z->lb;
{ int c5 = z->c; /* do, line 225 */
{ int ret = r_postlude(z); /* call postlude, line 225 */
if (ret == 0) goto lab7;
if (ret < 0) return ret;
}
lab7:
z->c = c5;
}
return 1;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -257,36 +256,28 @@ static int r_other_suffix(struct SN_env * z) { /* backwardmode */
extern int swedish_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 66 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 66 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 67 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 68 */
{ int ret = r_main_suffix(z); /* call main_suffix, line 68 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 69 */
{ int ret = r_consonant_pair(z); /* call consonant_pair, line 69 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 70 */
{ int ret = r_other_suffix(z); /* call other_suffix, line 70 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
z->c = z->lb;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -795,84 +794,64 @@ static int r_plur_owner(struct SN_env * z) { /* backwardmode */
extern int hungarian_ISO_8859_2_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 229 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 229 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 230 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 231 */
{ int ret = r_instrum(z); /* call instrum, line 231 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 232 */
{ int ret = r_case(z); /* call case, line 232 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 233 */
{ int ret = r_case_special(z); /* call case_special, line 233 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 234 */
{ int ret = r_case_other(z); /* call case_other, line 234 */
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
lab4:
z->c = z->l - m5;
}
{ int m6 = z->l - z->c; (void)m6; /* do, line 235 */
{ int ret = r_factive(z); /* call factive, line 235 */
if (ret == 0) goto lab5;
if (ret < 0) return ret;
}
lab5:
z->c = z->l - m6;
}
{ int m7 = z->l - z->c; (void)m7; /* do, line 236 */
{ int ret = r_owned(z); /* call owned, line 236 */
if (ret == 0) goto lab6;
if (ret < 0) return ret;
}
lab6:
z->c = z->l - m7;
}
{ int m8 = z->l - z->c; (void)m8; /* do, line 237 */
{ int ret = r_sing_owner(z); /* call sing_owner, line 237 */
if (ret == 0) goto lab7;
if (ret < 0) return ret;
}
lab7:
z->c = z->l - m8;
}
{ int m9 = z->l - z->c; (void)m9; /* do, line 238 */
{ int ret = r_plur_owner(z); /* call plur_owner, line 238 */
if (ret == 0) goto lab8;
if (ret < 0) return ret;
}
lab8:
z->c = z->l - m9;
}
{ int m10 = z->l - z->c; (void)m10; /* do, line 239 */
{ int ret = r_plural(z); /* call plural, line 239 */
if (ret == 0) goto lab9;
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m10;
}
z->c = z->lb;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -537,8 +536,9 @@ static const symbol s_17[] = { 't' };
static const symbol s_18[] = { 'i', 's', 't' };
static int r_prelude(struct SN_env * z) { /* forwardmode */
while(1) { /* repeat, line 32 */
int c1 = z->c;
/* repeat, line 32 */
while(1) { int c1 = z->c;
while(1) { /* goto, line 32 */
int c2 = z->c;
if (in_grouping(z, g_v, 97, 238, 0)) goto lab1; /* grouping v, line 33 */
......@@ -660,8 +660,9 @@ static int r_mark_regions(struct SN_env * z) { /* forwardmode */
static int r_postlude(struct SN_env * z) { /* forwardmode */
int among_var;
while(1) { /* repeat, line 56 */
int c1 = z->c;
/* repeat, line 56 */
while(1) { int c1 = z->c;
z->bra = z->c; /* [, line 58 */
if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 85)) among_var = 3; else /* substring, line 58 */
among_var = find_among(z, a_0, 3);
......@@ -813,8 +814,9 @@ static int r_combo_suffix(struct SN_env * z) { /* backwardmode */
static int r_standard_suffix(struct SN_env * z) { /* backwardmode */
int among_var;
z->B[0] = 0; /* unset standard_suffix_removed, line 130 */
while(1) { /* repeat, line 131 */
int m1 = z->l - z->c; (void)m1;
/* repeat, line 131 */
while(1) { int m1 = z->l - z->c; (void)m1;
{ int ret = r_combo_suffix(z); /* call combo_suffix, line 131 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
......@@ -907,66 +909,54 @@ static int r_vowel_suffix(struct SN_env * z) { /* backwardmode */
extern int romanian_ISO_8859_2_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 226 */
{ int ret = r_prelude(z); /* call prelude, line 226 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
/* do, line 227 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 227 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->lb = z->c; z->c = z->l; /* backwards, line 228 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 229 */
{ int ret = r_step_0(z); /* call step_0, line 229 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 230 */
{ int ret = r_standard_suffix(z); /* call standard_suffix, line 230 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 231 */
{ int m5 = z->l - z->c; (void)m5; /* or, line 231 */
if (!(z->B[0])) goto lab6; /* Boolean test standard_suffix_removed, line 231 */
goto lab5;
lab6:
if (!(z->B[0])) goto lab2; /* Boolean test standard_suffix_removed, line 231 */
goto lab1;
lab2:
z->c = z->l - m5;
{ int ret = r_verb_suffix(z); /* call verb_suffix, line 231 */
if (ret == 0) goto lab4;
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
}
lab5:
lab4:
lab1:
lab0:
z->c = z->l - m4;
}
{ int m6 = z->l - z->c; (void)m6; /* do, line 232 */
{ int ret = r_vowel_suffix(z); /* call vowel_suffix, line 232 */
if (ret == 0) goto lab7;
if (ret < 0) return ret;
}
lab7:
z->c = z->l - m6;
}
z->c = z->lb;
{ int c7 = z->c; /* do, line 234 */
{ int ret = r_postlude(z); /* call postlude, line 234 */
if (ret == 0) goto lab8;
if (ret < 0) return ret;
}
lab8:
z->c = c7;
}
return 1;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -569,8 +568,9 @@ static int r_tidy_up(struct SN_env * z) { /* backwardmode */
extern int russian_KOI8_R_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 205 */
while(1) { /* repeat, line 205 */
int c2 = z->c;
/* repeat, line 205 */
while(1) { int c2 = z->c;
while(1) { /* goto, line 205 */
int c3 = z->c;
z->bra = z->c; /* [, line 205 */
......@@ -596,10 +596,8 @@ extern int russian_KOI8_R_stem(struct SN_env * z) { /* forwardmode */
}
/* do, line 207 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 207 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->lb = z->c; z->c = z->l; /* backwards, line 208 */
......@@ -609,72 +607,68 @@ lab3:
{ int m5 = z->l - z->c; (void)m5; /* do, line 209 */
{ int m6 = z->l - z->c; (void)m6; /* or, line 210 */
{ int ret = r_perfective_gerund(z); /* call perfective_gerund, line 210 */
if (ret == 0) goto lab6;
if (ret == 0) goto lab5;
if (ret < 0) return ret;
}
goto lab5;
lab6:
goto lab4;
lab5:
z->c = z->l - m6;
{ int m7 = z->l - z->c; (void)m7; /* try, line 211 */
{ int ret = r_reflexive(z); /* call reflexive, line 211 */
if (ret == 0) { z->c = z->l - m7; goto lab7; }
if (ret == 0) { z->c = z->l - m7; goto lab6; }
if (ret < 0) return ret;
}
lab7:
lab6:
;
}
{ int m8 = z->l - z->c; (void)m8; /* or, line 212 */
{ int ret = r_adjectival(z); /* call adjectival, line 212 */
if (ret == 0) goto lab9;
if (ret == 0) goto lab8;
if (ret < 0) return ret;
}
goto lab8;
lab9:
goto lab7;
lab8:
z->c = z->l - m8;
{ int ret = r_verb(z); /* call verb, line 212 */
if (ret == 0) goto lab10;
if (ret == 0) goto lab9;
if (ret < 0) return ret;
}
goto lab8;
lab10:
goto lab7;
lab9:
z->c = z->l - m8;
{ int ret = r_noun(z); /* call noun, line 212 */
if (ret == 0) goto lab4;
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
}
lab8:
lab7:
;
}
lab5:
lab4:
lab3:
z->c = z->l - m5;
}
{ int m9 = z->l - z->c; (void)m9; /* try, line 215 */
z->ket = z->c; /* [, line 215 */
if (z->c <= z->lb || z->p[z->c - 1] != 0xC9) { z->c = z->l - m9; goto lab11; } /* literal, line 215 */
if (z->c <= z->lb || z->p[z->c - 1] != 0xC9) { z->c = z->l - m9; goto lab10; } /* literal, line 215 */
z->c--;
z->bra = z->c; /* ], line 215 */
{ int ret = slice_del(z); /* delete, line 215 */
if (ret < 0) return ret;
}
lab11:
lab10:
;
}
{ int m10 = z->l - z->c; (void)m10; /* do, line 218 */
{ int ret = r_derivational(z); /* call derivational, line 218 */
if (ret == 0) goto lab12;
if (ret < 0) return ret;
}
lab12:
z->c = z->l - m10;
}
{ int m11 = z->l - z->c; (void)m11; /* do, line 219 */
{ int ret = r_tidy_up(z); /* call tidy_up, line 219 */
if (ret == 0) goto lab13;
if (ret < 0) return ret;
}
lab13:
z->c = z->l - m11;
}
z->lb = mlimit4;
......
This diff is collapsed.
This diff is collapsed.
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -243,10 +242,8 @@ static int r_other_suffix(struct SN_env * z) { /* backwardmode */
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 72 */
{ int ret = r_consonant_pair(z); /* call consonant_pair, line 72 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m3;
}
break;
......@@ -281,44 +278,34 @@ static int r_undouble(struct SN_env * z) { /* backwardmode */
extern int danish_UTF_8_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 86 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 86 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->lb = z->c; z->c = z->l; /* backwards, line 87 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 88 */
{ int ret = r_main_suffix(z); /* call main_suffix, line 88 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 89 */
{ int ret = r_consonant_pair(z); /* call consonant_pair, line 89 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 90 */
{ int ret = r_other_suffix(z); /* call other_suffix, line 90 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 91 */
{ int ret = r_undouble(z); /* call undouble, line 91 */
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
lab4:
z->c = z->l - m5;
}
z->c = z->lb;
......
/* This file was generated automatically by the Snowball to ISO C compiler */
/* http://snowballstem.org/ */
/* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
#include "header.h"
......@@ -659,10 +658,8 @@ static int r_tidy(struct SN_env * z) { /* backwardmode */
extern int finnish_UTF_8_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 186 */
{ int ret = r_mark_regions(z); /* call mark_regions, line 186 */
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
z->c = c1;
}
z->B[0] = 0; /* unset ending_removed, line 187 */
......@@ -670,63 +667,49 @@ extern int finnish_UTF_8_stem(struct SN_env * z) { /* forwardmode */
{ int m2 = z->l - z->c; (void)m2; /* do, line 189 */
{ int ret = r_particle_etc(z); /* call particle_etc, line 189 */
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 190 */
{ int ret = r_possessive(z); /* call possessive, line 190 */
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 191 */
{ int ret = r_case_ending(z); /* call case_ending, line 191 */
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3:
z->c = z->l - m4;
}
{ int m5 = z->l - z->c; (void)m5; /* do, line 192 */
{ int ret = r_other_endings(z); /* call other_endings, line 192 */
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
lab4:
z->c = z->l - m5;
}
/* or, line 193 */
if (!(z->B[0])) goto lab6; /* Boolean test ending_removed, line 193 */
if (!(z->B[0])) goto lab1; /* Boolean test ending_removed, line 193 */
{ int m6 = z->l - z->c; (void)m6; /* do, line 193 */
{ int ret = r_i_plural(z); /* call i_plural, line 193 */
if (ret == 0) goto lab7;
if (ret < 0) return ret;
}
lab7:
z->c = z->l - m6;
}
goto lab5;
lab6:
goto lab0;
lab1:
{ int m7 = z->l - z->c; (void)m7; /* do, line 193 */
{ int ret = r_t_plural(z); /* call t_plural, line 193 */
if (ret == 0) goto lab8;
if (ret < 0) return ret;
}
lab8:
z->c = z->l - m7;
}
lab5:
lab0:
{ int m8 = z->l - z->c; (void)m8; /* do, line 194 */
{ int ret = r_tidy(z); /* call tidy, line 194 */
if (ret == 0) goto lab9;
if (ret < 0) return ret;
}
lab9:
z->c = z->l - m8;
}
z->c = z->lb;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment