Update to latest Snowball sources.

It's been almost a year since we last did this, and upstream has
been busy.  They've added stemmers for Polish and Esperanto,
and also deprecated their old Dutch stemmer in favor of the
Kraaij-Pohlmann algorithm.  (The "dutch" stemmer is now the
latter, and "dutch_porter" is the old algorithm.)

Upstream also decided to rename their internal header "header.h"
to something less generic: "snowball_runtime.h".  Seems like a good
thing, but it complicates this patch a bit because we were relying on
interposing our own version of "header.h" to control system header
inclusion order.  (We're partially failing at that now, because now the
generated stemmer files include <stddef.h> before snowball_runtime.h.
I think that'll be okay, but if the buildfarm complains then we'll
have to do more-extensive editing of the generated files.)

I realized that we weren't documenting the available stemmers in
any user-visible place, except indirectly through sample \dFd output.
That's incomplete because we only provide built-in dictionaries for
the recommended stemmers for each language, not alternative stemmers
such as dutch_porter.  So I added a list to the documentation.

I did not do anything with the stopword lists.  If those are still
available from snowballstem.org, they are mighty well hidden.

Discussion: https://postgr.es/m/1185975.1767569534@sss.pgh.pa.us
This commit is contained in:
Tom Lane 2026-01-05 15:22:12 -05:00
parent bb048e31dc
commit 7dc95cc3b9
119 changed files with 34703 additions and 25778 deletions

View file

@ -3145,6 +3145,56 @@ largehearted
<literal>stopword</literal> file name that gives a list of words to eliminate.
(<productname>PostgreSQL</productname>'s standard stopword lists are also
provided by the Snowball project.)
</para>
<para>
The available values of the <literal>language</literal> parameter are:
<literal>arabic</literal>,
<literal>armenian</literal>,
<literal>basque</literal>,
<literal>catalan</literal>,
<literal>danish</literal>,
<literal>dutch</literal>,
<literal>dutch_porter</literal>,
<literal>english</literal>,
<literal>esperanto</literal>,
<literal>estonian</literal>,
<literal>finnish</literal>,
<literal>french</literal>,
<literal>german</literal>,
<literal>greek</literal>,
<literal>hindi</literal>,
<literal>hungarian</literal>,
<literal>indonesian</literal>,
<literal>irish</literal>,
<literal>italian</literal>,
<literal>lithuanian</literal>,
<literal>nepali</literal>,
<literal>norwegian</literal>,
<literal>polish</literal>,
<literal>porter</literal>,
<literal>portuguese</literal>,
<literal>romanian</literal>,
<literal>russian</literal>,
<literal>serbian</literal>,
<literal>spanish</literal>,
<literal>swedish</literal>,
<literal>tamil</literal>,
<literal>turkish</literal>,
and
<literal>yiddish</literal>.
The <literal>porter</literal> algorithm is an old stemmer for English,
and the <literal>dutch_porter</literal> algorithm is an old stemmer
for Dutch (it was called <literal>dutch</literal>
in <productname>PostgreSQL</productname> releases before 19).
The rest are the currently-recommended stemmers for their
respective languages.
All these algorithms except <literal>porter</literal>
and <literal>dutch_porter</literal> have built-in dictionaries
provided, most with stopword lists attached.
For example, there is a built-in definition equivalent to
<programlisting>
@ -3879,6 +3929,7 @@ Parser: "pg_catalog.default"
pg_catalog | danish_stem | snowball stemmer for danish language
pg_catalog | dutch_stem | snowball stemmer for dutch language
pg_catalog | english_stem | snowball stemmer for english language
pg_catalog | esperanto_stem | snowball stemmer for esperanto language
pg_catalog | estonian_stem | snowball stemmer for estonian language
pg_catalog | finnish_stem | snowball stemmer for finnish language
pg_catalog | french_stem | snowball stemmer for french language
@ -3892,6 +3943,7 @@ Parser: "pg_catalog.default"
pg_catalog | lithuanian_stem | snowball stemmer for lithuanian language
pg_catalog | nepali_stem | snowball stemmer for nepali language
pg_catalog | norwegian_stem | snowball stemmer for norwegian language
pg_catalog | polish_stem | snowball stemmer for polish language
pg_catalog | portuguese_stem | snowball stemmer for portuguese language
pg_catalog | romanian_stem | snowball stemmer for romanian language
pg_catalog | russian_stem | snowball stemmer for russian language

View file

@ -27,6 +27,7 @@ OBJS += \
stem_ISO_8859_1_catalan.o \
stem_ISO_8859_1_danish.o \
stem_ISO_8859_1_dutch.o \
stem_ISO_8859_1_dutch_porter.o \
stem_ISO_8859_1_english.o \
stem_ISO_8859_1_finnish.o \
stem_ISO_8859_1_french.o \
@ -40,6 +41,7 @@ OBJS += \
stem_ISO_8859_1_spanish.o \
stem_ISO_8859_1_swedish.o \
stem_ISO_8859_2_hungarian.o \
stem_ISO_8859_2_polish.o \
stem_KOI8_R_russian.o \
stem_UTF_8_arabic.o \
stem_UTF_8_armenian.o \
@ -47,7 +49,9 @@ OBJS += \
stem_UTF_8_catalan.o \
stem_UTF_8_danish.o \
stem_UTF_8_dutch.o \
stem_UTF_8_dutch_porter.o \
stem_UTF_8_english.o \
stem_UTF_8_esperanto.o \
stem_UTF_8_estonian.o \
stem_UTF_8_finnish.o \
stem_UTF_8_french.o \
@ -61,6 +65,7 @@ OBJS += \
stem_UTF_8_lithuanian.o \
stem_UTF_8_nepali.o \
stem_UTF_8_norwegian.o \
stem_UTF_8_polish.o \
stem_UTF_8_porter.o \
stem_UTF_8_portuguese.o \
stem_UTF_8_romanian.o \

View file

@ -29,27 +29,28 @@ 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
d19326ac6c1b9a417fc872f7c2f845265a5e9ece
of 2025-02-19.
2d2e312df56f2ede014a4ffb3e91e6dea43c24be
of 2025-12-15.
To update the PostgreSQL sources from a new Snowball version:
0. If you didn't do it already, "make -C snowball".
1. Copy the *.c files in snowball/src_c/ to src/backend/snowball/libstemmer
with replacement of "../runtime/header.h" by "header.h", for example
with replacement of "../runtime/snowball_runtime.h" by "snowball_runtime.h",
for example
for f in .../snowball/src_c/*.c
do
sed 's|\.\./runtime/header\.h|header.h|' $f >libstemmer/`basename $f`
sed 's|\.\./runtime/snowball_runtime\.h|snowball_runtime.h|' $f >libstemmer/`basename $f`
done
Do not copy stemmers that are listed in their libstemmer/modules.txt as
nonstandard, such as "kraaij_pohlmann" or "lovins".
nonstandard, such as "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".
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 "snowball_runtime.h".
(This removal avoids portability problems on some platforms where <stdio.h>
is sensitive to largefile compilation options.)
@ -61,9 +62,12 @@ stemmers.
4. Check whether any stemmer modules have been added or removed. If so, edit
the OBJS list in Makefile, the dict_snowball_sources list in meson.build,
the list of #include's and the stemmer_modules[] table in dict_snowball.c,
the list of valid language parameters in the documentation in textsearch.sgml,
and the sample \dFd output in the documentation in textsearch.sgml.
You might also need to change the @languages array in snowball_create.pl
and the tsearch_config_languages[] table in initdb.c.
and the tsearch_config_languages[] table in initdb.c. Typically, the latter
two should be extended when a stemmer for an entirely new language is added,
but alternative stemmers for existing languages are not represented in them.
5. The various stopword files in stopwords/ must be downloaded
individually from pages on the snowballstem.org website.

View file

@ -26,12 +26,13 @@
#undef MININT
#endif
/* Now we can include the original Snowball header.h */
#include "snowball/libstemmer/header.h"
/* Now we can include the original Snowball snowball_runtime.h */
#include "snowball/libstemmer/snowball_runtime.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_dutch_porter.h"
#include "snowball/libstemmer/stem_ISO_8859_1_english.h"
#include "snowball/libstemmer/stem_ISO_8859_1_finnish.h"
#include "snowball/libstemmer/stem_ISO_8859_1_french.h"
@ -45,6 +46,7 @@
#include "snowball/libstemmer/stem_ISO_8859_1_spanish.h"
#include "snowball/libstemmer/stem_ISO_8859_1_swedish.h"
#include "snowball/libstemmer/stem_ISO_8859_2_hungarian.h"
#include "snowball/libstemmer/stem_ISO_8859_2_polish.h"
#include "snowball/libstemmer/stem_KOI8_R_russian.h"
#include "snowball/libstemmer/stem_UTF_8_arabic.h"
#include "snowball/libstemmer/stem_UTF_8_armenian.h"
@ -52,7 +54,9 @@
#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_dutch_porter.h"
#include "snowball/libstemmer/stem_UTF_8_english.h"
#include "snowball/libstemmer/stem_UTF_8_esperanto.h"
#include "snowball/libstemmer/stem_UTF_8_estonian.h"
#include "snowball/libstemmer/stem_UTF_8_finnish.h"
#include "snowball/libstemmer/stem_UTF_8_french.h"
@ -66,6 +70,7 @@
#include "snowball/libstemmer/stem_UTF_8_lithuanian.h"
#include "snowball/libstemmer/stem_UTF_8_nepali.h"
#include "snowball/libstemmer/stem_UTF_8_norwegian.h"
#include "snowball/libstemmer/stem_UTF_8_polish.h"
#include "snowball/libstemmer/stem_UTF_8_porter.h"
#include "snowball/libstemmer/stem_UTF_8_portuguese.h"
#include "snowball/libstemmer/stem_UTF_8_romanian.h"
@ -109,6 +114,7 @@ static const stemmer_module stemmer_modules[] =
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(dutch_porter, PG_LATIN1, ISO_8859_1),
STEMMER_MODULE(english, PG_LATIN1, ISO_8859_1),
STEMMER_MODULE(finnish, PG_LATIN1, ISO_8859_1),
STEMMER_MODULE(french, PG_LATIN1, ISO_8859_1),
@ -122,6 +128,7 @@ static const stemmer_module stemmer_modules[] =
STEMMER_MODULE(spanish, PG_LATIN1, ISO_8859_1),
STEMMER_MODULE(swedish, PG_LATIN1, ISO_8859_1),
STEMMER_MODULE(hungarian, PG_LATIN2, ISO_8859_2),
STEMMER_MODULE(polish, PG_LATIN2, ISO_8859_2),
STEMMER_MODULE(russian, PG_KOI8R, KOI8_R),
STEMMER_MODULE(arabic, PG_UTF8, UTF_8),
STEMMER_MODULE(armenian, PG_UTF8, UTF_8),
@ -129,7 +136,9 @@ static const stemmer_module stemmer_modules[] =
STEMMER_MODULE(catalan, PG_UTF8, UTF_8),
STEMMER_MODULE(danish, PG_UTF8, UTF_8),
STEMMER_MODULE(dutch, PG_UTF8, UTF_8),
STEMMER_MODULE(dutch_porter, PG_UTF8, UTF_8),
STEMMER_MODULE(english, PG_UTF8, UTF_8),
STEMMER_MODULE(esperanto, PG_UTF8, UTF_8),
STEMMER_MODULE(estonian, PG_UTF8, UTF_8),
STEMMER_MODULE(finnish, PG_UTF8, UTF_8),
STEMMER_MODULE(french, PG_UTF8, UTF_8),
@ -144,6 +153,7 @@ static const stemmer_module stemmer_modules[] =
STEMMER_MODULE(nepali, PG_UTF8, UTF_8),
STEMMER_MODULE(norwegian, PG_UTF8, UTF_8),
STEMMER_MODULE(porter, PG_UTF8, UTF_8),
STEMMER_MODULE(polish, PG_UTF8, UTF_8),
STEMMER_MODULE(portuguese, PG_UTF8, UTF_8),
STEMMER_MODULE(romanian, PG_UTF8, UTF_8),
STEMMER_MODULE(russian, PG_UTF8, UTF_8),

View file

@ -1,56 +1,30 @@
#include "header.h"
#include "snowball_runtime.h"
extern struct SN_env * SN_create_env(int S_size, int I_size)
static const struct SN_env default_SN_env;
extern struct SN_env * SN_new_env(int alloc_size)
{
struct SN_env * z = (struct SN_env *) calloc(1, sizeof(struct SN_env));
struct SN_env * z = (struct SN_env *) malloc(alloc_size);
if (z == NULL) return NULL;
*z = default_SN_env;
z->p = create_s();
if (z->p == NULL) goto error;
if (S_size)
{
int i;
z->S = (symbol * *) calloc(S_size, sizeof(symbol *));
if (z->S == NULL) goto error;
for (i = 0; i < S_size; i++)
{
z->S[i] = create_s();
if (z->S[i] == NULL) goto error;
}
if (z->p == NULL) {
SN_delete_env(z);
return NULL;
}
if (I_size)
{
z->I = (int *) calloc(I_size, sizeof(int));
if (z->I == NULL) goto error;
}
return z;
error:
SN_close_env(z, S_size);
return NULL;
}
extern void SN_close_env(struct SN_env * z, int S_size)
extern void SN_delete_env(struct SN_env * z)
{
if (z == NULL) return;
if (z->S)
{
int i;
for (i = 0; i < S_size; i++)
{
lose_s(z->S[i]);
}
free(z->S);
}
free(z->I);
if (z->p) lose_s(z->p);
free(z);
}
extern int SN_set_current(struct SN_env * z, int size, const symbol * s)
{
int err = replace_s(z, 0, z->l, size, s, NULL);
int err = replace_s(z, 0, z->l, size, s);
z->c = 0;
return err;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,18 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from danish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_ISO_8859_1_danish.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p1;
symbol * s_ch;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,23 +21,17 @@ extern int danish_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_undouble(struct SN_env * z);
static int r_other_suffix(struct SN_env * z);
static int r_consonant_pair(struct SN_env * z);
static int r_main_suffix(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static const symbol s_0[] = { 's', 't' };
static const symbol s_1[] = { 'i', 'g' };
static const symbol s_2[] = { 'l', 0xF8, 's' };
extern struct SN_env * danish_ISO_8859_1_create_env(void);
extern void danish_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[3] = { 'h', 'e', 'd' };
static const symbol s_0_1[5] = { 'e', 't', 'h', 'e', 'd' };
static const symbol s_0_2[4] = { 'e', 'r', 'e', 'd' };
@ -58,54 +64,50 @@ static const symbol s_0_28[3] = { 'e', 't', 's' };
static const symbol s_0_29[5] = { 'e', 'r', 'e', 't', 's' };
static const symbol s_0_30[2] = { 'e', 't' };
static const symbol s_0_31[4] = { 'e', 'r', 'e', 't' };
static const struct among a_0[32] =
{
{ 3, s_0_0, -1, 1, 0},
{ 5, s_0_1, 0, 1, 0},
{ 4, s_0_2, -1, 1, 0},
{ 1, s_0_3, -1, 1, 0},
{ 5, s_0_4, 3, 1, 0},
{ 4, s_0_5, 3, 1, 0},
{ 6, s_0_6, 5, 1, 0},
{ 3, s_0_7, 3, 1, 0},
{ 4, s_0_8, 3, 1, 0},
{ 3, s_0_9, 3, 1, 0},
{ 2, s_0_10, -1, 1, 0},
{ 5, s_0_11, 10, 1, 0},
{ 4, s_0_12, 10, 1, 0},
{ 2, s_0_13, -1, 1, 0},
{ 5, s_0_14, 13, 1, 0},
{ 4, s_0_15, 13, 1, 0},
{ 1, s_0_16, -1, 2, 0},
{ 4, s_0_17, 16, 1, 0},
{ 2, s_0_18, 16, 1, 0},
{ 5, s_0_19, 18, 1, 0},
{ 7, s_0_20, 19, 1, 0},
{ 4, s_0_21, 18, 1, 0},
{ 5, s_0_22, 18, 1, 0},
{ 4, s_0_23, 18, 1, 0},
{ 3, s_0_24, 16, 1, 0},
{ 6, s_0_25, 24, 1, 0},
{ 5, s_0_26, 24, 1, 0},
{ 3, s_0_27, 16, 1, 0},
{ 3, s_0_28, 16, 1, 0},
{ 5, s_0_29, 28, 1, 0},
{ 2, s_0_30, -1, 1, 0},
{ 4, s_0_31, 30, 1, 0}
static const struct among a_0[32] = {
{ 3, s_0_0, 0, 1, 0},
{ 5, s_0_1, -1, 1, 0},
{ 4, s_0_2, 0, 1, 0},
{ 1, s_0_3, 0, 1, 0},
{ 5, s_0_4, -1, 1, 0},
{ 4, s_0_5, -2, 1, 0},
{ 6, s_0_6, -1, 1, 0},
{ 3, s_0_7, -4, 1, 0},
{ 4, s_0_8, -5, 1, 0},
{ 3, s_0_9, -6, 1, 0},
{ 2, s_0_10, 0, 1, 0},
{ 5, s_0_11, -1, 1, 0},
{ 4, s_0_12, -2, 1, 0},
{ 2, s_0_13, 0, 1, 0},
{ 5, s_0_14, -1, 1, 0},
{ 4, s_0_15, -2, 1, 0},
{ 1, s_0_16, 0, 2, 0},
{ 4, s_0_17, -1, 1, 0},
{ 2, s_0_18, -2, 1, 0},
{ 5, s_0_19, -1, 1, 0},
{ 7, s_0_20, -1, 1, 0},
{ 4, s_0_21, -3, 1, 0},
{ 5, s_0_22, -4, 1, 0},
{ 4, s_0_23, -5, 1, 0},
{ 3, s_0_24, -8, 1, 0},
{ 6, s_0_25, -1, 1, 0},
{ 5, s_0_26, -2, 1, 0},
{ 3, s_0_27, -11, 1, 0},
{ 3, s_0_28, -12, 1, 0},
{ 5, s_0_29, -1, 1, 0},
{ 2, s_0_30, 0, 1, 0},
{ 4, s_0_31, -1, 1, 0}
};
static const symbol s_1_0[2] = { 'g', 'd' };
static const symbol s_1_1[2] = { 'd', 't' };
static const symbol s_1_2[2] = { 'g', 't' };
static const symbol s_1_3[2] = { 'k', 't' };
static const struct among a_1[4] =
{
{ 2, s_1_0, -1, -1, 0},
{ 2, s_1_1, -1, -1, 0},
{ 2, s_1_2, -1, -1, 0},
{ 2, s_1_3, -1, -1, 0}
static const struct among a_1[4] = {
{ 2, s_1_0, 0, -1, 0},
{ 2, s_1_1, 0, -1, 0},
{ 2, s_1_2, 0, -1, 0},
{ 2, s_1_3, 0, -1, 0}
};
static const symbol s_2_0[2] = { 'i', 'g' };
@ -113,14 +115,12 @@ static const symbol s_2_1[3] = { 'l', 'i', 'g' };
static const symbol s_2_2[4] = { 'e', 'l', 'i', 'g' };
static const symbol s_2_3[3] = { 'e', 'l', 's' };
static const symbol s_2_4[4] = { 'l', 0xF8, 's', 't' };
static const struct among a_2[5] =
{
{ 2, s_2_0, -1, 1, 0},
{ 3, s_2_1, 0, 1, 0},
{ 4, s_2_2, 1, 1, 0},
{ 3, s_2_3, -1, 1, 0},
{ 4, s_2_4, -1, 2, 0}
static const struct among a_2[5] = {
{ 2, s_2_0, 0, 1, 0},
{ 3, s_2_1, -1, 1, 0},
{ 4, s_2_2, -1, 1, 0},
{ 3, s_2_3, 0, 1, 0},
{ 4, s_2_4, 0, 2, 0}
};
static const unsigned char g_c[] = { 119, 223, 119, 1 };
@ -129,56 +129,57 @@ static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
static const unsigned char g_s_ending[] = { 239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 };
static const symbol s_0[] = { 's', 't' };
static const symbol s_1[] = { 'i', 'g' };
static const symbol s_2[] = { 'l', 0xF8, 's' };
static int r_mark_regions(struct SN_env * z) {
z->I[1] = z->l;
{ int c_test1 = z->c;
z->c = z->c + 3;
if (z->c > z->l) return 0;
z->I[0] = z->c;
z->c = c_test1;
int i_x;
((SN_local *)z)->i_p1 = z->l;
{
int v_1 = z->c;
if (z->c + 3 > z->l) return 0;
z->c += 3;
i_x = z->c;
z->c = v_1;
}
{
int ret = out_grouping(z, g_v, 97, 248, 1);
if (ret < 0) return 0;
z->c += ret;
}
if (out_grouping(z, g_v, 97, 248, 1) < 0) return 0;
{
int ret = in_grouping(z, g_v, 97, 248, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c;
if (z->I[1] >= z->I[0]) goto lab0;
z->I[1] = z->I[0];
((SN_local *)z)->i_p1 = z->c;
if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
((SN_local *)z)->i_p1 = i_x;
lab0:
return 1;
}
static int r_main_suffix(struct SN_env * z) {
int among_var;
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
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; }
among_var = find_among_b(z, a_0, 32);
if (!among_var) { z->lb = mlimit1; return 0; }
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851440 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
among_var = find_among_b(z, a_0, 32, 0);
if (!among_var) { z->lb = v_1; return 0; }
z->bra = z->c;
z->lb = mlimit1;
z->lb = v_1;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b(z, g_s_ending, 97, 229, 0)) return 0;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -187,23 +188,25 @@ static int r_main_suffix(struct SN_env * z) {
}
static int r_consonant_pair(struct SN_env * z) {
{ int m_test1 = z->l - z->c;
{ int mlimit2;
if (z->c < z->I[1]) return 0;
mlimit2 = z->lb; z->lb = z->I[1];
{
int v_1 = z->l - z->c;
{
int v_2;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_2 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit2; return 0; }
if (!find_among_b(z, a_1, 4)) { z->lb = mlimit2; return 0; }
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = v_2; return 0; }
if (!find_among_b(z, a_1, 4, 0)) { z->lb = v_2; return 0; }
z->bra = z->c;
z->lb = mlimit2;
z->lb = v_2;
}
z->c = z->l - m_test1;
z->c = z->l - v_1;
}
if (z->c <= z->lb) return 0;
z->c--;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -211,42 +214,48 @@ static int r_consonant_pair(struct SN_env * z) {
static int r_other_suffix(struct SN_env * z) {
int among_var;
{ int m1 = z->l - z->c; (void)m1;
{
int v_1 = z->l - z->c;
z->ket = z->c;
if (!(eq_s_b(z, 2, s_0))) goto lab0;
z->bra = z->c;
if (!(eq_s_b(z, 2, s_1))) goto lab0;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab0:
z->c = z->l - m1;
z->c = z->l - v_1;
}
{ int mlimit2;
if (z->c < z->I[1]) return 0;
mlimit2 = z->lb; z->lb = z->I[1];
{
int v_2;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_2 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
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; }
among_var = find_among_b(z, a_2, 5);
if (!among_var) { z->lb = mlimit2; return 0; }
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_2; return 0; }
among_var = find_among_b(z, a_2, 5, 0);
if (!among_var) { z->lb = v_2; return 0; }
z->bra = z->c;
z->lb = mlimit2;
z->lb = v_2;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_consonant_pair(z);
{
int v_3 = z->l - z->c;
{
int ret = r_consonant_pair(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
break;
case 2:
{ int ret = slice_from_s(z, 3, s_2);
{
int ret = slice_from_s(z, 3, s_2);
if (ret < 0) return ret;
}
break;
@ -255,62 +264,91 @@ static int r_other_suffix(struct SN_env * z) {
}
static int r_undouble(struct SN_env * z) {
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (in_grouping_b(z, g_c, 98, 122, 0)) { z->lb = mlimit1; return 0; }
if (in_grouping_b(z, g_c, 98, 122, 0)) { z->lb = v_1; return 0; }
z->bra = z->c;
z->S[0] = slice_to(z, z->S[0]);
if (z->S[0] == 0) return -1;
z->lb = mlimit1;
{
int ret = slice_to(z, &((SN_local *)z)->s_ch);
if (ret < 0) return ret;
}
z->lb = v_1;
}
if (!(eq_v_b(z, z->S[0]))) return 0;
{ int ret = slice_del(z);
if (!(eq_v_b(z, ((SN_local *)z)->s_ch))) return 0;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
extern int danish_ISO_8859_1_stem(struct SN_env * z) {
{ int c1 = z->c;
{ int ret = r_mark_regions(z);
{
int v_1 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = c1;
z->c = v_1;
}
z->lb = z->c; z->c = z->l;
{ int m2 = z->l - z->c; (void)m2;
{ int ret = r_main_suffix(z);
{
int v_2 = z->l - z->c;
{
int ret = r_main_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_consonant_pair(z);
{
int v_3 = z->l - z->c;
{
int ret = r_consonant_pair(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_other_suffix(z);
{
int v_4 = z->l - z->c;
{
int ret = r_other_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
{ int m5 = z->l - z->c; (void)m5;
{ int ret = r_undouble(z);
{
int v_5 = z->l - z->c;
{
int ret = r_undouble(z);
if (ret < 0) return ret;
}
z->c = z->l - m5;
z->c = z->l - v_5;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * danish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2); }
extern struct SN_env * danish_ISO_8859_1_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p1 = 0;
((SN_local *)z)->s_ch = NULL;
extern void danish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 1); }
if ((((SN_local *)z)->s_ch = create_s()) == NULL) {
danish_ISO_8859_1_close_env(z);
return NULL;
}
}
return z;
}
extern void danish_ISO_8859_1_close_env(struct SN_env * z) {
if (z) {
lose_s(((SN_local *)z)->s_ch);
}
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,665 @@
/* Generated from dutch_porter.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "stem_ISO_8859_1_dutch_porter.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p2;
int i_p1;
unsigned char b_e_found;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
#endif
extern int dutch_porter_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_standard_suffix(struct SN_env * z);
static int r_undouble(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_R1(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
static int r_en_ending(struct SN_env * z);
static int r_e_ending(struct SN_env * z);
static int r_postlude(struct SN_env * z);
static int r_prelude(struct SN_env * z);
static const symbol s_0[] = { 'a' };
static const symbol s_1[] = { 'e' };
static const symbol s_2[] = { 'i' };
static const symbol s_3[] = { 'o' };
static const symbol s_4[] = { 'u' };
static const symbol s_5[] = { 'Y' };
static const symbol s_6[] = { 'I' };
static const symbol s_7[] = { 'Y' };
static const symbol s_8[] = { 'y' };
static const symbol s_9[] = { 'i' };
static const symbol s_10[] = { 'g', 'e', 'm' };
static const symbol s_11[] = { 'h', 'e', 'i', 'd' };
static const symbol s_12[] = { 'h', 'e', 'i', 'd' };
static const symbol s_13[] = { 'e', 'n' };
static const symbol s_14[] = { 'i', 'g' };
static const symbol s_0_1[1] = { 0xE1 };
static const symbol s_0_2[1] = { 0xE4 };
static const symbol s_0_3[1] = { 0xE9 };
static const symbol s_0_4[1] = { 0xEB };
static const symbol s_0_5[1] = { 0xED };
static const symbol s_0_6[1] = { 0xEF };
static const symbol s_0_7[1] = { 0xF3 };
static const symbol s_0_8[1] = { 0xF6 };
static const symbol s_0_9[1] = { 0xFA };
static const symbol s_0_10[1] = { 0xFC };
static const struct among a_0[11] = {
{ 0, 0, 0, 6, 0},
{ 1, s_0_1, -1, 1, 0},
{ 1, s_0_2, -2, 1, 0},
{ 1, s_0_3, -3, 2, 0},
{ 1, s_0_4, -4, 2, 0},
{ 1, s_0_5, -5, 3, 0},
{ 1, s_0_6, -6, 3, 0},
{ 1, s_0_7, -7, 4, 0},
{ 1, s_0_8, -8, 4, 0},
{ 1, s_0_9, -9, 5, 0},
{ 1, s_0_10, -10, 5, 0}
};
static const symbol s_1_1[1] = { 'I' };
static const symbol s_1_2[1] = { 'Y' };
static const struct among a_1[3] = {
{ 0, 0, 0, 3, 0},
{ 1, s_1_1, -1, 2, 0},
{ 1, s_1_2, -2, 1, 0}
};
static const symbol s_2_0[2] = { 'd', 'd' };
static const symbol s_2_1[2] = { 'k', 'k' };
static const symbol s_2_2[2] = { 't', 't' };
static const struct among a_2[3] = {
{ 2, s_2_0, 0, -1, 0},
{ 2, s_2_1, 0, -1, 0},
{ 2, s_2_2, 0, -1, 0}
};
static const symbol s_3_0[3] = { 'e', 'n', 'e' };
static const symbol s_3_1[2] = { 's', 'e' };
static const symbol s_3_2[2] = { 'e', 'n' };
static const symbol s_3_3[5] = { 'h', 'e', 'd', 'e', 'n' };
static const symbol s_3_4[1] = { 's' };
static const struct among a_3[5] = {
{ 3, s_3_0, 0, 2, 0},
{ 2, s_3_1, 0, 3, 0},
{ 2, s_3_2, 0, 2, 0},
{ 5, s_3_3, -1, 1, 0},
{ 1, s_3_4, 0, 3, 0}
};
static const symbol s_4_0[3] = { 'e', 'n', 'd' };
static const symbol s_4_1[2] = { 'i', 'g' };
static const symbol s_4_2[3] = { 'i', 'n', 'g' };
static const symbol s_4_3[4] = { 'l', 'i', 'j', 'k' };
static const symbol s_4_4[4] = { 'b', 'a', 'a', 'r' };
static const symbol s_4_5[3] = { 'b', 'a', 'r' };
static const struct among a_4[6] = {
{ 3, s_4_0, 0, 1, 0},
{ 2, s_4_1, 0, 2, 0},
{ 3, s_4_2, 0, 1, 0},
{ 4, s_4_3, 0, 3, 0},
{ 4, s_4_4, 0, 4, 0},
{ 3, s_4_5, 0, 5, 0}
};
static const symbol s_5_0[2] = { 'a', 'a' };
static const symbol s_5_1[2] = { 'e', 'e' };
static const symbol s_5_2[2] = { 'o', 'o' };
static const symbol s_5_3[2] = { 'u', 'u' };
static const struct among a_5[4] = {
{ 2, s_5_0, 0, -1, 0},
{ 2, s_5_1, 0, -1, 0},
{ 2, s_5_2, 0, -1, 0},
{ 2, s_5_3, 0, -1, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
static const unsigned char g_v_I[] = { 1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
static const unsigned char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
static int r_prelude(struct SN_env * z) {
int among_var;
{
int v_1 = z->c;
while (1) {
int v_2 = z->c;
z->bra = z->c;
if (z->c >= z->l || z->p[z->c + 0] >> 5 != 7 || !((340306450 >> (z->p[z->c + 0] & 0x1f)) & 1)) among_var = 6; else
among_var = find_among(z, a_0, 11, 0);
z->ket = z->c;
switch (among_var) {
case 1:
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 1, s_1);
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = slice_from_s(z, 1, s_2);
if (ret < 0) return ret;
}
break;
case 4:
{
int ret = slice_from_s(z, 1, s_3);
if (ret < 0) return ret;
}
break;
case 5:
{
int ret = slice_from_s(z, 1, s_4);
if (ret < 0) return ret;
}
break;
case 6:
if (z->c >= z->l) goto lab0;
z->c++;
break;
}
continue;
lab0:
z->c = v_2;
break;
}
z->c = v_1;
}
{
int v_3 = z->c;
z->bra = z->c;
if (z->c == z->l || z->p[z->c] != 'y') { z->c = v_3; goto lab1; }
z->c++;
z->ket = z->c;
{
int ret = slice_from_s(z, 1, s_5);
if (ret < 0) return ret;
}
lab1:
;
}
while (1) {
int v_4 = z->c;
{
int ret = out_grouping(z, g_v, 97, 232, 1);
if (ret < 0) goto lab2;
z->c += ret;
}
{
int v_5 = z->c;
z->bra = z->c;
do {
int v_6 = z->c;
if (z->c == z->l || z->p[z->c] != 'i') goto lab4;
z->c++;
z->ket = z->c;
{
int v_7 = z->c;
if (in_grouping(z, g_v, 97, 232, 0)) goto lab5;
{
int ret = slice_from_s(z, 1, s_6);
if (ret < 0) return ret;
}
lab5:
z->c = v_7;
}
break;
lab4:
z->c = v_6;
if (z->c == z->l || z->p[z->c] != 'y') { z->c = v_5; goto lab3; }
z->c++;
z->ket = z->c;
{
int ret = slice_from_s(z, 1, s_7);
if (ret < 0) return ret;
}
} while (0);
lab3:
;
}
continue;
lab2:
z->c = v_4;
break;
}
return 1;
}
static int r_mark_regions(struct SN_env * z) {
int i_x;
((SN_local *)z)->i_p1 = z->l;
((SN_local *)z)->i_p2 = z->l;
{
int v_1 = z->c;
if (z->c + 3 > z->l) return 0;
z->c += 3;
i_x = z->c;
z->c = v_1;
}
{
int ret = out_grouping(z, g_v, 97, 232, 1);
if (ret < 0) return 0;
z->c += ret;
}
{
int ret = in_grouping(z, g_v, 97, 232, 1);
if (ret < 0) return 0;
z->c += ret;
}
((SN_local *)z)->i_p1 = z->c;
if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
((SN_local *)z)->i_p1 = i_x;
lab0:
{
int ret = out_grouping(z, g_v, 97, 232, 1);
if (ret < 0) return 0;
z->c += ret;
}
{
int ret = in_grouping(z, g_v, 97, 232, 1);
if (ret < 0) return 0;
z->c += ret;
}
((SN_local *)z)->i_p2 = z->c;
return 1;
}
static int r_postlude(struct SN_env * z) {
int among_var;
while (1) {
int v_1 = z->c;
z->bra = z->c;
if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
among_var = find_among(z, a_1, 3, 0);
z->ket = z->c;
switch (among_var) {
case 1:
{
int ret = slice_from_s(z, 1, s_8);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 1, s_9);
if (ret < 0) return ret;
}
break;
case 3:
if (z->c >= z->l) goto lab0;
z->c++;
break;
}
continue;
lab0:
z->c = v_1;
break;
}
return 1;
}
static int r_R1(struct SN_env * z) {
return ((SN_local *)z)->i_p1 <= z->c;
}
static int r_R2(struct SN_env * z) {
return ((SN_local *)z)->i_p2 <= z->c;
}
static int r_undouble(struct SN_env * z) {
{
int v_1 = z->l - z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
if (!find_among_b(z, a_2, 3, 0)) return 0;
z->c = z->l - v_1;
}
z->ket = z->c;
if (z->c <= z->lb) return 0;
z->c--;
z->bra = z->c;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
static int r_e_ending(struct SN_env * z) {
((SN_local *)z)->b_e_found = 0;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') return 0;
z->c--;
z->bra = z->c;
{
int ret = r_R1(z);
if (ret <= 0) return ret;
}
{
int v_1 = z->l - z->c;
if (out_grouping_b(z, g_v, 97, 232, 0)) return 0;
z->c = z->l - v_1;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
((SN_local *)z)->b_e_found = 1;
return r_undouble(z);
}
static int r_en_ending(struct SN_env * z) {
{
int ret = r_R1(z);
if (ret <= 0) return ret;
}
{
int v_1 = z->l - z->c;
if (out_grouping_b(z, g_v, 97, 232, 0)) return 0;
z->c = z->l - v_1;
{
int v_2 = z->l - z->c;
if (!(eq_s_b(z, 3, s_10))) goto lab0;
return 0;
lab0:
z->c = z->l - v_2;
}
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return r_undouble(z);
}
static int r_standard_suffix(struct SN_env * z) {
int among_var;
{
int v_1 = z->l - z->c;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
among_var = find_among_b(z, a_3, 5, 0);
if (!among_var) goto lab0;
z->bra = z->c;
switch (among_var) {
case 1:
{
int ret = r_R1(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
{
int ret = slice_from_s(z, 4, s_11);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = r_en_ending(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = r_R1(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
if (out_grouping_b(z, g_v_j, 97, 232, 0)) goto lab0;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
}
lab0:
z->c = z->l - v_1;
}
{
int v_2 = z->l - z->c;
{
int ret = r_e_ending(z);
if (ret < 0) return ret;
}
z->c = z->l - v_2;
}
{
int v_3 = z->l - z->c;
z->ket = z->c;
if (!(eq_s_b(z, 4, s_12))) goto lab1;
z->bra = z->c;
{
int ret = r_R2(z);
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
{
int v_4 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'c') goto lab2;
z->c--;
goto lab1;
lab2:
z->c = z->l - v_4;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->ket = z->c;
if (!(eq_s_b(z, 2, s_13))) goto lab1;
z->bra = z->c;
{
int ret = r_en_ending(z);
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - v_3;
}
{
int v_5 = z->l - z->c;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
among_var = find_among_b(z, a_4, 6, 0);
if (!among_var) goto lab3;
z->bra = z->c;
switch (among_var) {
case 1:
{
int ret = r_R2(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
do {
int v_6 = z->l - z->c;
z->ket = z->c;
if (!(eq_s_b(z, 2, s_14))) goto lab4;
z->bra = z->c;
{
int ret = r_R2(z);
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
{
int v_7 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab5;
z->c--;
goto lab4;
lab5:
z->c = z->l - v_7;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
lab4:
z->c = z->l - v_6;
{
int ret = r_undouble(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
} while (0);
break;
case 2:
{
int ret = r_R2(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
{
int v_8 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab6;
z->c--;
goto lab3;
lab6:
z->c = z->l - v_8;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = r_R2(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{
int ret = r_e_ending(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
break;
case 4:
{
int ret = r_R2(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 5:
{
int ret = r_R2(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
if (!((SN_local *)z)->b_e_found) goto lab3;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
}
lab3:
z->c = z->l - v_5;
}
{
int v_9 = z->l - z->c;
if (out_grouping_b(z, g_v_I, 73, 232, 0)) goto lab7;
{
int v_10 = z->l - z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab7;
if (!find_among_b(z, a_5, 4, 0)) goto lab7;
if (out_grouping_b(z, g_v, 97, 232, 0)) goto lab7;
z->c = z->l - v_10;
}
z->ket = z->c;
if (z->c <= z->lb) goto lab7;
z->c--;
z->bra = z->c;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab7:
z->c = z->l - v_9;
}
return 1;
}
extern int dutch_porter_ISO_8859_1_stem(struct SN_env * z) {
{
int v_1 = z->c;
{
int ret = r_prelude(z);
if (ret < 0) return ret;
}
z->c = v_1;
}
{
int v_2 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = v_2;
}
z->lb = z->c; z->c = z->l;
{
int ret = r_standard_suffix(z);
if (ret < 0) return ret;
}
z->c = z->lb;
{
int v_3 = z->c;
{
int ret = r_postlude(z);
if (ret < 0) return ret;
}
z->c = v_3;
}
return 1;
}
extern struct SN_env * dutch_porter_ISO_8859_1_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p2 = 0;
((SN_local *)z)->i_p1 = 0;
((SN_local *)z)->b_e_found = 0;
}
return z;
}
extern void dutch_porter_ISO_8859_1_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,18 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from german.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_ISO_8859_1_german.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p2;
int i_p1;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,131 +21,13 @@ extern int german_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_standard_suffix(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_R1(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
static int r_postlude(struct SN_env * z);
static int r_prelude(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * german_ISO_8859_1_create_env(void);
extern void german_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_1[2] = { 'a', 'e' };
static const symbol s_0_2[2] = { 'o', 'e' };
static const symbol s_0_3[2] = { 'q', 'u' };
static const symbol s_0_4[2] = { 'u', 'e' };
static const symbol s_0_5[1] = { 0xDF };
static const struct among a_0[6] =
{
{ 0, 0, -1, 5, 0},
{ 2, s_0_1, 0, 2, 0},
{ 2, s_0_2, 0, 3, 0},
{ 2, s_0_3, 0, -1, 0},
{ 2, s_0_4, 0, 4, 0},
{ 1, s_0_5, 0, 1, 0}
};
static const symbol s_1_1[1] = { 'U' };
static const symbol s_1_2[1] = { 'Y' };
static const symbol s_1_3[1] = { 0xE4 };
static const symbol s_1_4[1] = { 0xF6 };
static const symbol s_1_5[1] = { 0xFC };
static const struct among a_1[6] =
{
{ 0, 0, -1, 5, 0},
{ 1, s_1_1, 0, 2, 0},
{ 1, s_1_2, 0, 1, 0},
{ 1, s_1_3, 0, 3, 0},
{ 1, s_1_4, 0, 4, 0},
{ 1, s_1_5, 0, 2, 0}
};
static const symbol s_2_0[1] = { 'e' };
static const symbol s_2_1[2] = { 'e', 'm' };
static const symbol s_2_2[2] = { 'e', 'n' };
static const symbol s_2_3[7] = { 'e', 'r', 'i', 'n', 'n', 'e', 'n' };
static const symbol s_2_4[4] = { 'e', 'r', 'i', 'n' };
static const symbol s_2_5[2] = { 'l', 'n' };
static const symbol s_2_6[3] = { 'e', 'r', 'n' };
static const symbol s_2_7[2] = { 'e', 'r' };
static const symbol s_2_8[1] = { 's' };
static const symbol s_2_9[2] = { 'e', 's' };
static const symbol s_2_10[3] = { 'l', 'n', 's' };
static const struct among a_2[11] =
{
{ 1, s_2_0, -1, 3, 0},
{ 2, s_2_1, -1, 1, 0},
{ 2, s_2_2, -1, 3, 0},
{ 7, s_2_3, 2, 2, 0},
{ 4, s_2_4, -1, 2, 0},
{ 2, s_2_5, -1, 5, 0},
{ 3, s_2_6, -1, 2, 0},
{ 2, s_2_7, -1, 2, 0},
{ 1, s_2_8, -1, 4, 0},
{ 2, s_2_9, 8, 3, 0},
{ 3, s_2_10, 8, 5, 0}
};
static const symbol s_3_0[2] = { 'e', 'n' };
static const symbol s_3_1[2] = { 'e', 'r' };
static const symbol s_3_2[2] = { 's', 't' };
static const symbol s_3_3[3] = { 'e', 's', 't' };
static const struct among a_3[4] =
{
{ 2, s_3_0, -1, 1, 0},
{ 2, s_3_1, -1, 1, 0},
{ 2, s_3_2, -1, 2, 0},
{ 3, s_3_3, 2, 1, 0}
};
static const symbol s_4_0[2] = { 'i', 'g' };
static const symbol s_4_1[4] = { 'l', 'i', 'c', 'h' };
static const struct among a_4[2] =
{
{ 2, s_4_0, -1, 1, 0},
{ 4, s_4_1, -1, 1, 0}
};
static const symbol s_5_0[3] = { 'e', 'n', 'd' };
static const symbol s_5_1[2] = { 'i', 'g' };
static const symbol s_5_2[3] = { 'u', 'n', 'g' };
static const symbol s_5_3[4] = { 'l', 'i', 'c', 'h' };
static const symbol s_5_4[4] = { 'i', 's', 'c', 'h' };
static const symbol s_5_5[2] = { 'i', 'k' };
static const symbol s_5_6[4] = { 'h', 'e', 'i', 't' };
static const symbol s_5_7[4] = { 'k', 'e', 'i', 't' };
static const struct among a_5[8] =
{
{ 3, s_5_0, -1, 1, 0},
{ 2, s_5_1, -1, 2, 0},
{ 3, s_5_2, -1, 1, 0},
{ 4, s_5_3, -1, 3, 0},
{ 4, s_5_4, -1, 2, 0},
{ 2, s_5_5, -1, 2, 0},
{ 4, s_5_6, -1, 3, 0},
{ 4, s_5_7, -1, 4, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
static const unsigned char g_s_ending[] = { 117, 30, 5 };
static const unsigned char g_st_ending[] = { 117, 30, 4 };
static const symbol s_0[] = { 'U' };
static const symbol s_1[] = { 'Y' };
@ -152,155 +46,276 @@ static const symbol s_13[] = { 'i', 'g' };
static const symbol s_14[] = { 'e', 'r' };
static const symbol s_15[] = { 'e', 'n' };
static const symbol s_0_1[2] = { 'a', 'e' };
static const symbol s_0_2[2] = { 'o', 'e' };
static const symbol s_0_3[2] = { 'q', 'u' };
static const symbol s_0_4[2] = { 'u', 'e' };
static const symbol s_0_5[1] = { 0xDF };
static const struct among a_0[6] = {
{ 0, 0, 0, 5, 0},
{ 2, s_0_1, -1, 2, 0},
{ 2, s_0_2, -2, 3, 0},
{ 2, s_0_3, -3, -1, 0},
{ 2, s_0_4, -4, 4, 0},
{ 1, s_0_5, -5, 1, 0}
};
static const symbol s_1_1[1] = { 'U' };
static const symbol s_1_2[1] = { 'Y' };
static const symbol s_1_3[1] = { 0xE4 };
static const symbol s_1_4[1] = { 0xF6 };
static const symbol s_1_5[1] = { 0xFC };
static const struct among a_1[6] = {
{ 0, 0, 0, 5, 0},
{ 1, s_1_1, -1, 2, 0},
{ 1, s_1_2, -2, 1, 0},
{ 1, s_1_3, -3, 3, 0},
{ 1, s_1_4, -4, 4, 0},
{ 1, s_1_5, -5, 2, 0}
};
static const symbol s_2_0[1] = { 'e' };
static const symbol s_2_1[2] = { 'e', 'm' };
static const symbol s_2_2[2] = { 'e', 'n' };
static const symbol s_2_3[7] = { 'e', 'r', 'i', 'n', 'n', 'e', 'n' };
static const symbol s_2_4[4] = { 'e', 'r', 'i', 'n' };
static const symbol s_2_5[2] = { 'l', 'n' };
static const symbol s_2_6[3] = { 'e', 'r', 'n' };
static const symbol s_2_7[2] = { 'e', 'r' };
static const symbol s_2_8[1] = { 's' };
static const symbol s_2_9[2] = { 'e', 's' };
static const symbol s_2_10[3] = { 'l', 'n', 's' };
static const struct among a_2[11] = {
{ 1, s_2_0, 0, 3, 0},
{ 2, s_2_1, 0, 1, 0},
{ 2, s_2_2, 0, 3, 0},
{ 7, s_2_3, -1, 2, 0},
{ 4, s_2_4, 0, 2, 0},
{ 2, s_2_5, 0, 5, 0},
{ 3, s_2_6, 0, 2, 0},
{ 2, s_2_7, 0, 2, 0},
{ 1, s_2_8, 0, 4, 0},
{ 2, s_2_9, -1, 3, 0},
{ 3, s_2_10, -2, 5, 0}
};
static const symbol s_3_0[4] = { 't', 'i', 'c', 'k' };
static const symbol s_3_1[4] = { 'p', 'l', 'a', 'n' };
static const symbol s_3_2[6] = { 'g', 'e', 'o', 'r', 'd', 'n' };
static const symbol s_3_3[6] = { 'i', 'n', 't', 'e', 'r', 'n' };
static const symbol s_3_4[2] = { 't', 'r' };
static const struct among a_3[5] = {
{ 4, s_3_0, 0, -1, 0},
{ 4, s_3_1, 0, -1, 0},
{ 6, s_3_2, 0, -1, 0},
{ 6, s_3_3, 0, -1, 0},
{ 2, s_3_4, 0, -1, 0}
};
static const symbol s_4_0[2] = { 'e', 'n' };
static const symbol s_4_1[2] = { 'e', 'r' };
static const symbol s_4_2[2] = { 'e', 't' };
static const symbol s_4_3[2] = { 's', 't' };
static const symbol s_4_4[3] = { 'e', 's', 't' };
static const struct among a_4[5] = {
{ 2, s_4_0, 0, 1, 0},
{ 2, s_4_1, 0, 1, 0},
{ 2, s_4_2, 0, 3, 0},
{ 2, s_4_3, 0, 2, 0},
{ 3, s_4_4, -1, 1, 0}
};
static const symbol s_5_0[2] = { 'i', 'g' };
static const symbol s_5_1[4] = { 'l', 'i', 'c', 'h' };
static const struct among a_5[2] = {
{ 2, s_5_0, 0, 1, 0},
{ 4, s_5_1, 0, 1, 0}
};
static const symbol s_6_0[3] = { 'e', 'n', 'd' };
static const symbol s_6_1[2] = { 'i', 'g' };
static const symbol s_6_2[3] = { 'u', 'n', 'g' };
static const symbol s_6_3[4] = { 'l', 'i', 'c', 'h' };
static const symbol s_6_4[4] = { 'i', 's', 'c', 'h' };
static const symbol s_6_5[2] = { 'i', 'k' };
static const symbol s_6_6[4] = { 'h', 'e', 'i', 't' };
static const symbol s_6_7[4] = { 'k', 'e', 'i', 't' };
static const struct among a_6[8] = {
{ 3, s_6_0, 0, 1, 0},
{ 2, s_6_1, 0, 2, 0},
{ 3, s_6_2, 0, 1, 0},
{ 4, s_6_3, 0, 3, 0},
{ 4, s_6_4, 0, 2, 0},
{ 2, s_6_5, 0, 2, 0},
{ 4, s_6_6, 0, 3, 0},
{ 4, s_6_7, 0, 4, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
static const unsigned char g_et_ending[] = { 1, 128, 198, 227, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
static const unsigned char g_s_ending[] = { 117, 30, 5 };
static const unsigned char g_st_ending[] = { 117, 30, 4 };
static int r_prelude(struct SN_env * z) {
int among_var;
{ int c_test1 = z->c;
while(1) {
int c2 = z->c;
while(1) {
int c3 = z->c;
{
int v_1 = z->c;
while (1) {
int v_2 = z->c;
while (1) {
int v_3 = z->c;
if (in_grouping(z, g_v, 97, 252, 0)) goto lab1;
z->bra = z->c;
{ int c4 = z->c;
if (z->c == z->l || z->p[z->c] != 'u') goto lab3;
do {
int v_4 = z->c;
if (z->c == z->l || z->p[z->c] != 'u') goto lab2;
z->c++;
z->ket = z->c;
if (in_grouping(z, g_v, 97, 252, 0)) goto lab3;
{ int ret = slice_from_s(z, 1, s_0);
if (in_grouping(z, g_v, 97, 252, 0)) goto lab2;
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
goto lab2;
lab3:
z->c = c4;
break;
lab2:
z->c = v_4;
if (z->c == z->l || z->p[z->c] != 'y') goto lab1;
z->c++;
z->ket = z->c;
if (in_grouping(z, g_v, 97, 252, 0)) goto lab1;
{ int ret = slice_from_s(z, 1, s_1);
{
int ret = slice_from_s(z, 1, s_1);
if (ret < 0) return ret;
}
}
lab2:
z->c = c3;
} while (0);
z->c = v_3;
break;
lab1:
z->c = c3;
z->c = v_3;
if (z->c >= z->l) goto lab0;
z->c++;
}
continue;
lab0:
z->c = c2;
z->c = v_2;
break;
}
z->c = c_test1;
z->c = v_1;
}
while(1) {
int c5 = z->c;
while (1) {
int v_5 = z->c;
z->bra = z->c;
among_var = find_among(z, a_0, 6);
among_var = find_among(z, a_0, 6, 0);
z->ket = z->c;
switch (among_var) {
case 1:
{ int ret = slice_from_s(z, 2, s_2);
{
int ret = slice_from_s(z, 2, s_2);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_3);
{
int ret = slice_from_s(z, 1, s_3);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 1, s_4);
{
int ret = slice_from_s(z, 1, s_4);
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 1, s_5);
{
int ret = slice_from_s(z, 1, s_5);
if (ret < 0) return ret;
}
break;
case 5:
if (z->c >= z->l) goto lab4;
if (z->c >= z->l) goto lab3;
z->c++;
break;
}
continue;
lab4:
z->c = c5;
lab3:
z->c = v_5;
break;
}
return 1;
}
static int r_mark_regions(struct SN_env * z) {
z->I[2] = z->l;
z->I[1] = z->l;
{ int c_test1 = z->c;
z->c = z->c + 3;
if (z->c > z->l) return 0;
z->I[0] = z->c;
z->c = c_test1;
int i_x;
((SN_local *)z)->i_p1 = z->l;
((SN_local *)z)->i_p2 = z->l;
{
int v_1 = z->c;
if (z->c + 3 > z->l) return 0;
z->c += 3;
i_x = z->c;
z->c = v_1;
}
{
int ret = out_grouping(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
{
int ret = in_grouping(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[2] = z->c;
if (z->I[2] >= z->I[0]) goto lab0;
z->I[2] = z->I[0];
((SN_local *)z)->i_p1 = z->c;
if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
((SN_local *)z)->i_p1 = i_x;
lab0:
{
int ret = out_grouping(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
{
int ret = in_grouping(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c;
((SN_local *)z)->i_p2 = z->c;
return 1;
}
static int r_postlude(struct SN_env * z) {
int among_var;
while(1) {
int c1 = z->c;
while (1) {
int v_1 = z->c;
z->bra = z->c;
among_var = find_among(z, a_1, 6);
among_var = find_among(z, a_1, 6, 0);
z->ket = z->c;
switch (among_var) {
case 1:
{ int ret = slice_from_s(z, 1, s_6);
{
int ret = slice_from_s(z, 1, s_6);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_7);
{
int ret = slice_from_s(z, 1, s_7);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 1, s_8);
{
int ret = slice_from_s(z, 1, s_8);
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 1, s_9);
{
int ret = slice_from_s(z, 1, s_9);
if (ret < 0) return ret;
}
break;
@ -311,60 +326,68 @@ static int r_postlude(struct SN_env * z) {
}
continue;
lab0:
z->c = c1;
z->c = v_1;
break;
}
return 1;
}
static int r_R1(struct SN_env * z) {
return z->I[2] <= z->c;
return ((SN_local *)z)->i_p1 <= z->c;
}
static int r_R2(struct SN_env * z) {
return z->I[1] <= z->c;
return ((SN_local *)z)->i_p2 <= z->c;
}
static int r_standard_suffix(struct SN_env * z) {
int among_var;
{ int m1 = z->l - z->c; (void)m1;
{
int v_1 = z->l - z->c;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
among_var = find_among_b(z, a_2, 11);
among_var = find_among_b(z, a_2, 11, 0);
if (!among_var) goto lab0;
z->bra = z->c;
{ int ret = r_R1(z);
{
int ret = r_R1(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
switch (among_var) {
case 1:
{ int m2 = z->l - z->c; (void)m2;
{
int v_2 = z->l - z->c;
if (!(eq_s_b(z, 4, s_10))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{ int m3 = z->l - z->c; (void)m3;
{
int v_3 = z->l - z->c;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 's') { z->c = z->l - m3; goto lab2; }
if (z->c <= z->lb || z->p[z->c - 1] != 's') { z->c = z->l - v_3; goto lab2; }
z->c--;
z->bra = z->c;
if (!(eq_s_b(z, 3, s_11))) { z->c = z->l - m3; goto lab2; }
{ int ret = slice_del(z);
if (!(eq_s_b(z, 3, s_11))) { z->c = z->l - v_3; goto lab2; }
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab2:
@ -373,136 +396,178 @@ static int r_standard_suffix(struct SN_env * z) {
break;
case 4:
if (in_grouping_b(z, g_s_ending, 98, 116, 0)) goto lab0;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 1, s_12);
{
int ret = slice_from_s(z, 1, s_12);
if (ret < 0) return ret;
}
break;
}
lab0:
z->c = z->l - m1;
z->c = z->l - v_1;
}
{ int m4 = z->l - z->c; (void)m4;
{
int v_4 = z->l - z->c;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
among_var = find_among_b(z, a_3, 4);
among_var = find_among_b(z, a_4, 5, 0);
if (!among_var) goto lab3;
z->bra = z->c;
{ int ret = r_R1(z);
{
int ret = r_R1(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b(z, g_st_ending, 98, 116, 0)) goto lab3;
z->c = z->c - 3;
if (z->c < z->lb) goto lab3;
{ int ret = slice_del(z);
if (z->c - 3 < z->lb) goto lab3;
z->c -= 3;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{
int v_5 = z->l - z->c;
if (in_grouping_b(z, g_et_ending, 85, 228, 0)) goto lab3;
z->c = z->l - v_5;
}
{
int v_6 = z->l - z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((280576 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
if (!find_among_b(z, a_3, 5, 0)) goto lab4;
goto lab3;
lab4:
z->c = z->l - v_6;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
}
lab3:
z->c = z->l - m4;
z->c = z->l - v_4;
}
{ int m5 = z->l - z->c; (void)m5;
{
int v_7 = z->l - z->c;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
among_var = find_among_b(z, a_5, 8);
if (!among_var) goto lab4;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab5;
among_var = find_among_b(z, a_6, 8, 0);
if (!among_var) goto lab5;
z->bra = z->c;
{ int ret = r_R2(z);
if (ret == 0) goto lab4;
{
int ret = r_R2(z);
if (ret == 0) goto lab5;
if (ret < 0) return ret;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{ int m6 = z->l - z->c; (void)m6;
{
int v_8 = z->l - z->c;
z->ket = z->c;
if (!(eq_s_b(z, 2, s_13))) { z->c = z->l - m6; goto lab5; }
if (!(eq_s_b(z, 2, s_13))) { z->c = z->l - v_8; goto lab6; }
z->bra = z->c;
{ int m7 = z->l - z->c; (void)m7;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab6;
{
int v_9 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab7;
z->c--;
{ z->c = z->l - m6; goto lab5; }
lab6:
z->c = z->l - m7;
{ z->c = z->l - v_8; goto lab6; }
lab7:
z->c = z->l - v_9;
}
{ int ret = r_R2(z);
if (ret == 0) { z->c = z->l - m6; goto lab5; }
{
int ret = r_R2(z);
if (ret == 0) { z->c = z->l - v_8; goto lab6; }
if (ret < 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab5:
lab6:
;
}
break;
case 2:
{ int m8 = z->l - z->c; (void)m8;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab7;
{
int v_10 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab8;
z->c--;
goto lab4;
lab7:
z->c = z->l - m8;
goto lab5;
lab8:
z->c = z->l - v_10;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{ int m9 = z->l - z->c; (void)m9;
{
int v_11 = z->l - z->c;
z->ket = z->c;
{ int m10 = z->l - z->c; (void)m10;
do {
int v_12 = z->l - z->c;
if (!(eq_s_b(z, 2, s_14))) goto lab10;
goto lab9;
break;
lab10:
z->c = z->l - m10;
if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m9; goto lab8; }
z->c = z->l - v_12;
if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - v_11; goto lab9; }
} while (0);
z->bra = z->c;
{
int ret = r_R1(z);
if (ret == 0) { z->c = z->l - v_11; goto lab9; }
if (ret < 0) return ret;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab9:
z->bra = z->c;
{ int ret = r_R1(z);
if (ret == 0) { z->c = z->l - m9; goto lab8; }
if (ret < 0) return ret;
}
{ int ret = slice_del(z);
if (ret < 0) return ret;
}
lab8:
;
}
break;
case 4:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{ int m11 = z->l - z->c; (void)m11;
{
int v_13 = z->l - z->c;
z->ket = z->c;
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m11; goto lab11; }
if (!find_among_b(z, a_4, 2)) { z->c = z->l - m11; goto lab11; }
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - v_13; goto lab11; }
if (!find_among_b(z, a_5, 2, 0)) { z->c = z->l - v_13; goto lab11; }
z->bra = z->c;
{ int ret = r_R2(z);
if (ret == 0) { z->c = z->l - m11; goto lab11; }
{
int ret = r_R2(z);
if (ret == 0) { z->c = z->l - v_13; goto lab11; }
if (ret < 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab11:
@ -510,42 +575,56 @@ z->c = z->c - 3;
}
break;
}
lab4:
z->c = z->l - m5;
lab5:
z->c = z->l - v_7;
}
return 1;
}
extern int german_ISO_8859_1_stem(struct SN_env * z) {
{ int c1 = z->c;
{ int ret = r_prelude(z);
{
int v_1 = z->c;
{
int ret = r_prelude(z);
if (ret < 0) return ret;
}
z->c = c1;
z->c = v_1;
}
{ int c2 = z->c;
{ int ret = r_mark_regions(z);
{
int v_2 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = c2;
z->c = v_2;
}
z->lb = z->c; z->c = z->l;
{ int ret = r_standard_suffix(z);
{
int ret = r_standard_suffix(z);
if (ret < 0) return ret;
}
z->c = z->lb;
{ int c3 = z->c;
{ int ret = r_postlude(z);
{
int v_3 = z->c;
{
int ret = r_postlude(z);
if (ret < 0) return ret;
}
z->c = c3;
z->c = v_3;
}
return 1;
}
extern struct SN_env * german_ISO_8859_1_create_env(void) { return SN_create_env(0, 3); }
extern struct SN_env * german_ISO_8859_1_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p2 = 0;
((SN_local *)z)->i_p1 = 0;
}
return z;
}
extern void german_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void german_ISO_8859_1_close_env(struct SN_env * z) {
SN_delete_env(z);
}

View file

@ -1,6 +1,18 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from indonesian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_ISO_8859_1_indonesian.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_prefix;
int i_measure;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,59 +21,44 @@ extern int indonesian_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_VOWEL(struct SN_env * z);
static int r_SUFFIX_I_OK(struct SN_env * z);
static int r_SUFFIX_AN_OK(struct SN_env * z);
static int r_SUFFIX_KAN_OK(struct SN_env * z);
static int r_KER(struct SN_env * z);
static int r_remove_suffix(struct SN_env * z);
static int r_remove_second_order_prefix(struct SN_env * z);
static int r_remove_first_order_prefix(struct SN_env * z);
static int r_remove_possessive_pronoun(struct SN_env * z);
static int r_remove_particle(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static const symbol s_0[] = { 's' };
static const symbol s_1[] = { 's' };
static const symbol s_2[] = { 'p' };
static const symbol s_3[] = { 'p' };
static const symbol s_4[] = { 'a', 'j', 'a', 'r' };
static const symbol s_5[] = { 'a', 'j', 'a', 'r' };
static const symbol s_6[] = { 'e', 'r' };
extern struct SN_env * indonesian_ISO_8859_1_create_env(void);
extern void indonesian_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[3] = { 'k', 'a', 'h' };
static const symbol s_0_1[3] = { 'l', 'a', 'h' };
static const symbol s_0_2[3] = { 'p', 'u', 'n' };
static const struct among a_0[3] =
{
{ 3, s_0_0, -1, 1, 0},
{ 3, s_0_1, -1, 1, 0},
{ 3, s_0_2, -1, 1, 0}
static const struct among a_0[3] = {
{ 3, s_0_0, 0, 1, 0},
{ 3, s_0_1, 0, 1, 0},
{ 3, s_0_2, 0, 1, 0}
};
static const symbol s_1_0[3] = { 'n', 'y', 'a' };
static const symbol s_1_1[2] = { 'k', 'u' };
static const symbol s_1_2[2] = { 'm', 'u' };
static const struct among a_1[3] =
{
{ 3, s_1_0, -1, 1, 0},
{ 2, s_1_1, -1, 1, 0},
{ 2, s_1_2, -1, 1, 0}
static const struct among a_1[3] = {
{ 3, s_1_0, 0, 1, 0},
{ 2, s_1_1, 0, 1, 0},
{ 2, s_1_2, 0, 1, 0}
};
static const symbol s_2_0[1] = { 'i' };
static const symbol s_2_1[2] = { 'a', 'n' };
static const symbol s_2_2[3] = { 'k', 'a', 'n' };
static const struct among a_2[3] =
{
{ 1, s_2_0, -1, 1, r_SUFFIX_I_OK},
{ 2, s_2_1, -1, 1, r_SUFFIX_AN_OK},
{ 3, s_2_2, 1, 1, r_SUFFIX_KAN_OK}
static const struct among a_2[2] = {
{ 1, s_2_0, 0, 2, 0},
{ 2, s_2_1, 0, 1, 0}
};
static const symbol s_3_0[2] = { 'd', 'i' };
@ -70,123 +67,97 @@ static const symbol s_3_2[2] = { 'm', 'e' };
static const symbol s_3_3[3] = { 'm', 'e', 'm' };
static const symbol s_3_4[3] = { 'm', 'e', 'n' };
static const symbol s_3_5[4] = { 'm', 'e', 'n', 'g' };
static const symbol s_3_6[4] = { 'm', 'e', 'n', 'y' };
static const symbol s_3_7[3] = { 'p', 'e', 'm' };
static const symbol s_3_8[3] = { 'p', 'e', 'n' };
static const symbol s_3_9[4] = { 'p', 'e', 'n', 'g' };
static const symbol s_3_10[4] = { 'p', 'e', 'n', 'y' };
static const symbol s_3_11[3] = { 't', 'e', 'r' };
static const struct among a_3[12] =
{
{ 2, s_3_0, -1, 1, 0},
{ 2, s_3_1, -1, 2, 0},
{ 2, s_3_2, -1, 1, 0},
{ 3, s_3_3, 2, 5, 0},
{ 3, s_3_4, 2, 1, 0},
{ 4, s_3_5, 4, 1, 0},
{ 4, s_3_6, 4, 3, r_VOWEL},
{ 3, s_3_7, -1, 6, 0},
{ 3, s_3_8, -1, 2, 0},
{ 4, s_3_9, 8, 2, 0},
{ 4, s_3_10, 8, 4, r_VOWEL},
{ 3, s_3_11, -1, 1, 0}
static const symbol s_3_6[3] = { 'p', 'e', 'm' };
static const symbol s_3_7[3] = { 'p', 'e', 'n' };
static const symbol s_3_8[4] = { 'p', 'e', 'n', 'g' };
static const symbol s_3_9[3] = { 't', 'e', 'r' };
static const struct among a_3[10] = {
{ 2, s_3_0, 0, 1, 0},
{ 2, s_3_1, 0, 3, 0},
{ 2, s_3_2, 0, 1, 0},
{ 3, s_3_3, -1, 5, 0},
{ 3, s_3_4, -2, 2, 0},
{ 4, s_3_5, -1, 1, 0},
{ 3, s_3_6, 0, 6, 0},
{ 3, s_3_7, 0, 4, 0},
{ 4, s_3_8, -1, 3, 0},
{ 3, s_3_9, 0, 1, 0}
};
static const symbol s_4_0[2] = { 'b', 'e' };
static const symbol s_4_1[7] = { 'b', 'e', 'l', 'a', 'j', 'a', 'r' };
static const symbol s_4_2[3] = { 'b', 'e', 'r' };
static const symbol s_4_3[2] = { 'p', 'e' };
static const symbol s_4_4[7] = { 'p', 'e', 'l', 'a', 'j', 'a', 'r' };
static const symbol s_4_5[3] = { 'p', 'e', 'r' };
static const struct among a_4[6] =
{
{ 2, s_4_0, -1, 3, r_KER},
{ 7, s_4_1, 0, 4, 0},
{ 3, s_4_2, 0, 3, 0},
{ 2, s_4_3, -1, 1, 0},
{ 7, s_4_4, 3, 2, 0},
{ 3, s_4_5, 3, 1, 0}
static const symbol s_4_1[2] = { 'p', 'e' };
static const struct among a_4[2] = {
{ 2, s_4_0, 0, 2, 0},
{ 2, s_4_1, 0, 1, 0}
};
static const unsigned char g_vowel[] = { 17, 65, 16 };
static const symbol s_0[] = { 'e', 'r' };
static const symbol s_1[] = { 's' };
static const symbol s_2[] = { 's' };
static const symbol s_3[] = { 'p' };
static const symbol s_4[] = { 'p' };
static const symbol s_5[] = { 'a', 'j', 'a', 'r' };
static const symbol s_6[] = { 'a', 'j', 'a', 'r' };
static int r_remove_particle(struct SN_env * z) {
z->ket = z->c;
if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 104 && z->p[z->c - 1] != 110)) return 0;
if (!find_among_b(z, a_0, 3)) return 0;
if (!find_among_b(z, a_0, 3, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[1] -= 1;
((SN_local *)z)->i_measure -= 1;
return 1;
}
static int r_remove_possessive_pronoun(struct SN_env * z) {
z->ket = z->c;
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 97 && z->p[z->c - 1] != 117)) return 0;
if (!find_among_b(z, a_1, 3)) return 0;
if (!find_among_b(z, a_1, 3, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[1] -= 1;
return 1;
}
static int r_SUFFIX_KAN_OK(struct SN_env * z) {
if (z->I[0] == 3) return 0;
if (z->I[0] == 2) return 0;
return 1;
}
static int r_SUFFIX_AN_OK(struct SN_env * z) {
return z->I[0] != 1;
}
static int r_SUFFIX_I_OK(struct SN_env * z) {
if (z->I[0] > 2) return 0;
{ int m1 = z->l - z->c; (void)m1;
if (z->c <= z->lb || z->p[z->c - 1] != 's') goto lab0;
z->c--;
return 0;
lab0:
z->c = z->l - m1;
}
((SN_local *)z)->i_measure -= 1;
return 1;
}
static int r_remove_suffix(struct SN_env * z) {
int among_var;
z->ket = z->c;
if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 110)) return 0;
if (!find_among_b(z, a_2, 3)) return 0;
among_var = find_among_b(z, a_2, 2, 0);
if (!among_var) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
switch (among_var) {
case 1:
do {
int v_1 = z->l - z->c;
if (((SN_local *)z)->i_prefix == 3) goto lab0;
if (((SN_local *)z)->i_prefix == 2) goto lab0;
if (z->c <= z->lb || z->p[z->c - 1] != 'k') goto lab0;
z->c--;
z->bra = z->c;
break;
lab0:
z->c = z->l - v_1;
if (((SN_local *)z)->i_prefix == 1) return 0;
} while (0);
break;
case 2:
if (((SN_local *)z)->i_prefix > 2) return 0;
{
int v_2 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 's') goto lab1;
z->c--;
return 0;
lab1:
z->c = z->l - v_2;
}
break;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[1] -= 1;
return 1;
}
static int r_VOWEL(struct SN_env * z) {
if (in_grouping(z, g_vowel, 97, 117, 0)) return 0;
return 1;
}
static int r_KER(struct SN_env * z) {
if (out_grouping(z, g_vowel, 97, 117, 0)) return 0;
if (!(eq_s(z, 2, s_0))) return 0;
((SN_local *)z)->i_measure -= 1;
return 1;
}
@ -194,77 +165,127 @@ static int r_remove_first_order_prefix(struct SN_env * z) {
int among_var;
z->bra = z->c;
if (z->c + 1 >= z->l || (z->p[z->c + 1] != 105 && z->p[z->c + 1] != 101)) return 0;
among_var = find_among(z, a_3, 12);
among_var = find_among(z, a_3, 10, 0);
if (!among_var) return 0;
z->ket = z->c;
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[0] = 1;
z->I[1] -= 1;
((SN_local *)z)->i_prefix = 1;
((SN_local *)z)->i_measure -= 1;
break;
case 2:
{ int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[0] = 3;
z->I[1] -= 1;
do {
int v_1 = z->c;
if (z->c == z->l || z->p[z->c] != 'y') goto lab0;
z->c++;
{
int v_2 = z->c;
if (in_grouping(z, g_vowel, 97, 117, 0)) goto lab0;
z->c = v_2;
}
z->ket = z->c;
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
((SN_local *)z)->i_prefix = 1;
((SN_local *)z)->i_measure -= 1;
break;
lab0:
z->c = v_1;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
((SN_local *)z)->i_prefix = 1;
((SN_local *)z)->i_measure -= 1;
} while (0);
break;
case 3:
z->I[0] = 1;
{ int ret = slice_from_s(z, 1, s_1);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[1] -= 1;
((SN_local *)z)->i_prefix = 3;
((SN_local *)z)->i_measure -= 1;
break;
case 4:
z->I[0] = 3;
{ int ret = slice_from_s(z, 1, s_2);
if (ret < 0) return ret;
}
z->I[1] -= 1;
do {
int v_3 = z->c;
if (z->c == z->l || z->p[z->c] != 'y') goto lab1;
z->c++;
{
int v_4 = z->c;
if (in_grouping(z, g_vowel, 97, 117, 0)) goto lab1;
z->c = v_4;
}
z->ket = z->c;
{
int ret = slice_from_s(z, 1, s_1);
if (ret < 0) return ret;
}
((SN_local *)z)->i_prefix = 3;
((SN_local *)z)->i_measure -= 1;
break;
lab1:
z->c = v_3;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
((SN_local *)z)->i_prefix = 3;
((SN_local *)z)->i_measure -= 1;
} while (0);
break;
case 5:
z->I[0] = 1;
z->I[1] -= 1;
{ int c1 = z->c;
{ int c2 = z->c;
if (in_grouping(z, g_vowel, 97, 117, 0)) goto lab1;
z->c = c2;
{ int ret = slice_from_s(z, 1, s_3);
((SN_local *)z)->i_prefix = 1;
((SN_local *)z)->i_measure -= 1;
do {
int v_5 = z->c;
{
int v_6 = z->c;
if (in_grouping(z, g_vowel, 97, 117, 0)) goto lab2;
z->c = v_6;
{
int ret = slice_from_s(z, 1, s_2);
if (ret < 0) return ret;
}
}
goto lab0;
lab1:
z->c = c1;
{ int ret = slice_del(z);
break;
lab2:
z->c = v_5;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
}
lab0:
} while (0);
break;
case 6:
z->I[0] = 3;
z->I[1] -= 1;
{ int c3 = z->c;
{ int c4 = z->c;
((SN_local *)z)->i_prefix = 3;
((SN_local *)z)->i_measure -= 1;
do {
int v_7 = z->c;
{
int v_8 = z->c;
if (in_grouping(z, g_vowel, 97, 117, 0)) goto lab3;
z->c = c4;
{ int ret = slice_from_s(z, 1, s_4);
z->c = v_8;
{
int ret = slice_from_s(z, 1, s_3);
if (ret < 0) return ret;
}
}
goto lab2;
break;
lab3:
z->c = c3;
{ int ret = slice_del(z);
z->c = v_7;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
}
lab2:
} while (0);
break;
}
return 1;
@ -274,134 +295,174 @@ static int r_remove_second_order_prefix(struct SN_env * z) {
int among_var;
z->bra = z->c;
if (z->c + 1 >= z->l || z->p[z->c + 1] != 101) return 0;
among_var = find_among(z, a_4, 6);
among_var = find_among(z, a_4, 2, 0);
if (!among_var) return 0;
z->ket = z->c;
switch (among_var) {
case 1:
{ int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[0] = 2;
z->I[1] -= 1;
do {
int v_1 = z->c;
if (z->c == z->l || z->p[z->c] != 'r') goto lab0;
z->c++;
z->ket = z->c;
((SN_local *)z)->i_prefix = 2;
break;
lab0:
z->c = v_1;
if (z->c == z->l || z->p[z->c] != 'l') goto lab1;
z->c++;
z->ket = z->c;
if (!(eq_s(z, 4, s_4))) goto lab1;
break;
lab1:
z->c = v_1;
z->ket = z->c;
((SN_local *)z)->i_prefix = 2;
} while (0);
break;
case 2:
{ int ret = slice_from_s(z, 4, s_5);
if (ret < 0) return ret;
}
z->I[1] -= 1;
break;
case 3:
{ int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[0] = 4;
z->I[1] -= 1;
break;
case 4:
{ int ret = slice_from_s(z, 4, s_6);
if (ret < 0) return ret;
}
z->I[0] = 4;
z->I[1] -= 1;
do {
int v_2 = z->c;
if (z->c == z->l || z->p[z->c] != 'r') goto lab2;
z->c++;
z->ket = z->c;
break;
lab2:
z->c = v_2;
if (z->c == z->l || z->p[z->c] != 'l') goto lab3;
z->c++;
z->ket = z->c;
if (!(eq_s(z, 4, s_5))) goto lab3;
break;
lab3:
z->c = v_2;
z->ket = z->c;
if (out_grouping(z, g_vowel, 97, 117, 0)) return 0;
if (!(eq_s(z, 2, s_6))) return 0;
} while (0);
((SN_local *)z)->i_prefix = 4;
break;
}
((SN_local *)z)->i_measure -= 1;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
extern int indonesian_ISO_8859_1_stem(struct SN_env * z) {
z->I[1] = 0;
{ int c1 = z->c;
while(1) {
int c2 = z->c;
((SN_local *)z)->i_measure = 0;
{
int v_1 = z->c;
while (1) {
int v_2 = z->c;
{
int ret = out_grouping(z, g_vowel, 97, 117, 1);
if (ret < 0) goto lab1;
z->c += ret;
}
z->I[1] += 1;
((SN_local *)z)->i_measure += 1;
continue;
lab1:
z->c = c2;
z->c = v_2;
break;
}
z->c = c1;
z->c = v_1;
}
if (z->I[1] <= 2) return 0;
z->I[0] = 0;
if (((SN_local *)z)->i_measure <= 2) return 0;
((SN_local *)z)->i_prefix = 0;
z->lb = z->c; z->c = z->l;
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_remove_particle(z);
{
int v_3 = z->l - z->c;
{
int ret = r_remove_particle(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
if (z->I[1] <= 2) return 0;
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_remove_possessive_pronoun(z);
if (((SN_local *)z)->i_measure <= 2) return 0;
{
int v_4 = z->l - z->c;
{
int ret = r_remove_possessive_pronoun(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
z->c = z->lb;
if (z->I[1] <= 2) return 0;
{ int c5 = z->c;
{ int c_test6 = z->c;
{ int ret = r_remove_first_order_prefix(z);
if (ret == 0) goto lab3;
if (((SN_local *)z)->i_measure <= 2) return 0;
do {
int v_5 = z->c;
{
int v_6 = z->c;
{
int ret = r_remove_first_order_prefix(z);
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
{ int c7 = z->c;
{ int c_test8 = z->c;
if (z->I[1] <= 2) goto lab4;
{
int v_7 = z->c;
{
int v_8 = z->c;
if (((SN_local *)z)->i_measure <= 2) goto lab3;
z->lb = z->c; z->c = z->l;
{ int ret = r_remove_suffix(z);
if (ret == 0) goto lab4;
{
int ret = r_remove_suffix(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
z->c = z->lb;
z->c = c_test8;
z->c = v_8;
}
if (z->I[1] <= 2) goto lab4;
{ int ret = r_remove_second_order_prefix(z);
if (ret == 0) goto lab4;
if (((SN_local *)z)->i_measure <= 2) goto lab3;
{
int ret = r_remove_second_order_prefix(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab4:
z->c = c7;
lab3:
z->c = v_7;
}
z->c = c_test6;
z->c = v_6;
}
goto lab2;
lab3:
z->c = c5;
{ int c9 = z->c;
{ int ret = r_remove_second_order_prefix(z);
break;
lab2:
z->c = v_5;
{
int v_9 = z->c;
{
int ret = r_remove_second_order_prefix(z);
if (ret < 0) return ret;
}
z->c = c9;
z->c = v_9;
}
{ int c10 = z->c;
if (z->I[1] <= 2) goto lab5;
{
int v_10 = z->c;
if (((SN_local *)z)->i_measure <= 2) goto lab4;
z->lb = z->c; z->c = z->l;
{ int ret = r_remove_suffix(z);
if (ret == 0) goto lab5;
{
int ret = r_remove_suffix(z);
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
z->c = z->lb;
lab5:
z->c = c10;
lab4:
z->c = v_10;
}
}
lab2:
} while (0);
return 1;
}
extern struct SN_env * indonesian_ISO_8859_1_create_env(void) { return SN_create_env(0, 2); }
extern struct SN_env * indonesian_ISO_8859_1_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_prefix = 0;
((SN_local *)z)->i_measure = 0;
}
return z;
}
extern void indonesian_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void indonesian_ISO_8859_1_close_env(struct SN_env * z) {
SN_delete_env(z);
}

View file

@ -1,6 +1,19 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from irish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_ISO_8859_1_irish.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p2;
int i_p1;
int i_pV;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,6 +22,7 @@ extern int irish_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_verb_sfx(struct SN_env * z);
static int r_deriv(struct SN_env * z);
static int r_noun_sfx(struct SN_env * z);
@ -17,18 +31,22 @@ static int r_initial_morph(struct SN_env * z);
static int r_RV(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_R1(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static const symbol s_0[] = { 'f' };
static const symbol s_1[] = { 's' };
static const symbol s_2[] = { 'b' };
static const symbol s_3[] = { 'c' };
static const symbol s_4[] = { 'd' };
static const symbol s_5[] = { 'g' };
static const symbol s_6[] = { 'p' };
static const symbol s_7[] = { 't' };
static const symbol s_8[] = { 'm' };
static const symbol s_9[] = { 'a', 'r', 'c' };
static const symbol s_10[] = { 'g', 'i', 'n' };
static const symbol s_11[] = { 'g', 'r', 'a', 'f' };
static const symbol s_12[] = { 'p', 'a', 'i', 't', 'e' };
static const symbol s_13[] = { 0xF3, 'i', 'd' };
extern struct SN_env * irish_ISO_8859_1_create_env(void);
extern void irish_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[2] = { 'b', '\'' };
static const symbol s_0_1[2] = { 'b', 'h' };
static const symbol s_0_2[3] = { 'b', 'h', 'f' };
@ -53,33 +71,31 @@ static const symbol s_0_20[2] = { 's', 'h' };
static const symbol s_0_21[2] = { 't', '-' };
static const symbol s_0_22[2] = { 't', 'h' };
static const symbol s_0_23[2] = { 't', 's' };
static const struct among a_0[24] =
{
{ 2, s_0_0, -1, 1, 0},
{ 2, s_0_1, -1, 4, 0},
{ 3, s_0_2, 1, 2, 0},
{ 2, s_0_3, -1, 8, 0},
{ 2, s_0_4, -1, 5, 0},
{ 2, s_0_5, -1, 1, 0},
{ 4, s_0_6, 5, 2, 0},
{ 2, s_0_7, -1, 6, 0},
{ 2, s_0_8, -1, 9, 0},
{ 2, s_0_9, -1, 2, 0},
{ 2, s_0_10, -1, 5, 0},
{ 2, s_0_11, -1, 7, 0},
{ 2, s_0_12, -1, 1, 0},
{ 2, s_0_13, -1, 1, 0},
{ 2, s_0_14, -1, 4, 0},
{ 2, s_0_15, -1, 10, 0},
{ 2, s_0_16, -1, 1, 0},
{ 2, s_0_17, -1, 6, 0},
{ 2, s_0_18, -1, 7, 0},
{ 2, s_0_19, -1, 8, 0},
{ 2, s_0_20, -1, 3, 0},
{ 2, s_0_21, -1, 1, 0},
{ 2, s_0_22, -1, 9, 0},
{ 2, s_0_23, -1, 3, 0}
static const struct among a_0[24] = {
{ 2, s_0_0, 0, 1, 0},
{ 2, s_0_1, 0, 4, 0},
{ 3, s_0_2, -1, 2, 0},
{ 2, s_0_3, 0, 8, 0},
{ 2, s_0_4, 0, 5, 0},
{ 2, s_0_5, 0, 1, 0},
{ 4, s_0_6, -1, 2, 0},
{ 2, s_0_7, 0, 6, 0},
{ 2, s_0_8, 0, 9, 0},
{ 2, s_0_9, 0, 2, 0},
{ 2, s_0_10, 0, 5, 0},
{ 2, s_0_11, 0, 7, 0},
{ 2, s_0_12, 0, 1, 0},
{ 2, s_0_13, 0, 1, 0},
{ 2, s_0_14, 0, 4, 0},
{ 2, s_0_15, 0, 10, 0},
{ 2, s_0_16, 0, 1, 0},
{ 2, s_0_17, 0, 6, 0},
{ 2, s_0_18, 0, 7, 0},
{ 2, s_0_19, 0, 8, 0},
{ 2, s_0_20, 0, 3, 0},
{ 2, s_0_21, 0, 1, 0},
{ 2, s_0_22, 0, 9, 0},
{ 2, s_0_23, 0, 3, 0}
};
static const symbol s_1_0[6] = { 0xED, 'o', 'c', 'h', 't', 'a' };
@ -98,25 +114,23 @@ static const symbol s_1_12[5] = { 0xED, 'o', 'c', 'h', 't' };
static const symbol s_1_13[6] = { 'a', 0xED, 'o', 'c', 'h', 't' };
static const symbol s_1_14[3] = { 'i', 'r', 0xED };
static const symbol s_1_15[4] = { 'a', 'i', 'r', 0xED };
static const struct among a_1[16] =
{
{ 6, s_1_0, -1, 1, 0},
{ 7, s_1_1, 0, 1, 0},
{ 3, s_1_2, -1, 2, 0},
{ 4, s_1_3, 2, 2, 0},
{ 3, s_1_4, -1, 1, 0},
{ 4, s_1_5, 4, 1, 0},
{ 3, s_1_6, -1, 1, 0},
{ 4, s_1_7, 6, 1, 0},
{ 3, s_1_8, -1, 1, 0},
{ 4, s_1_9, 8, 1, 0},
{ 3, s_1_10, -1, 1, 0},
{ 4, s_1_11, 10, 1, 0},
{ 5, s_1_12, -1, 1, 0},
{ 6, s_1_13, 12, 1, 0},
{ 3, s_1_14, -1, 2, 0},
{ 4, s_1_15, 14, 2, 0}
static const struct among a_1[16] = {
{ 6, s_1_0, 0, 1, 0},
{ 7, s_1_1, -1, 1, 0},
{ 3, s_1_2, 0, 2, 0},
{ 4, s_1_3, -1, 2, 0},
{ 3, s_1_4, 0, 1, 0},
{ 4, s_1_5, -1, 1, 0},
{ 3, s_1_6, 0, 1, 0},
{ 4, s_1_7, -1, 1, 0},
{ 3, s_1_8, 0, 1, 0},
{ 4, s_1_9, -1, 1, 0},
{ 3, s_1_10, 0, 1, 0},
{ 4, s_1_11, -1, 1, 0},
{ 5, s_1_12, 0, 1, 0},
{ 6, s_1_13, -1, 1, 0},
{ 3, s_1_14, 0, 2, 0},
{ 4, s_1_15, -1, 2, 0}
};
static const symbol s_2_0[8] = { 0xF3, 'i', 'd', 'e', 'a', 'c', 'h', 'a' };
@ -144,34 +158,32 @@ static const symbol s_2_21[5] = { 'e', 'a', 'c', 'h', 't' };
static const symbol s_2_22[10] = { 'g', 'r', 'a', 'f', 'a', 0xED, 'o', 'c', 'h', 't' };
static const symbol s_2_23[9] = { 'a', 'r', 'c', 'a', 'c', 'h', 't', 'a', 0xED };
static const symbol s_2_24[12] = { 'g', 'r', 'a', 'f', 'a', 0xED, 'o', 'c', 'h', 't', 'a', 0xED };
static const struct among a_2[25] =
{
{ 8, s_2_0, -1, 6, 0},
{ 7, s_2_1, -1, 5, 0},
{ 5, s_2_2, -1, 1, 0},
{ 8, s_2_3, 2, 2, 0},
{ 6, s_2_4, 2, 1, 0},
{ 11, s_2_5, -1, 4, 0},
{ 5, s_2_6, -1, 5, 0},
{ 3, s_2_7, -1, 1, 0},
{ 4, s_2_8, 7, 1, 0},
{ 7, s_2_9, 8, 6, 0},
{ 7, s_2_10, 8, 3, 0},
{ 6, s_2_11, 7, 5, 0},
{ 9, s_2_12, -1, 4, 0},
{ 7, s_2_13, -1, 5, 0},
{ 6, s_2_14, -1, 6, 0},
{ 7, s_2_15, -1, 1, 0},
{ 8, s_2_16, 15, 1, 0},
{ 6, s_2_17, -1, 3, 0},
{ 5, s_2_18, -1, 3, 0},
{ 4, s_2_19, -1, 1, 0},
{ 7, s_2_20, 19, 2, 0},
{ 5, s_2_21, 19, 1, 0},
{ 10, s_2_22, -1, 4, 0},
{ 9, s_2_23, -1, 2, 0},
{ 12, s_2_24, -1, 4, 0}
static const struct among a_2[25] = {
{ 8, s_2_0, 0, 6, 0},
{ 7, s_2_1, 0, 5, 0},
{ 5, s_2_2, 0, 1, 0},
{ 8, s_2_3, -1, 2, 0},
{ 6, s_2_4, -2, 1, 0},
{ 11, s_2_5, 0, 4, 0},
{ 5, s_2_6, 0, 5, 0},
{ 3, s_2_7, 0, 1, 0},
{ 4, s_2_8, -1, 1, 0},
{ 7, s_2_9, -1, 6, 0},
{ 7, s_2_10, -2, 3, 0},
{ 6, s_2_11, -4, 5, 0},
{ 9, s_2_12, 0, 4, 0},
{ 7, s_2_13, 0, 5, 0},
{ 6, s_2_14, 0, 6, 0},
{ 7, s_2_15, 0, 1, 0},
{ 8, s_2_16, -1, 1, 0},
{ 6, s_2_17, 0, 3, 0},
{ 5, s_2_18, 0, 3, 0},
{ 4, s_2_19, 0, 1, 0},
{ 7, s_2_20, -1, 2, 0},
{ 5, s_2_21, -2, 1, 0},
{ 10, s_2_22, 0, 4, 0},
{ 9, s_2_23, 0, 2, 0},
{ 12, s_2_24, 0, 4, 0}
};
static const symbol s_3_0[4] = { 'i', 'm', 'i', 'd' };
@ -186,74 +198,54 @@ static const symbol s_3_8[3] = { 0xE1, 'i', 'l' };
static const symbol s_3_9[3] = { 'a', 'i', 'n' };
static const symbol s_3_10[4] = { 't', 'e', 'a', 'r' };
static const symbol s_3_11[3] = { 't', 'a', 'r' };
static const struct among a_3[12] =
{
{ 4, s_3_0, -1, 1, 0},
{ 5, s_3_1, 0, 1, 0},
{ 4, s_3_2, -1, 1, 0},
{ 5, s_3_3, 2, 1, 0},
{ 3, s_3_4, -1, 2, 0},
{ 4, s_3_5, 4, 2, 0},
{ 5, s_3_6, -1, 1, 0},
{ 4, s_3_7, -1, 1, 0},
{ 3, s_3_8, -1, 2, 0},
{ 3, s_3_9, -1, 2, 0},
{ 4, s_3_10, -1, 2, 0},
{ 3, s_3_11, -1, 2, 0}
static const struct among a_3[12] = {
{ 4, s_3_0, 0, 1, 0},
{ 5, s_3_1, -1, 1, 0},
{ 4, s_3_2, 0, 1, 0},
{ 5, s_3_3, -1, 1, 0},
{ 3, s_3_4, 0, 2, 0},
{ 4, s_3_5, -1, 2, 0},
{ 5, s_3_6, 0, 1, 0},
{ 4, s_3_7, 0, 1, 0},
{ 3, s_3_8, 0, 2, 0},
{ 3, s_3_9, 0, 2, 0},
{ 4, s_3_10, 0, 2, 0},
{ 3, s_3_11, 0, 2, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 2 };
static const symbol s_0[] = { 'f' };
static const symbol s_1[] = { 's' };
static const symbol s_2[] = { 'b' };
static const symbol s_3[] = { 'c' };
static const symbol s_4[] = { 'd' };
static const symbol s_5[] = { 'g' };
static const symbol s_6[] = { 'p' };
static const symbol s_7[] = { 't' };
static const symbol s_8[] = { 'm' };
static const symbol s_9[] = { 'a', 'r', 'c' };
static const symbol s_10[] = { 'g', 'i', 'n' };
static const symbol s_11[] = { 'g', 'r', 'a', 'f' };
static const symbol s_12[] = { 'p', 'a', 'i', 't', 'e' };
static const symbol s_13[] = { 0xF3, 'i', 'd' };
static int r_mark_regions(struct SN_env * z) {
z->I[2] = z->l;
z->I[1] = z->l;
z->I[0] = z->l;
{ int c1 = z->c;
((SN_local *)z)->i_pV = z->l;
((SN_local *)z)->i_p1 = z->l;
((SN_local *)z)->i_p2 = z->l;
{
int v_1 = z->c;
{
int ret = out_grouping(z, g_v, 97, 250, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[2] = z->c;
((SN_local *)z)->i_pV = z->c;
{
int ret = in_grouping(z, g_v, 97, 250, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[1] = z->c;
((SN_local *)z)->i_p1 = z->c;
{
int ret = out_grouping(z, g_v, 97, 250, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{
int ret = in_grouping(z, g_v, 97, 250, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[0] = z->c;
((SN_local *)z)->i_p2 = z->c;
lab0:
z->c = c1;
z->c = v_1;
}
return 1;
}
@ -261,57 +253,67 @@ static int r_mark_regions(struct SN_env * z) {
static int r_initial_morph(struct SN_env * z) {
int among_var;
z->bra = z->c;
among_var = find_among(z, a_0, 24);
among_var = find_among(z, a_0, 24, 0);
if (!among_var) return 0;
z->ket = z->c;
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_0);
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 1, s_1);
{
int ret = slice_from_s(z, 1, s_1);
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 1, s_2);
{
int ret = slice_from_s(z, 1, s_2);
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 1, s_3);
{
int ret = slice_from_s(z, 1, s_3);
if (ret < 0) return ret;
}
break;
case 6:
{ int ret = slice_from_s(z, 1, s_4);
{
int ret = slice_from_s(z, 1, s_4);
if (ret < 0) return ret;
}
break;
case 7:
{ int ret = slice_from_s(z, 1, s_5);
{
int ret = slice_from_s(z, 1, s_5);
if (ret < 0) return ret;
}
break;
case 8:
{ int ret = slice_from_s(z, 1, s_6);
{
int ret = slice_from_s(z, 1, s_6);
if (ret < 0) return ret;
}
break;
case 9:
{ int ret = slice_from_s(z, 1, s_7);
{
int ret = slice_from_s(z, 1, s_7);
if (ret < 0) return ret;
}
break;
case 10:
{ int ret = slice_from_s(z, 1, s_8);
{
int ret = slice_from_s(z, 1, s_8);
if (ret < 0) return ret;
}
break;
@ -320,37 +322,41 @@ static int r_initial_morph(struct SN_env * z) {
}
static int r_RV(struct SN_env * z) {
return z->I[2] <= z->c;
return ((SN_local *)z)->i_pV <= z->c;
}
static int r_R1(struct SN_env * z) {
return z->I[1] <= z->c;
return ((SN_local *)z)->i_p1 <= z->c;
}
static int r_R2(struct SN_env * z) {
return z->I[0] <= z->c;
return ((SN_local *)z)->i_p2 <= z->c;
}
static int r_noun_sfx(struct SN_env * z) {
int among_var;
z->ket = z->c;
among_var = find_among_b(z, a_1, 16);
among_var = find_among_b(z, a_1, 16, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int ret = r_R1(z);
{
int ret = r_R1(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = r_R2(z);
{
int ret = r_R2(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -361,40 +367,47 @@ static int r_noun_sfx(struct SN_env * z) {
static int r_deriv(struct SN_env * z) {
int among_var;
z->ket = z->c;
among_var = find_among_b(z, a_2, 25);
among_var = find_among_b(z, a_2, 25, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int ret = r_R2(z);
{
int ret = r_R2(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 3, s_9);
{
int ret = slice_from_s(z, 3, s_9);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 3, s_10);
{
int ret = slice_from_s(z, 3, s_10);
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 4, s_11);
{
int ret = slice_from_s(z, 4, s_11);
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 5, s_12);
{
int ret = slice_from_s(z, 5, s_12);
if (ret < 0) return ret;
}
break;
case 6:
{ int ret = slice_from_s(z, 3, s_13);
{
int ret = slice_from_s(z, 3, s_13);
if (ret < 0) return ret;
}
break;
@ -406,23 +419,27 @@ static int r_verb_sfx(struct SN_env * z) {
int among_var;
z->ket = z->c;
if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((282896 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_3, 12);
among_var = find_among_b(z, a_3, 12, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int ret = r_RV(z);
{
int ret = r_RV(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = r_R1(z);
{
int ret = r_R1(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -431,41 +448,58 @@ static int r_verb_sfx(struct SN_env * z) {
}
extern int irish_ISO_8859_1_stem(struct SN_env * z) {
{ int c1 = z->c;
{ int ret = r_initial_morph(z);
{
int v_1 = z->c;
{
int ret = r_initial_morph(z);
if (ret < 0) return ret;
}
z->c = c1;
z->c = v_1;
}
{ int ret = r_mark_regions(z);
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->lb = z->c; z->c = z->l;
{ int m2 = z->l - z->c; (void)m2;
{ int ret = r_noun_sfx(z);
{
int v_2 = z->l - z->c;
{
int ret = r_noun_sfx(z);
if (ret < 0) return ret;
}
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_deriv(z);
{
int v_3 = z->l - z->c;
{
int ret = r_deriv(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_verb_sfx(z);
{
int v_4 = z->l - z->c;
{
int ret = r_verb_sfx(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * irish_ISO_8859_1_create_env(void) { return SN_create_env(0, 3); }
extern struct SN_env * irish_ISO_8859_1_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p2 = 0;
((SN_local *)z)->i_p1 = 0;
((SN_local *)z)->i_pV = 0;
}
return z;
}
extern void irish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void irish_ISO_8859_1_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,17 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from norwegian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_ISO_8859_1_norwegian.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p1;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,187 +20,234 @@ extern int norwegian_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_other_suffix(struct SN_env * z);
static int r_consonant_pair(struct SN_env * z);
static int r_main_suffix(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * norwegian_ISO_8859_1_create_env(void);
extern void norwegian_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[1] = { 'a' };
static const symbol s_0_1[1] = { 'e' };
static const symbol s_0_2[3] = { 'e', 'd', 'e' };
static const symbol s_0_3[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_0_4[4] = { 'e', 'n', 'd', 'e' };
static const symbol s_0_5[3] = { 'a', 'n', 'e' };
static const symbol s_0_6[3] = { 'e', 'n', 'e' };
static const symbol s_0_7[6] = { 'h', 'e', 't', 'e', 'n', 'e' };
static const symbol s_0_8[4] = { 'e', 'r', 't', 'e' };
static const symbol s_0_9[2] = { 'e', 'n' };
static const symbol s_0_10[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_0_11[2] = { 'a', 'r' };
static const symbol s_0_12[2] = { 'e', 'r' };
static const symbol s_0_13[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_0_14[1] = { 's' };
static const symbol s_0_15[2] = { 'a', 's' };
static const symbol s_0_16[2] = { 'e', 's' };
static const symbol s_0_17[4] = { 'e', 'd', 'e', 's' };
static const symbol s_0_18[5] = { 'e', 'n', 'd', 'e', 's' };
static const symbol s_0_19[4] = { 'e', 'n', 'e', 's' };
static const symbol s_0_20[7] = { 'h', 'e', 't', 'e', 'n', 'e', 's' };
static const symbol s_0_21[3] = { 'e', 'n', 's' };
static const symbol s_0_22[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_0_23[3] = { 'e', 'r', 's' };
static const symbol s_0_24[3] = { 'e', 't', 's' };
static const symbol s_0_25[2] = { 'e', 't' };
static const symbol s_0_26[3] = { 'h', 'e', 't' };
static const symbol s_0_27[3] = { 'e', 'r', 't' };
static const symbol s_0_28[3] = { 'a', 's', 't' };
static const struct among a_0[29] =
{
{ 1, s_0_0, -1, 1, 0},
{ 1, s_0_1, -1, 1, 0},
{ 3, s_0_2, 1, 1, 0},
{ 4, s_0_3, 1, 1, 0},
{ 4, s_0_4, 1, 1, 0},
{ 3, s_0_5, 1, 1, 0},
{ 3, s_0_6, 1, 1, 0},
{ 6, s_0_7, 6, 1, 0},
{ 4, s_0_8, 1, 3, 0},
{ 2, s_0_9, -1, 1, 0},
{ 5, s_0_10, 9, 1, 0},
{ 2, s_0_11, -1, 1, 0},
{ 2, s_0_12, -1, 1, 0},
{ 5, s_0_13, 12, 1, 0},
{ 1, s_0_14, -1, 2, 0},
{ 2, s_0_15, 14, 1, 0},
{ 2, s_0_16, 14, 1, 0},
{ 4, s_0_17, 16, 1, 0},
{ 5, s_0_18, 16, 1, 0},
{ 4, s_0_19, 16, 1, 0},
{ 7, s_0_20, 19, 1, 0},
{ 3, s_0_21, 14, 1, 0},
{ 6, s_0_22, 21, 1, 0},
{ 3, s_0_23, 14, 1, 0},
{ 3, s_0_24, 14, 1, 0},
{ 2, s_0_25, -1, 1, 0},
{ 3, s_0_26, 25, 1, 0},
{ 3, s_0_27, -1, 3, 0},
{ 3, s_0_28, -1, 1, 0}
};
static const symbol s_1_0[2] = { 'd', 't' };
static const symbol s_1_1[2] = { 'v', 't' };
static const struct among a_1[2] =
{
{ 2, s_1_0, -1, -1, 0},
{ 2, s_1_1, -1, -1, 0}
};
static const symbol s_2_0[3] = { 'l', 'e', 'g' };
static const symbol s_2_1[4] = { 'e', 'l', 'e', 'g' };
static const symbol s_2_2[2] = { 'i', 'g' };
static const symbol s_2_3[3] = { 'e', 'i', 'g' };
static const symbol s_2_4[3] = { 'l', 'i', 'g' };
static const symbol s_2_5[4] = { 'e', 'l', 'i', 'g' };
static const symbol s_2_6[3] = { 'e', 'l', 's' };
static const symbol s_2_7[3] = { 'l', 'o', 'v' };
static const symbol s_2_8[4] = { 'e', 'l', 'o', 'v' };
static const symbol s_2_9[4] = { 's', 'l', 'o', 'v' };
static const symbol s_2_10[7] = { 'h', 'e', 't', 's', 'l', 'o', 'v' };
static const struct among a_2[11] =
{
{ 3, s_2_0, -1, 1, 0},
{ 4, s_2_1, 0, 1, 0},
{ 2, s_2_2, -1, 1, 0},
{ 3, s_2_3, 2, 1, 0},
{ 3, s_2_4, 2, 1, 0},
{ 4, s_2_5, 4, 1, 0},
{ 3, s_2_6, -1, 1, 0},
{ 3, s_2_7, -1, 1, 0},
{ 4, s_2_8, 7, 1, 0},
{ 4, s_2_9, 7, 1, 0},
{ 7, s_2_10, 9, 1, 0}
};
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 };
static const unsigned char g_s_ending[] = { 119, 125, 149, 1 };
static const symbol s_0[] = { 'e', 'r' };
static const symbol s_0_1[3] = { 'i', 'n', 'd' };
static const symbol s_0_2[2] = { 'k', 'k' };
static const symbol s_0_3[2] = { 'n', 'k' };
static const symbol s_0_4[3] = { 'a', 'm', 'm' };
static const symbol s_0_5[3] = { 'o', 'm', 'm' };
static const symbol s_0_6[3] = { 'k', 'a', 'p' };
static const symbol s_0_7[4] = { 's', 'k', 'a', 'p' };
static const symbol s_0_8[2] = { 'p', 'p' };
static const symbol s_0_9[2] = { 'l', 't' };
static const symbol s_0_10[3] = { 'a', 's', 't' };
static const symbol s_0_11[3] = { 0xF8, 's', 't' };
static const symbol s_0_12[1] = { 'v' };
static const symbol s_0_13[3] = { 'h', 'a', 'v' };
static const symbol s_0_14[3] = { 'g', 'i', 'v' };
static const struct among a_0[15] = {
{ 0, 0, 0, 1, 0},
{ 3, s_0_1, -1, -1, 0},
{ 2, s_0_2, -2, -1, 0},
{ 2, s_0_3, -3, -1, 0},
{ 3, s_0_4, -4, -1, 0},
{ 3, s_0_5, -5, -1, 0},
{ 3, s_0_6, -6, -1, 0},
{ 4, s_0_7, -1, 1, 0},
{ 2, s_0_8, -8, -1, 0},
{ 2, s_0_9, -9, -1, 0},
{ 3, s_0_10, -10, -1, 0},
{ 3, s_0_11, -11, -1, 0},
{ 1, s_0_12, -12, -1, 0},
{ 3, s_0_13, -1, 1, 0},
{ 3, s_0_14, -2, 1, 0}
};
static const symbol s_1_0[1] = { 'a' };
static const symbol s_1_1[1] = { 'e' };
static const symbol s_1_2[3] = { 'e', 'd', 'e' };
static const symbol s_1_3[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_1_4[4] = { 'e', 'n', 'd', 'e' };
static const symbol s_1_5[3] = { 'a', 'n', 'e' };
static const symbol s_1_6[3] = { 'e', 'n', 'e' };
static const symbol s_1_7[6] = { 'h', 'e', 't', 'e', 'n', 'e' };
static const symbol s_1_8[4] = { 'e', 'r', 't', 'e' };
static const symbol s_1_9[2] = { 'e', 'n' };
static const symbol s_1_10[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_1_11[2] = { 'a', 'r' };
static const symbol s_1_12[2] = { 'e', 'r' };
static const symbol s_1_13[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_1_14[1] = { 's' };
static const symbol s_1_15[2] = { 'a', 's' };
static const symbol s_1_16[2] = { 'e', 's' };
static const symbol s_1_17[4] = { 'e', 'd', 'e', 's' };
static const symbol s_1_18[5] = { 'e', 'n', 'd', 'e', 's' };
static const symbol s_1_19[4] = { 'e', 'n', 'e', 's' };
static const symbol s_1_20[7] = { 'h', 'e', 't', 'e', 'n', 'e', 's' };
static const symbol s_1_21[3] = { 'e', 'n', 's' };
static const symbol s_1_22[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_1_23[3] = { 'e', 'r', 's' };
static const symbol s_1_24[3] = { 'e', 't', 's' };
static const symbol s_1_25[2] = { 'e', 't' };
static const symbol s_1_26[3] = { 'h', 'e', 't' };
static const symbol s_1_27[3] = { 'e', 'r', 't' };
static const symbol s_1_28[3] = { 'a', 's', 't' };
static const struct among a_1[29] = {
{ 1, s_1_0, 0, 1, 0},
{ 1, s_1_1, 0, 1, 0},
{ 3, s_1_2, -1, 1, 0},
{ 4, s_1_3, -2, 1, 0},
{ 4, s_1_4, -3, 1, 0},
{ 3, s_1_5, -4, 1, 0},
{ 3, s_1_6, -5, 1, 0},
{ 6, s_1_7, -1, 1, 0},
{ 4, s_1_8, -7, 4, 0},
{ 2, s_1_9, 0, 1, 0},
{ 5, s_1_10, -1, 1, 0},
{ 2, s_1_11, 0, 1, 0},
{ 2, s_1_12, 0, 1, 0},
{ 5, s_1_13, -1, 1, 0},
{ 1, s_1_14, 0, 3, 0},
{ 2, s_1_15, -1, 1, 0},
{ 2, s_1_16, -2, 1, 0},
{ 4, s_1_17, -1, 1, 0},
{ 5, s_1_18, -2, 1, 0},
{ 4, s_1_19, -3, 1, 0},
{ 7, s_1_20, -1, 1, 0},
{ 3, s_1_21, -7, 1, 0},
{ 6, s_1_22, -1, 1, 0},
{ 3, s_1_23, -9, 2, 0},
{ 3, s_1_24, -10, 1, 0},
{ 2, s_1_25, 0, 1, 0},
{ 3, s_1_26, -1, 1, 0},
{ 3, s_1_27, 0, 4, 0},
{ 3, s_1_28, 0, 1, 0}
};
static const symbol s_2_0[2] = { 'd', 't' };
static const symbol s_2_1[2] = { 'v', 't' };
static const struct among a_2[2] = {
{ 2, s_2_0, 0, -1, 0},
{ 2, s_2_1, 0, -1, 0}
};
static const symbol s_3_0[3] = { 'l', 'e', 'g' };
static const symbol s_3_1[4] = { 'e', 'l', 'e', 'g' };
static const symbol s_3_2[2] = { 'i', 'g' };
static const symbol s_3_3[3] = { 'e', 'i', 'g' };
static const symbol s_3_4[3] = { 'l', 'i', 'g' };
static const symbol s_3_5[4] = { 'e', 'l', 'i', 'g' };
static const symbol s_3_6[3] = { 'e', 'l', 's' };
static const symbol s_3_7[3] = { 'l', 'o', 'v' };
static const symbol s_3_8[4] = { 'e', 'l', 'o', 'v' };
static const symbol s_3_9[4] = { 's', 'l', 'o', 'v' };
static const symbol s_3_10[7] = { 'h', 'e', 't', 's', 'l', 'o', 'v' };
static const struct among a_3[11] = {
{ 3, s_3_0, 0, 1, 0},
{ 4, s_3_1, -1, 1, 0},
{ 2, s_3_2, 0, 1, 0},
{ 3, s_3_3, -1, 1, 0},
{ 3, s_3_4, -2, 1, 0},
{ 4, s_3_5, -1, 1, 0},
{ 3, s_3_6, 0, 1, 0},
{ 3, s_3_7, 0, 1, 0},
{ 4, s_3_8, -1, 1, 0},
{ 4, s_3_9, -2, 1, 0},
{ 7, s_3_10, -1, 1, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 2, 142 };
static const unsigned char g_s_ending[] = { 119, 125, 148, 1 };
static int r_mark_regions(struct SN_env * z) {
z->I[1] = z->l;
{ int c_test1 = z->c;
z->c = z->c + 3;
if (z->c > z->l) return 0;
z->I[0] = z->c;
z->c = c_test1;
int i_x;
((SN_local *)z)->i_p1 = z->l;
{
int v_1 = z->c;
if (z->c + 3 > z->l) return 0;
z->c += 3;
i_x = z->c;
z->c = v_1;
}
{
int ret = out_grouping(z, g_v, 97, 248, 1);
if (ret < 0) return 0;
z->c += ret;
}
if (out_grouping(z, g_v, 97, 248, 1) < 0) return 0;
{
int ret = in_grouping(z, g_v, 97, 248, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c;
if (z->I[1] >= z->I[0]) goto lab0;
z->I[1] = z->I[0];
((SN_local *)z)->i_p1 = z->c;
if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
((SN_local *)z)->i_p1 = i_x;
lab0:
return 1;
}
static int r_main_suffix(struct SN_env * z) {
int among_var;
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851426 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
among_var = find_among_b(z, a_0, 29);
if (!among_var) { z->lb = mlimit1; return 0; }
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851426 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
among_var = find_among_b(z, a_1, 29, 0);
if (!among_var) { z->lb = v_1; return 0; }
z->bra = z->c;
z->lb = mlimit1;
z->lb = v_1;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int m2 = z->l - z->c; (void)m2;
if (in_grouping_b(z, g_s_ending, 98, 122, 0)) goto lab1;
goto lab0;
lab1:
z->c = z->l - m2;
if (z->c <= z->lb || z->p[z->c - 1] != 'k') return 0;
z->c--;
if (out_grouping_b(z, g_v, 97, 248, 0)) return 0;
}
lab0:
{ int ret = slice_del(z);
if (ret < 0) return ret;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((5318672 >> (z->p[z->c - 1] & 0x1f)) & 1)) among_var = 1; else
among_var = find_among_b(z, a_0, 15, 0);
switch (among_var) {
case 1:
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
}
break;
case 3:
{ int ret = slice_from_s(z, 2, s_0);
do {
int v_2 = z->l - z->c;
if (in_grouping_b(z, g_s_ending, 98, 122, 0)) goto lab0;
break;
lab0:
z->c = z->l - v_2;
if (z->c <= z->lb || z->p[z->c - 1] != 'r') goto lab1;
z->c--;
{
int v_3 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab2;
z->c--;
goto lab1;
lab2:
z->c = z->l - v_3;
}
break;
lab1:
z->c = z->l - v_2;
if (z->c <= z->lb || z->p[z->c - 1] != 'k') return 0;
z->c--;
if (out_grouping_b(z, g_v, 97, 248, 0)) return 0;
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 4:
{
int ret = slice_from_s(z, 2, s_0);
if (ret < 0) return ret;
}
break;
@ -198,77 +256,95 @@ static int r_main_suffix(struct SN_env * z) {
}
static int r_consonant_pair(struct SN_env * z) {
{ int m_test1 = z->l - z->c;
{ int mlimit2;
if (z->c < z->I[1]) return 0;
mlimit2 = z->lb; z->lb = z->I[1];
{
int v_1 = z->l - z->c;
{
int v_2;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_2 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] != 116) { z->lb = mlimit2; return 0; }
if (!find_among_b(z, a_1, 2)) { z->lb = mlimit2; return 0; }
if (z->c - 1 <= z->lb || z->p[z->c - 1] != 116) { z->lb = v_2; return 0; }
if (!find_among_b(z, a_2, 2, 0)) { z->lb = v_2; return 0; }
z->bra = z->c;
z->lb = mlimit2;
z->lb = v_2;
}
z->c = z->l - m_test1;
z->c = z->l - v_1;
}
if (z->c <= z->lb) return 0;
z->c--;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
static int r_other_suffix(struct SN_env * z) {
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((4718720 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
if (!find_among_b(z, a_2, 11)) { z->lb = mlimit1; return 0; }
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((4718720 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
if (!find_among_b(z, a_3, 11, 0)) { z->lb = v_1; return 0; }
z->bra = z->c;
z->lb = mlimit1;
z->lb = v_1;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
extern int norwegian_ISO_8859_1_stem(struct SN_env * z) {
{ int c1 = z->c;
{ int ret = r_mark_regions(z);
{
int v_1 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = c1;
z->c = v_1;
}
z->lb = z->c; z->c = z->l;
{ int m2 = z->l - z->c; (void)m2;
{ int ret = r_main_suffix(z);
{
int v_2 = z->l - z->c;
{
int ret = r_main_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_consonant_pair(z);
{
int v_3 = z->l - z->c;
{
int ret = r_consonant_pair(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_other_suffix(z);
{
int v_4 = z->l - z->c;
{
int ret = r_other_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * norwegian_ISO_8859_1_create_env(void) { return SN_create_env(0, 2); }
extern struct SN_env * norwegian_ISO_8859_1_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p1 = 0;
}
return z;
}
extern void norwegian_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void norwegian_ISO_8859_1_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,17 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from swedish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_ISO_8859_1_swedish.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p1;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,133 +20,169 @@ extern int swedish_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_other_suffix(struct SN_env * z);
static int r_consonant_pair(struct SN_env * z);
static int r_main_suffix(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static int r_et_condition(struct SN_env * z);
static const symbol s_0[] = { 'e', 't' };
static const symbol s_1[] = { 0xF6, 's' };
static const symbol s_2[] = { 'f', 'u', 'l', 'l' };
extern struct SN_env * swedish_ISO_8859_1_create_env(void);
extern void swedish_ISO_8859_1_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[1] = { 'a' };
static const symbol s_0_1[4] = { 'a', 'r', 'n', 'a' };
static const symbol s_0_2[4] = { 'e', 'r', 'n', 'a' };
static const symbol s_0_3[7] = { 'h', 'e', 't', 'e', 'r', 'n', 'a' };
static const symbol s_0_4[4] = { 'o', 'r', 'n', 'a' };
static const symbol s_0_5[2] = { 'a', 'd' };
static const symbol s_0_6[1] = { 'e' };
static const symbol s_0_7[3] = { 'a', 'd', 'e' };
static const symbol s_0_8[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_0_9[4] = { 'a', 'r', 'n', 'e' };
static const symbol s_0_10[3] = { 'a', 'r', 'e' };
static const symbol s_0_11[4] = { 'a', 's', 't', 'e' };
static const symbol s_0_12[2] = { 'e', 'n' };
static const symbol s_0_13[5] = { 'a', 'n', 'd', 'e', 'n' };
static const symbol s_0_14[4] = { 'a', 'r', 'e', 'n' };
static const symbol s_0_15[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_0_16[3] = { 'e', 'r', 'n' };
static const symbol s_0_17[2] = { 'a', 'r' };
static const symbol s_0_18[2] = { 'e', 'r' };
static const symbol s_0_19[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_0_20[2] = { 'o', 'r' };
static const symbol s_0_21[1] = { 's' };
static const symbol s_0_22[2] = { 'a', 's' };
static const symbol s_0_23[5] = { 'a', 'r', 'n', 'a', 's' };
static const symbol s_0_24[5] = { 'e', 'r', 'n', 'a', 's' };
static const symbol s_0_25[5] = { 'o', 'r', 'n', 'a', 's' };
static const symbol s_0_26[2] = { 'e', 's' };
static const symbol s_0_27[4] = { 'a', 'd', 'e', 's' };
static const symbol s_0_28[5] = { 'a', 'n', 'd', 'e', 's' };
static const symbol s_0_29[3] = { 'e', 'n', 's' };
static const symbol s_0_30[5] = { 'a', 'r', 'e', 'n', 's' };
static const symbol s_0_31[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_0_32[4] = { 'e', 'r', 'n', 's' };
static const symbol s_0_33[2] = { 'a', 't' };
static const symbol s_0_34[5] = { 'a', 'n', 'd', 'e', 't' };
static const symbol s_0_35[3] = { 'h', 'e', 't' };
static const symbol s_0_36[3] = { 'a', 's', 't' };
static const struct among a_0[37] =
{
{ 1, s_0_0, -1, 1, 0},
{ 4, s_0_1, 0, 1, 0},
{ 4, s_0_2, 0, 1, 0},
{ 7, s_0_3, 2, 1, 0},
{ 4, s_0_4, 0, 1, 0},
{ 2, s_0_5, -1, 1, 0},
{ 1, s_0_6, -1, 1, 0},
{ 3, s_0_7, 6, 1, 0},
{ 4, s_0_8, 6, 1, 0},
{ 4, s_0_9, 6, 1, 0},
{ 3, s_0_10, 6, 1, 0},
{ 4, s_0_11, 6, 1, 0},
{ 2, s_0_12, -1, 1, 0},
{ 5, s_0_13, 12, 1, 0},
{ 4, s_0_14, 12, 1, 0},
{ 5, s_0_15, 12, 1, 0},
{ 3, s_0_16, -1, 1, 0},
{ 2, s_0_17, -1, 1, 0},
{ 2, s_0_18, -1, 1, 0},
{ 5, s_0_19, 18, 1, 0},
{ 2, s_0_20, -1, 1, 0},
{ 1, s_0_21, -1, 2, 0},
{ 2, s_0_22, 21, 1, 0},
{ 5, s_0_23, 22, 1, 0},
{ 5, s_0_24, 22, 1, 0},
{ 5, s_0_25, 22, 1, 0},
{ 2, s_0_26, 21, 1, 0},
{ 4, s_0_27, 26, 1, 0},
{ 5, s_0_28, 26, 1, 0},
{ 3, s_0_29, 21, 1, 0},
{ 5, s_0_30, 29, 1, 0},
{ 6, s_0_31, 29, 1, 0},
{ 4, s_0_32, 21, 1, 0},
{ 2, s_0_33, -1, 1, 0},
{ 5, s_0_34, -1, 1, 0},
{ 3, s_0_35, -1, 1, 0},
{ 3, s_0_36, -1, 1, 0}
static const symbol s_0_0[3] = { 'f', 'a', 'b' };
static const symbol s_0_1[1] = { 'h' };
static const symbol s_0_2[3] = { 'p', 'a', 'k' };
static const symbol s_0_3[3] = { 'r', 'a', 'k' };
static const symbol s_0_4[4] = { 's', 't', 'a', 'k' };
static const symbol s_0_5[3] = { 'k', 'o', 'm' };
static const symbol s_0_6[3] = { 'i', 'e', 't' };
static const symbol s_0_7[3] = { 'c', 'i', 't' };
static const symbol s_0_8[3] = { 'd', 'i', 't' };
static const symbol s_0_9[4] = { 'a', 'l', 'i', 't' };
static const symbol s_0_10[4] = { 'i', 'l', 'i', 't' };
static const symbol s_0_11[3] = { 'm', 'i', 't' };
static const symbol s_0_12[3] = { 'n', 'i', 't' };
static const symbol s_0_13[3] = { 'p', 'i', 't' };
static const symbol s_0_14[3] = { 'r', 'i', 't' };
static const symbol s_0_15[3] = { 's', 'i', 't' };
static const symbol s_0_16[3] = { 't', 'i', 't' };
static const symbol s_0_17[3] = { 'u', 'i', 't' };
static const symbol s_0_18[4] = { 'i', 'v', 'i', 't' };
static const symbol s_0_19[4] = { 'k', 'v', 'i', 't' };
static const symbol s_0_20[3] = { 'x', 'i', 't' };
static const struct among a_0[21] = {
{ 3, s_0_0, 0, -1, 0},
{ 1, s_0_1, 0, -1, 0},
{ 3, s_0_2, 0, -1, 0},
{ 3, s_0_3, 0, -1, 0},
{ 4, s_0_4, 0, -1, 0},
{ 3, s_0_5, 0, -1, 0},
{ 3, s_0_6, 0, -1, 0},
{ 3, s_0_7, 0, -1, 0},
{ 3, s_0_8, 0, -1, 0},
{ 4, s_0_9, 0, -1, 0},
{ 4, s_0_10, 0, -1, 0},
{ 3, s_0_11, 0, -1, 0},
{ 3, s_0_12, 0, -1, 0},
{ 3, s_0_13, 0, -1, 0},
{ 3, s_0_14, 0, -1, 0},
{ 3, s_0_15, 0, -1, 0},
{ 3, s_0_16, 0, -1, 0},
{ 3, s_0_17, 0, -1, 0},
{ 4, s_0_18, 0, -1, 0},
{ 4, s_0_19, 0, -1, 0},
{ 3, s_0_20, 0, -1, 0}
};
static const symbol s_1_0[2] = { 'd', 'd' };
static const symbol s_1_1[2] = { 'g', 'd' };
static const symbol s_1_2[2] = { 'n', 'n' };
static const symbol s_1_3[2] = { 'd', 't' };
static const symbol s_1_4[2] = { 'g', 't' };
static const symbol s_1_5[2] = { 'k', 't' };
static const symbol s_1_6[2] = { 't', 't' };
static const struct among a_1[7] =
{
{ 2, s_1_0, -1, -1, 0},
{ 2, s_1_1, -1, -1, 0},
{ 2, s_1_2, -1, -1, 0},
{ 2, s_1_3, -1, -1, 0},
{ 2, s_1_4, -1, -1, 0},
{ 2, s_1_5, -1, -1, 0},
{ 2, s_1_6, -1, -1, 0}
static const symbol s_1_0[1] = { 'a' };
static const symbol s_1_1[4] = { 'a', 'r', 'n', 'a' };
static const symbol s_1_2[4] = { 'e', 'r', 'n', 'a' };
static const symbol s_1_3[7] = { 'h', 'e', 't', 'e', 'r', 'n', 'a' };
static const symbol s_1_4[4] = { 'o', 'r', 'n', 'a' };
static const symbol s_1_5[2] = { 'a', 'd' };
static const symbol s_1_6[1] = { 'e' };
static const symbol s_1_7[3] = { 'a', 'd', 'e' };
static const symbol s_1_8[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_1_9[4] = { 'a', 'r', 'n', 'e' };
static const symbol s_1_10[3] = { 'a', 'r', 'e' };
static const symbol s_1_11[4] = { 'a', 's', 't', 'e' };
static const symbol s_1_12[2] = { 'e', 'n' };
static const symbol s_1_13[5] = { 'a', 'n', 'd', 'e', 'n' };
static const symbol s_1_14[4] = { 'a', 'r', 'e', 'n' };
static const symbol s_1_15[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_1_16[3] = { 'e', 'r', 'n' };
static const symbol s_1_17[2] = { 'a', 'r' };
static const symbol s_1_18[2] = { 'e', 'r' };
static const symbol s_1_19[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_1_20[2] = { 'o', 'r' };
static const symbol s_1_21[1] = { 's' };
static const symbol s_1_22[2] = { 'a', 's' };
static const symbol s_1_23[5] = { 'a', 'r', 'n', 'a', 's' };
static const symbol s_1_24[5] = { 'e', 'r', 'n', 'a', 's' };
static const symbol s_1_25[5] = { 'o', 'r', 'n', 'a', 's' };
static const symbol s_1_26[2] = { 'e', 's' };
static const symbol s_1_27[4] = { 'a', 'd', 'e', 's' };
static const symbol s_1_28[5] = { 'a', 'n', 'd', 'e', 's' };
static const symbol s_1_29[3] = { 'e', 'n', 's' };
static const symbol s_1_30[5] = { 'a', 'r', 'e', 'n', 's' };
static const symbol s_1_31[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_1_32[4] = { 'e', 'r', 'n', 's' };
static const symbol s_1_33[2] = { 'a', 't' };
static const symbol s_1_34[2] = { 'e', 't' };
static const symbol s_1_35[5] = { 'a', 'n', 'd', 'e', 't' };
static const symbol s_1_36[3] = { 'h', 'e', 't' };
static const symbol s_1_37[3] = { 'a', 's', 't' };
static const struct among a_1[38] = {
{ 1, s_1_0, 0, 1, 0},
{ 4, s_1_1, -1, 1, 0},
{ 4, s_1_2, -2, 1, 0},
{ 7, s_1_3, -1, 1, 0},
{ 4, s_1_4, -4, 1, 0},
{ 2, s_1_5, 0, 1, 0},
{ 1, s_1_6, 0, 1, 0},
{ 3, s_1_7, -1, 1, 0},
{ 4, s_1_8, -2, 1, 0},
{ 4, s_1_9, -3, 1, 0},
{ 3, s_1_10, -4, 1, 0},
{ 4, s_1_11, -5, 1, 0},
{ 2, s_1_12, 0, 1, 0},
{ 5, s_1_13, -1, 1, 0},
{ 4, s_1_14, -2, 1, 0},
{ 5, s_1_15, -3, 1, 0},
{ 3, s_1_16, 0, 1, 0},
{ 2, s_1_17, 0, 1, 0},
{ 2, s_1_18, 0, 1, 0},
{ 5, s_1_19, -1, 1, 0},
{ 2, s_1_20, 0, 1, 0},
{ 1, s_1_21, 0, 2, 0},
{ 2, s_1_22, -1, 1, 0},
{ 5, s_1_23, -1, 1, 0},
{ 5, s_1_24, -2, 1, 0},
{ 5, s_1_25, -3, 1, 0},
{ 2, s_1_26, -5, 1, 0},
{ 4, s_1_27, -1, 1, 0},
{ 5, s_1_28, -2, 1, 0},
{ 3, s_1_29, -8, 1, 0},
{ 5, s_1_30, -1, 1, 0},
{ 6, s_1_31, -2, 1, 0},
{ 4, s_1_32, -11, 1, 0},
{ 2, s_1_33, 0, 1, 0},
{ 2, s_1_34, 0, 3, 0},
{ 5, s_1_35, -1, 1, 0},
{ 3, s_1_36, -2, 1, 0},
{ 3, s_1_37, 0, 1, 0}
};
static const symbol s_2_0[2] = { 'i', 'g' };
static const symbol s_2_1[3] = { 'l', 'i', 'g' };
static const symbol s_2_2[3] = { 'e', 'l', 's' };
static const symbol s_2_3[5] = { 'f', 'u', 'l', 'l', 't' };
static const symbol s_2_4[3] = { 0xF6, 's', 't' };
static const symbol s_2_0[2] = { 'd', 'd' };
static const symbol s_2_1[2] = { 'g', 'd' };
static const symbol s_2_2[2] = { 'n', 'n' };
static const symbol s_2_3[2] = { 'd', 't' };
static const symbol s_2_4[2] = { 'g', 't' };
static const symbol s_2_5[2] = { 'k', 't' };
static const symbol s_2_6[2] = { 't', 't' };
static const struct among a_2[7] = {
{ 2, s_2_0, 0, -1, 0},
{ 2, s_2_1, 0, -1, 0},
{ 2, s_2_2, 0, -1, 0},
{ 2, s_2_3, 0, -1, 0},
{ 2, s_2_4, 0, -1, 0},
{ 2, s_2_5, 0, -1, 0},
{ 2, s_2_6, 0, -1, 0}
};
static const struct among a_2[5] =
{
{ 2, s_2_0, -1, 1, 0},
{ 3, s_2_1, 0, 1, 0},
{ 3, s_2_2, -1, 1, 0},
{ 5, s_2_3, -1, 3, 0},
{ 3, s_2_4, -1, 2, 0}
static const symbol s_3_0[2] = { 'i', 'g' };
static const symbol s_3_1[3] = { 'l', 'i', 'g' };
static const symbol s_3_2[3] = { 'e', 'l', 's' };
static const symbol s_3_3[5] = { 'f', 'u', 'l', 'l', 't' };
static const symbol s_3_4[3] = { 0xF6, 's', 't' };
static const struct among a_3[5] = {
{ 2, s_3_0, 0, 1, 0},
{ 3, s_3_1, -1, 1, 0},
{ 3, s_3_2, 0, 1, 0},
{ 5, s_3_3, 0, 3, 0},
{ 3, s_3_4, 0, 2, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32 };
@ -144,55 +191,101 @@ static const unsigned char g_s_ending[] = { 119, 127, 149 };
static const unsigned char g_ost_ending[] = { 173, 58 };
static const symbol s_0[] = { 0xF6, 's' };
static const symbol s_1[] = { 'f', 'u', 'l', 'l' };
static int r_mark_regions(struct SN_env * z) {
z->I[1] = z->l;
{ int c_test1 = z->c;
z->c = z->c + 3;
if (z->c > z->l) return 0;
z->I[0] = z->c;
z->c = c_test1;
int i_x;
((SN_local *)z)->i_p1 = z->l;
{
int v_1 = z->c;
if (z->c + 3 > z->l) return 0;
z->c += 3;
i_x = z->c;
z->c = v_1;
}
{
int ret = out_grouping(z, g_v, 97, 246, 1);
if (ret < 0) return 0;
z->c += ret;
}
if (out_grouping(z, g_v, 97, 246, 1) < 0) return 0;
{
int ret = in_grouping(z, g_v, 97, 246, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c;
if (z->I[1] >= z->I[0]) goto lab0;
z->I[1] = z->I[0];
((SN_local *)z)->i_p1 = z->c;
if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
((SN_local *)z)->i_p1 = i_x;
lab0:
return 1;
}
static int r_et_condition(struct SN_env * z) {
{
int v_1 = z->l - z->c;
if (out_grouping_b(z, g_v, 97, 246, 0)) return 0;
if (in_grouping_b(z, g_v, 97, 246, 0)) return 0;
if (z->c > z->lb) goto lab0;
return 0;
lab0:
z->c = z->l - v_1;
{
int v_2 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1059076 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
if (!find_among_b(z, a_0, 21, 0)) goto lab1;
return 0;
lab1:
z->c = z->l - v_2;
}
}
return 1;
}
static int r_main_suffix(struct SN_env * z) {
int among_var;
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851442 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
among_var = find_among_b(z, a_0, 37);
if (!among_var) { z->lb = mlimit1; return 0; }
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851442 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
among_var = find_among_b(z, a_1, 38, 0);
if (!among_var) { z->lb = v_1; return 0; }
z->bra = z->c;
z->lb = mlimit1;
z->lb = v_1;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b(z, g_s_ending, 98, 121, 0)) return 0;
{ int ret = slice_del(z);
do {
int v_2 = z->l - z->c;
if (!(eq_s_b(z, 2, s_0))) goto lab0;
{
int ret = r_et_condition(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
z->bra = z->c;
break;
lab0:
z->c = z->l - v_2;
if (in_grouping_b(z, g_s_ending, 98, 121, 0)) return 0;
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = r_et_condition(z);
if (ret <= 0) return ret;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -201,54 +294,59 @@ static int r_main_suffix(struct SN_env * z) {
}
static int r_consonant_pair(struct SN_env * z) {
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{ int m2 = z->l - z->c; (void)m2;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1064976 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
if (!find_among_b(z, a_1, 7)) { z->lb = mlimit1; return 0; }
z->c = z->l - m2;
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
{
int v_2 = z->l - z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1064976 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
if (!find_among_b(z, a_2, 7, 0)) { z->lb = v_1; return 0; }
z->c = z->l - v_2;
z->ket = z->c;
if (z->c <= z->lb) { z->lb = mlimit1; return 0; }
if (z->c <= z->lb) { z->lb = v_1; return 0; }
z->c--;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
}
z->lb = mlimit1;
z->lb = v_1;
}
return 1;
}
static int r_other_suffix(struct SN_env * z) {
int among_var;
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
among_var = find_among_b(z, a_2, 5);
if (!among_var) { z->lb = mlimit1; return 0; }
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
among_var = find_among_b(z, a_3, 5, 0);
if (!among_var) { z->lb = v_1; return 0; }
z->bra = z->c;
z->lb = mlimit1;
z->lb = v_1;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b(z, g_ost_ending, 105, 118, 0)) return 0;
{ int ret = slice_from_s(z, 2, s_0);
{
int ret = slice_from_s(z, 2, s_1);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 4, s_1);
{
int ret = slice_from_s(z, 4, s_2);
if (ret < 0) return ret;
}
break;
@ -257,37 +355,52 @@ static int r_other_suffix(struct SN_env * z) {
}
extern int swedish_ISO_8859_1_stem(struct SN_env * z) {
{ int c1 = z->c;
{ int ret = r_mark_regions(z);
{
int v_1 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = c1;
z->c = v_1;
}
z->lb = z->c; z->c = z->l;
{ int m2 = z->l - z->c; (void)m2;
{ int ret = r_main_suffix(z);
{
int v_2 = z->l - z->c;
{
int ret = r_main_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_consonant_pair(z);
{
int v_3 = z->l - z->c;
{
int ret = r_consonant_pair(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_other_suffix(z);
{
int v_4 = z->l - z->c;
{
int ret = r_other_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * swedish_ISO_8859_1_create_env(void) { return SN_create_env(0, 2); }
extern struct SN_env * swedish_ISO_8859_1_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p1 = 0;
}
return z;
}
extern void swedish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void swedish_ISO_8859_1_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,520 @@
/* Generated from polish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "stem_ISO_8859_2_polish.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p1;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
#endif
extern int polish_ISO_8859_2_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_R1(struct SN_env * z);
static int r_normalize_consonant(struct SN_env * z);
static int r_remove_endings(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
static const symbol s_0[] = { 's' };
static const symbol s_1[] = { 's' };
static const symbol s_2[] = { 0xB3 };
static const symbol s_3[] = { 's' };
static const symbol s_4[] = { 'c' };
static const symbol s_5[] = { 'n' };
static const symbol s_6[] = { 's' };
static const symbol s_7[] = { 'z' };
static const symbol s_0_0[6] = { 'b', 'y', 0xB6, 'c', 'i', 'e' };
static const symbol s_0_1[3] = { 'b', 'y', 'm' };
static const symbol s_0_2[2] = { 'b', 'y' };
static const symbol s_0_3[5] = { 'b', 'y', 0xB6, 'm', 'y' };
static const symbol s_0_4[3] = { 'b', 'y', 0xB6 };
static const struct among a_0[5] = {
{ 6, s_0_0, 0, 1, 0},
{ 3, s_0_1, 0, 1, 0},
{ 2, s_0_2, 0, 1, 0},
{ 5, s_0_3, 0, 1, 0},
{ 3, s_0_4, 0, 1, 0}
};
static const symbol s_1_0[2] = { 0xB1, 'c' };
static const symbol s_1_1[4] = { 'a', 'j', 0xB1, 'c' };
static const symbol s_1_2[4] = { 's', 'z', 0xB1, 'c' };
static const symbol s_1_3[2] = { 's', 'z' };
static const symbol s_1_4[5] = { 'i', 'e', 'j', 's', 'z' };
static const struct among a_1[5] = {
{ 2, s_1_0, 0, 1, 0},
{ 4, s_1_1, -1, 1, 0},
{ 4, s_1_2, -2, 2, 0},
{ 2, s_1_3, 0, 1, 0},
{ 5, s_1_4, -1, 1, 0}
};
static const symbol s_2_0[1] = { 'a' };
static const symbol s_2_1[3] = { 0xB1, 'c', 'a' };
static const symbol s_2_2[5] = { 'a', 'j', 0xB1, 'c', 'a' };
static const symbol s_2_3[5] = { 's', 'z', 0xB1, 'c', 'a' };
static const symbol s_2_4[2] = { 'i', 'a' };
static const symbol s_2_5[3] = { 's', 'z', 'a' };
static const symbol s_2_6[6] = { 'i', 'e', 'j', 's', 'z', 'a' };
static const symbol s_2_7[3] = { 'a', 0xB3, 'a' };
static const symbol s_2_8[4] = { 'i', 'a', 0xB3, 'a' };
static const symbol s_2_9[3] = { 'i', 0xB3, 'a' };
static const symbol s_2_10[2] = { 0xB1, 'c' };
static const symbol s_2_11[4] = { 'a', 'j', 0xB1, 'c' };
static const symbol s_2_12[1] = { 'e' };
static const symbol s_2_13[3] = { 0xB1, 'c', 'e' };
static const symbol s_2_14[5] = { 'a', 'j', 0xB1, 'c', 'e' };
static const symbol s_2_15[5] = { 's', 'z', 0xB1, 'c', 'e' };
static const symbol s_2_16[2] = { 'i', 'e' };
static const symbol s_2_17[3] = { 'c', 'i', 'e' };
static const symbol s_2_18[4] = { 'a', 'c', 'i', 'e' };
static const symbol s_2_19[4] = { 'e', 'c', 'i', 'e' };
static const symbol s_2_20[4] = { 'i', 'c', 'i', 'e' };
static const symbol s_2_21[5] = { 'a', 'j', 'c', 'i', 'e' };
static const symbol s_2_22[6] = { 'l', 'i', 0xB6, 'c', 'i', 'e' };
static const symbol s_2_23[7] = { 'a', 'l', 'i', 0xB6, 'c', 'i', 'e' };
static const symbol s_2_24[8] = { 'i', 'e', 'l', 'i', 0xB6, 'c', 'i', 'e' };
static const symbol s_2_25[7] = { 'i', 'l', 'i', 0xB6, 'c', 'i', 'e' };
static const symbol s_2_26[6] = { 0xB3, 'y', 0xB6, 'c', 'i', 'e' };
static const symbol s_2_27[7] = { 'a', 0xB3, 'y', 0xB6, 'c', 'i', 'e' };
static const symbol s_2_28[8] = { 'i', 'a', 0xB3, 'y', 0xB6, 'c', 'i', 'e' };
static const symbol s_2_29[7] = { 'i', 0xB3, 'y', 0xB6, 'c', 'i', 'e' };
static const symbol s_2_30[3] = { 's', 'z', 'e' };
static const symbol s_2_31[6] = { 'i', 'e', 'j', 's', 'z', 'e' };
static const symbol s_2_32[3] = { 'a', 'c', 'h' };
static const symbol s_2_33[4] = { 'i', 'a', 'c', 'h' };
static const symbol s_2_34[3] = { 'i', 'c', 'h' };
static const symbol s_2_35[3] = { 'y', 'c', 'h' };
static const symbol s_2_36[1] = { 'i' };
static const symbol s_2_37[3] = { 'a', 'l', 'i' };
static const symbol s_2_38[4] = { 'i', 'e', 'l', 'i' };
static const symbol s_2_39[3] = { 'i', 'l', 'i' };
static const symbol s_2_40[3] = { 'a', 'm', 'i' };
static const symbol s_2_41[4] = { 'i', 'a', 'm', 'i' };
static const symbol s_2_42[3] = { 'i', 'm', 'i' };
static const symbol s_2_43[3] = { 'y', 'm', 'i' };
static const symbol s_2_44[3] = { 'o', 'w', 'i' };
static const symbol s_2_45[4] = { 'i', 'o', 'w', 'i' };
static const symbol s_2_46[2] = { 'a', 'j' };
static const symbol s_2_47[2] = { 'e', 'j' };
static const symbol s_2_48[3] = { 'i', 'e', 'j' };
static const symbol s_2_49[2] = { 'a', 'm' };
static const symbol s_2_50[4] = { 'a', 0xB3, 'a', 'm' };
static const symbol s_2_51[5] = { 'i', 'a', 0xB3, 'a', 'm' };
static const symbol s_2_52[4] = { 'i', 0xB3, 'a', 'm' };
static const symbol s_2_53[2] = { 'e', 'm' };
static const symbol s_2_54[3] = { 'i', 'e', 'm' };
static const symbol s_2_55[4] = { 'a', 0xB3, 'e', 'm' };
static const symbol s_2_56[5] = { 'i', 'a', 0xB3, 'e', 'm' };
static const symbol s_2_57[4] = { 'i', 0xB3, 'e', 'm' };
static const symbol s_2_58[2] = { 'i', 'm' };
static const symbol s_2_59[2] = { 'o', 'm' };
static const symbol s_2_60[3] = { 'i', 'o', 'm' };
static const symbol s_2_61[2] = { 'y', 'm' };
static const symbol s_2_62[1] = { 'o' };
static const symbol s_2_63[3] = { 'e', 'g', 'o' };
static const symbol s_2_64[4] = { 'i', 'e', 'g', 'o' };
static const symbol s_2_65[3] = { 'a', 0xB3, 'o' };
static const symbol s_2_66[4] = { 'i', 'a', 0xB3, 'o' };
static const symbol s_2_67[3] = { 'i', 0xB3, 'o' };
static const symbol s_2_68[1] = { 'u' };
static const symbol s_2_69[2] = { 'i', 'u' };
static const symbol s_2_70[3] = { 'e', 'm', 'u' };
static const symbol s_2_71[4] = { 'i', 'e', 'm', 'u' };
static const symbol s_2_72[2] = { 0xF3, 'w' };
static const symbol s_2_73[1] = { 'y' };
static const symbol s_2_74[3] = { 'a', 'm', 'y' };
static const symbol s_2_75[3] = { 'e', 'm', 'y' };
static const symbol s_2_76[3] = { 'i', 'm', 'y' };
static const symbol s_2_77[5] = { 'l', 'i', 0xB6, 'm', 'y' };
static const symbol s_2_78[6] = { 'a', 'l', 'i', 0xB6, 'm', 'y' };
static const symbol s_2_79[7] = { 'i', 'e', 'l', 'i', 0xB6, 'm', 'y' };
static const symbol s_2_80[6] = { 'i', 'l', 'i', 0xB6, 'm', 'y' };
static const symbol s_2_81[5] = { 0xB3, 'y', 0xB6, 'm', 'y' };
static const symbol s_2_82[6] = { 'a', 0xB3, 'y', 0xB6, 'm', 'y' };
static const symbol s_2_83[7] = { 'i', 'a', 0xB3, 'y', 0xB6, 'm', 'y' };
static const symbol s_2_84[6] = { 'i', 0xB3, 'y', 0xB6, 'm', 'y' };
static const symbol s_2_85[3] = { 'a', 0xB3, 'y' };
static const symbol s_2_86[4] = { 'i', 'a', 0xB3, 'y' };
static const symbol s_2_87[3] = { 'i', 0xB3, 'y' };
static const symbol s_2_88[3] = { 'a', 's', 'z' };
static const symbol s_2_89[3] = { 'e', 's', 'z' };
static const symbol s_2_90[3] = { 'i', 's', 'z' };
static const symbol s_2_91[1] = { 0xB1 };
static const symbol s_2_92[3] = { 0xB1, 'c', 0xB1 };
static const symbol s_2_93[5] = { 'a', 'j', 0xB1, 'c', 0xB1 };
static const symbol s_2_94[5] = { 's', 'z', 0xB1, 'c', 0xB1 };
static const symbol s_2_95[2] = { 'i', 0xB1 };
static const symbol s_2_96[3] = { 'a', 'j', 0xB1 };
static const symbol s_2_97[3] = { 's', 'z', 0xB1 };
static const symbol s_2_98[6] = { 'i', 'e', 'j', 's', 'z', 0xB1 };
static const symbol s_2_99[2] = { 'a', 0xB3 };
static const symbol s_2_100[3] = { 'i', 'a', 0xB3 };
static const symbol s_2_101[2] = { 'i', 0xB3 };
static const symbol s_2_102[3] = { 0xB3, 'a', 0xB6 };
static const symbol s_2_103[4] = { 'a', 0xB3, 'a', 0xB6 };
static const symbol s_2_104[5] = { 'i', 'a', 0xB3, 'a', 0xB6 };
static const symbol s_2_105[4] = { 'i', 0xB3, 'a', 0xB6 };
static const symbol s_2_106[3] = { 0xB3, 'e', 0xB6 };
static const symbol s_2_107[4] = { 'a', 0xB3, 'e', 0xB6 };
static const symbol s_2_108[5] = { 'i', 'a', 0xB3, 'e', 0xB6 };
static const symbol s_2_109[4] = { 'i', 0xB3, 'e', 0xB6 };
static const symbol s_2_110[2] = { 'a', 0xE6 };
static const symbol s_2_111[3] = { 'i', 'e', 0xE6 };
static const symbol s_2_112[2] = { 'i', 0xE6 };
static const symbol s_2_113[2] = { 0xB1, 0xE6 };
static const symbol s_2_114[3] = { 'a', 0xB6, 0xE6 };
static const symbol s_2_115[3] = { 'e', 0xB6, 0xE6 };
static const symbol s_2_116[1] = { 0xEA };
static const symbol s_2_117[3] = { 's', 'z', 0xEA };
static const struct among a_2[118] = {
{ 1, s_2_0, 0, 1, 1},
{ 3, s_2_1, -1, 1, 0},
{ 5, s_2_2, -1, 1, 0},
{ 5, s_2_3, -2, 2, 0},
{ 2, s_2_4, -4, 1, 1},
{ 3, s_2_5, -5, 1, 0},
{ 6, s_2_6, -1, 1, 0},
{ 3, s_2_7, -7, 1, 0},
{ 4, s_2_8, -1, 1, 0},
{ 3, s_2_9, -9, 1, 0},
{ 2, s_2_10, 0, 1, 0},
{ 4, s_2_11, -1, 1, 0},
{ 1, s_2_12, 0, 1, 1},
{ 3, s_2_13, -1, 1, 0},
{ 5, s_2_14, -1, 1, 0},
{ 5, s_2_15, -2, 2, 0},
{ 2, s_2_16, -4, 1, 1},
{ 3, s_2_17, -1, 1, 0},
{ 4, s_2_18, -1, 1, 0},
{ 4, s_2_19, -2, 1, 0},
{ 4, s_2_20, -3, 1, 0},
{ 5, s_2_21, -4, 1, 0},
{ 6, s_2_22, -5, 4, 0},
{ 7, s_2_23, -1, 1, 0},
{ 8, s_2_24, -2, 1, 0},
{ 7, s_2_25, -3, 1, 0},
{ 6, s_2_26, -9, 4, 0},
{ 7, s_2_27, -1, 1, 0},
{ 8, s_2_28, -1, 1, 0},
{ 7, s_2_29, -3, 1, 0},
{ 3, s_2_30, -18, 1, 0},
{ 6, s_2_31, -1, 1, 0},
{ 3, s_2_32, 0, 1, 1},
{ 4, s_2_33, -1, 1, 1},
{ 3, s_2_34, 0, 5, 0},
{ 3, s_2_35, 0, 5, 0},
{ 1, s_2_36, 0, 1, 1},
{ 3, s_2_37, -1, 1, 0},
{ 4, s_2_38, -2, 1, 0},
{ 3, s_2_39, -3, 1, 0},
{ 3, s_2_40, -4, 1, 1},
{ 4, s_2_41, -1, 1, 1},
{ 3, s_2_42, -6, 5, 0},
{ 3, s_2_43, -7, 5, 0},
{ 3, s_2_44, -8, 1, 1},
{ 4, s_2_45, -1, 1, 1},
{ 2, s_2_46, 0, 1, 0},
{ 2, s_2_47, 0, 5, 0},
{ 3, s_2_48, -1, 5, 0},
{ 2, s_2_49, 0, 1, 0},
{ 4, s_2_50, -1, 1, 0},
{ 5, s_2_51, -1, 1, 0},
{ 4, s_2_52, -3, 1, 0},
{ 2, s_2_53, 0, 1, 1},
{ 3, s_2_54, -1, 1, 1},
{ 4, s_2_55, -2, 1, 0},
{ 5, s_2_56, -1, 1, 0},
{ 4, s_2_57, -4, 1, 0},
{ 2, s_2_58, 0, 5, 0},
{ 2, s_2_59, 0, 1, 1},
{ 3, s_2_60, -1, 1, 1},
{ 2, s_2_61, 0, 5, 0},
{ 1, s_2_62, 0, 1, 1},
{ 3, s_2_63, -1, 5, 0},
{ 4, s_2_64, -1, 5, 0},
{ 3, s_2_65, -3, 1, 0},
{ 4, s_2_66, -1, 1, 0},
{ 3, s_2_67, -5, 1, 0},
{ 1, s_2_68, 0, 1, 1},
{ 2, s_2_69, -1, 1, 1},
{ 3, s_2_70, -2, 5, 0},
{ 4, s_2_71, -1, 5, 0},
{ 2, s_2_72, 0, 1, 1},
{ 1, s_2_73, 0, 5, 0},
{ 3, s_2_74, -1, 1, 0},
{ 3, s_2_75, -2, 1, 0},
{ 3, s_2_76, -3, 1, 0},
{ 5, s_2_77, -4, 4, 0},
{ 6, s_2_78, -1, 1, 0},
{ 7, s_2_79, -2, 1, 0},
{ 6, s_2_80, -3, 1, 0},
{ 5, s_2_81, -8, 4, 0},
{ 6, s_2_82, -1, 1, 0},
{ 7, s_2_83, -1, 1, 0},
{ 6, s_2_84, -3, 1, 0},
{ 3, s_2_85, -12, 1, 0},
{ 4, s_2_86, -1, 1, 0},
{ 3, s_2_87, -14, 1, 0},
{ 3, s_2_88, 0, 1, 0},
{ 3, s_2_89, 0, 1, 0},
{ 3, s_2_90, 0, 1, 0},
{ 1, s_2_91, 0, 1, 1},
{ 3, s_2_92, -1, 1, 0},
{ 5, s_2_93, -1, 1, 0},
{ 5, s_2_94, -2, 2, 0},
{ 2, s_2_95, -4, 1, 1},
{ 3, s_2_96, -5, 1, 0},
{ 3, s_2_97, -6, 3, 0},
{ 6, s_2_98, -1, 1, 0},
{ 2, s_2_99, 0, 1, 0},
{ 3, s_2_100, -1, 1, 0},
{ 2, s_2_101, 0, 1, 0},
{ 3, s_2_102, 0, 4, 0},
{ 4, s_2_103, -1, 1, 0},
{ 5, s_2_104, -1, 1, 0},
{ 4, s_2_105, -3, 1, 0},
{ 3, s_2_106, 0, 4, 0},
{ 4, s_2_107, -1, 1, 0},
{ 5, s_2_108, -1, 1, 0},
{ 4, s_2_109, -3, 1, 0},
{ 2, s_2_110, 0, 1, 0},
{ 3, s_2_111, 0, 1, 0},
{ 2, s_2_112, 0, 1, 0},
{ 2, s_2_113, 0, 1, 0},
{ 3, s_2_114, 0, 1, 0},
{ 3, s_2_115, 0, 1, 0},
{ 1, s_2_116, 0, 1, 0},
{ 3, s_2_117, -1, 2, 0}
};
static const symbol s_3_0[1] = { 0xB6 };
static const symbol s_3_1[1] = { 0xBC };
static const symbol s_3_2[1] = { 0xE6 };
static const symbol s_3_3[1] = { 0xF1 };
static const struct among a_3[4] = {
{ 1, s_3_0, 0, 3, 0},
{ 1, s_3_1, 0, 4, 0},
{ 1, s_3_2, 0, 1, 0},
{ 1, s_3_3, 0, 2, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 4 };
static int r_mark_regions(struct SN_env * z) {
((SN_local *)z)->i_p1 = z->l;
{
int ret = out_grouping(z, g_v, 97, 243, 1);
if (ret < 0) return 0;
z->c += ret;
}
{
int ret = in_grouping(z, g_v, 97, 243, 1);
if (ret < 0) return 0;
z->c += ret;
}
((SN_local *)z)->i_p1 = z->c;
return 1;
}
static int r_R1(struct SN_env * z) {
return ((SN_local *)z)->i_p1 <= z->c;
}
static int r_remove_endings(struct SN_env * z) {
int among_var;
{
int v_1 = z->l - z->c;
{
int v_2;
if (z->c < ((SN_local *)z)->i_p1) goto lab0;
v_2 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (!find_among_b(z, a_0, 5, 0)) { z->lb = v_2; goto lab0; }
z->bra = z->c;
z->lb = v_2;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab0:
z->c = z->l - v_1;
}
z->ket = z->c;
among_var = find_among_b(z, a_2, 118, r_R1);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
break;
case 3:
do {
int v_3 = z->l - z->c;
{
int v_4 = z->l - z->c;
{
int ret = r_R1(z);
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
z->c = z->l - v_4;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
}
break;
lab1:
z->c = z->l - v_3;
{
int ret = slice_from_s(z, 1, s_1);
if (ret < 0) return ret;
}
} while (0);
break;
case 4:
{
int ret = slice_from_s(z, 1, s_2);
if (ret < 0) return ret;
}
break;
case 5:
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{
int v_5 = z->l - z->c;
z->ket = z->c;
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 99 && z->p[z->c - 1] != 122)) { z->c = z->l - v_5; goto lab2; }
among_var = find_among_b(z, a_1, 5, 0);
if (!among_var) { z->c = z->l - v_5; goto lab2; }
z->bra = z->c;
switch (among_var) {
case 1:
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 1, s_3);
if (ret < 0) return ret;
}
break;
}
lab2:
;
}
break;
}
return 1;
}
static int r_normalize_consonant(struct SN_env * z) {
int among_var;
z->ket = z->c;
among_var = find_among_b(z, a_3, 4, 0);
if (!among_var) return 0;
z->bra = z->c;
if (z->c > z->lb) goto lab0;
return 0;
lab0:
switch (among_var) {
case 1:
{
int ret = slice_from_s(z, 1, s_4);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 1, s_5);
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = slice_from_s(z, 1, s_6);
if (ret < 0) return ret;
}
break;
case 4:
{
int ret = slice_from_s(z, 1, s_7);
if (ret < 0) return ret;
}
break;
}
return 1;
}
extern int polish_ISO_8859_2_stem(struct SN_env * z) {
{
int v_1 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = v_1;
}
do {
int v_2 = z->c;
if (z->c + 2 > z->l) goto lab0;
z->c += 2;
z->lb = z->c; z->c = z->l;
{
int ret = r_remove_endings(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
z->c = z->lb;
break;
lab0:
z->c = v_2;
z->lb = z->c; z->c = z->l;
{
int ret = r_normalize_consonant(z);
if (ret <= 0) return ret;
}
z->c = z->lb;
} while (0);
return 1;
}
extern struct SN_env * polish_ISO_8859_2_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p1 = 0;
}
return z;
}
extern void polish_ISO_8859_2_close_env(struct SN_env * z) {
SN_delete_env(z);
}

View file

@ -1,6 +1,18 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from russian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_KOI8_R_russian.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p2;
int i_pV;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,6 +21,7 @@ extern int russian_KOI8_R_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_tidy_up(struct SN_env * z);
static int r_derivational(struct SN_env * z);
static int r_noun(struct SN_env * z);
@ -19,18 +32,9 @@ static int r_adjective(struct SN_env * z);
static int r_perfective_gerund(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static const symbol s_0[] = { 0xC5 };
extern struct SN_env * russian_KOI8_R_create_env(void);
extern void russian_KOI8_R_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[3] = { 0xD7, 0xDB, 0xC9 };
static const symbol s_0_1[4] = { 0xC9, 0xD7, 0xDB, 0xC9 };
static const symbol s_0_2[4] = { 0xD9, 0xD7, 0xDB, 0xC9 };
@ -40,18 +44,16 @@ static const symbol s_0_5[2] = { 0xD9, 0xD7 };
static const symbol s_0_6[5] = { 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
static const symbol s_0_7[6] = { 0xC9, 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
static const symbol s_0_8[6] = { 0xD9, 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
static const struct among a_0[9] =
{
{ 3, s_0_0, -1, 1, 0},
{ 4, s_0_1, 0, 2, 0},
{ 4, s_0_2, 0, 2, 0},
{ 1, s_0_3, -1, 1, 0},
{ 2, s_0_4, 3, 2, 0},
{ 2, s_0_5, 3, 2, 0},
{ 5, s_0_6, -1, 1, 0},
{ 6, s_0_7, 6, 2, 0},
{ 6, s_0_8, 6, 2, 0}
static const struct among a_0[9] = {
{ 3, s_0_0, 0, 1, 0},
{ 4, s_0_1, -1, 2, 0},
{ 4, s_0_2, -2, 2, 0},
{ 1, s_0_3, 0, 1, 0},
{ 2, s_0_4, -1, 2, 0},
{ 2, s_0_5, -2, 2, 0},
{ 5, s_0_6, 0, 1, 0},
{ 6, s_0_7, -1, 2, 0},
{ 6, s_0_8, -2, 2, 0}
};
static const symbol s_1_0[2] = { 0xC0, 0xC0 };
@ -80,35 +82,33 @@ static const symbol s_1_22[2] = { 0xC1, 0xD1 };
static const symbol s_1_23[2] = { 0xD1, 0xD1 };
static const symbol s_1_24[3] = { 0xC5, 0xCD, 0xD5 };
static const symbol s_1_25[3] = { 0xCF, 0xCD, 0xD5 };
static const struct among a_1[26] =
{
{ 2, s_1_0, -1, 1, 0},
{ 2, s_1_1, -1, 1, 0},
{ 2, s_1_2, -1, 1, 0},
{ 2, s_1_3, -1, 1, 0},
{ 2, s_1_4, -1, 1, 0},
{ 2, s_1_5, -1, 1, 0},
{ 2, s_1_6, -1, 1, 0},
{ 2, s_1_7, -1, 1, 0},
{ 2, s_1_8, -1, 1, 0},
{ 2, s_1_9, -1, 1, 0},
{ 3, s_1_10, -1, 1, 0},
{ 3, s_1_11, -1, 1, 0},
{ 2, s_1_12, -1, 1, 0},
{ 2, s_1_13, -1, 1, 0},
{ 2, s_1_14, -1, 1, 0},
{ 2, s_1_15, -1, 1, 0},
{ 2, s_1_16, -1, 1, 0},
{ 2, s_1_17, -1, 1, 0},
{ 2, s_1_18, -1, 1, 0},
{ 2, s_1_19, -1, 1, 0},
{ 3, s_1_20, -1, 1, 0},
{ 3, s_1_21, -1, 1, 0},
{ 2, s_1_22, -1, 1, 0},
{ 2, s_1_23, -1, 1, 0},
{ 3, s_1_24, -1, 1, 0},
{ 3, s_1_25, -1, 1, 0}
static const struct among a_1[26] = {
{ 2, s_1_0, 0, 1, 0},
{ 2, s_1_1, 0, 1, 0},
{ 2, s_1_2, 0, 1, 0},
{ 2, s_1_3, 0, 1, 0},
{ 2, s_1_4, 0, 1, 0},
{ 2, s_1_5, 0, 1, 0},
{ 2, s_1_6, 0, 1, 0},
{ 2, s_1_7, 0, 1, 0},
{ 2, s_1_8, 0, 1, 0},
{ 2, s_1_9, 0, 1, 0},
{ 3, s_1_10, 0, 1, 0},
{ 3, s_1_11, 0, 1, 0},
{ 2, s_1_12, 0, 1, 0},
{ 2, s_1_13, 0, 1, 0},
{ 2, s_1_14, 0, 1, 0},
{ 2, s_1_15, 0, 1, 0},
{ 2, s_1_16, 0, 1, 0},
{ 2, s_1_17, 0, 1, 0},
{ 2, s_1_18, 0, 1, 0},
{ 2, s_1_19, 0, 1, 0},
{ 3, s_1_20, 0, 1, 0},
{ 3, s_1_21, 0, 1, 0},
{ 2, s_1_22, 0, 1, 0},
{ 2, s_1_23, 0, 1, 0},
{ 3, s_1_24, 0, 1, 0},
{ 3, s_1_25, 0, 1, 0}
};
static const symbol s_2_0[2] = { 0xC5, 0xCD };
@ -119,26 +119,22 @@ static const symbol s_2_4[3] = { 0xD9, 0xD7, 0xDB };
static const symbol s_2_5[1] = { 0xDD };
static const symbol s_2_6[2] = { 0xC0, 0xDD };
static const symbol s_2_7[3] = { 0xD5, 0xC0, 0xDD };
static const struct among a_2[8] =
{
{ 2, s_2_0, -1, 1, 0},
{ 2, s_2_1, -1, 1, 0},
{ 2, s_2_2, -1, 1, 0},
{ 3, s_2_3, 2, 2, 0},
{ 3, s_2_4, 2, 2, 0},
{ 1, s_2_5, -1, 1, 0},
{ 2, s_2_6, 5, 1, 0},
{ 3, s_2_7, 6, 2, 0}
static const struct among a_2[8] = {
{ 2, s_2_0, 0, 1, 0},
{ 2, s_2_1, 0, 1, 0},
{ 2, s_2_2, 0, 1, 0},
{ 3, s_2_3, -1, 2, 0},
{ 3, s_2_4, -2, 2, 0},
{ 1, s_2_5, 0, 1, 0},
{ 2, s_2_6, -1, 1, 0},
{ 3, s_2_7, -1, 2, 0}
};
static const symbol s_3_0[2] = { 0xD3, 0xD1 };
static const symbol s_3_1[2] = { 0xD3, 0xD8 };
static const struct among a_3[2] =
{
{ 2, s_3_0, -1, 1, 0},
{ 2, s_3_1, -1, 1, 0}
static const struct among a_3[2] = {
{ 2, s_3_0, 0, 1, 0},
{ 2, s_3_1, 0, 1, 0}
};
static const symbol s_4_0[1] = { 0xC0 };
@ -187,55 +183,53 @@ static const symbol s_4_42[3] = { 0xC5, 0xDB, 0xD8 };
static const symbol s_4_43[3] = { 0xC9, 0xDB, 0xD8 };
static const symbol s_4_44[2] = { 0xCE, 0xD9 };
static const symbol s_4_45[3] = { 0xC5, 0xCE, 0xD9 };
static const struct among a_4[46] =
{
{ 1, s_4_0, -1, 2, 0},
{ 2, s_4_1, 0, 2, 0},
{ 2, s_4_2, -1, 1, 0},
{ 3, s_4_3, 2, 2, 0},
{ 3, s_4_4, 2, 2, 0},
{ 2, s_4_5, -1, 1, 0},
{ 3, s_4_6, 5, 2, 0},
{ 3, s_4_7, -1, 1, 0},
{ 3, s_4_8, -1, 2, 0},
{ 3, s_4_9, -1, 1, 0},
{ 4, s_4_10, 9, 2, 0},
{ 4, s_4_11, 9, 2, 0},
{ 2, s_4_12, -1, 1, 0},
{ 3, s_4_13, 12, 2, 0},
{ 3, s_4_14, 12, 2, 0},
{ 1, s_4_15, -1, 1, 0},
{ 2, s_4_16, 15, 2, 0},
{ 2, s_4_17, 15, 2, 0},
{ 1, s_4_18, -1, 1, 0},
{ 2, s_4_19, 18, 2, 0},
{ 2, s_4_20, 18, 2, 0},
{ 2, s_4_21, -1, 1, 0},
{ 2, s_4_22, -1, 2, 0},
{ 2, s_4_23, -1, 2, 0},
{ 1, s_4_24, -1, 1, 0},
{ 2, s_4_25, 24, 2, 0},
{ 2, s_4_26, -1, 1, 0},
{ 3, s_4_27, 26, 2, 0},
{ 3, s_4_28, 26, 2, 0},
{ 2, s_4_29, -1, 1, 0},
{ 3, s_4_30, 29, 2, 0},
{ 3, s_4_31, 29, 1, 0},
{ 2, s_4_32, -1, 1, 0},
{ 3, s_4_33, 32, 2, 0},
{ 2, s_4_34, -1, 1, 0},
{ 3, s_4_35, 34, 2, 0},
{ 2, s_4_36, -1, 2, 0},
{ 2, s_4_37, -1, 2, 0},
{ 2, s_4_38, -1, 2, 0},
{ 2, s_4_39, -1, 1, 0},
{ 3, s_4_40, 39, 2, 0},
{ 3, s_4_41, 39, 2, 0},
{ 3, s_4_42, -1, 1, 0},
{ 3, s_4_43, -1, 2, 0},
{ 2, s_4_44, -1, 1, 0},
{ 3, s_4_45, 44, 2, 0}
static const struct among a_4[46] = {
{ 1, s_4_0, 0, 2, 0},
{ 2, s_4_1, -1, 2, 0},
{ 2, s_4_2, 0, 1, 0},
{ 3, s_4_3, -1, 2, 0},
{ 3, s_4_4, -2, 2, 0},
{ 2, s_4_5, 0, 1, 0},
{ 3, s_4_6, -1, 2, 0},
{ 3, s_4_7, 0, 1, 0},
{ 3, s_4_8, 0, 2, 0},
{ 3, s_4_9, 0, 1, 0},
{ 4, s_4_10, -1, 2, 0},
{ 4, s_4_11, -2, 2, 0},
{ 2, s_4_12, 0, 1, 0},
{ 3, s_4_13, -1, 2, 0},
{ 3, s_4_14, -2, 2, 0},
{ 1, s_4_15, 0, 1, 0},
{ 2, s_4_16, -1, 2, 0},
{ 2, s_4_17, -2, 2, 0},
{ 1, s_4_18, 0, 1, 0},
{ 2, s_4_19, -1, 2, 0},
{ 2, s_4_20, -2, 2, 0},
{ 2, s_4_21, 0, 1, 0},
{ 2, s_4_22, 0, 2, 0},
{ 2, s_4_23, 0, 2, 0},
{ 1, s_4_24, 0, 1, 0},
{ 2, s_4_25, -1, 2, 0},
{ 2, s_4_26, 0, 1, 0},
{ 3, s_4_27, -1, 2, 0},
{ 3, s_4_28, -2, 2, 0},
{ 2, s_4_29, 0, 1, 0},
{ 3, s_4_30, -1, 2, 0},
{ 3, s_4_31, -2, 1, 0},
{ 2, s_4_32, 0, 1, 0},
{ 3, s_4_33, -1, 2, 0},
{ 2, s_4_34, 0, 1, 0},
{ 3, s_4_35, -1, 2, 0},
{ 2, s_4_36, 0, 2, 0},
{ 2, s_4_37, 0, 2, 0},
{ 2, s_4_38, 0, 2, 0},
{ 2, s_4_39, 0, 1, 0},
{ 3, s_4_40, -1, 2, 0},
{ 3, s_4_41, -2, 2, 0},
{ 3, s_4_42, 0, 1, 0},
{ 3, s_4_43, 0, 2, 0},
{ 2, s_4_44, 0, 1, 0},
{ 3, s_4_45, -1, 2, 0}
};
static const symbol s_5_0[1] = { 0xC0 };
@ -274,138 +268,129 @@ static const symbol s_5_32[2] = { 0xC5, 0xD7 };
static const symbol s_5_33[2] = { 0xCF, 0xD7 };
static const symbol s_5_34[1] = { 0xD8 };
static const symbol s_5_35[1] = { 0xD9 };
static const struct among a_5[36] =
{
{ 1, s_5_0, -1, 1, 0},
{ 2, s_5_1, 0, 1, 0},
{ 2, s_5_2, 0, 1, 0},
{ 1, s_5_3, -1, 1, 0},
{ 1, s_5_4, -1, 1, 0},
{ 2, s_5_5, 4, 1, 0},
{ 2, s_5_6, 4, 1, 0},
{ 2, s_5_7, -1, 1, 0},
{ 2, s_5_8, -1, 1, 0},
{ 3, s_5_9, 8, 1, 0},
{ 1, s_5_10, -1, 1, 0},
{ 2, s_5_11, 10, 1, 0},
{ 2, s_5_12, 10, 1, 0},
{ 3, s_5_13, 10, 1, 0},
{ 3, s_5_14, 10, 1, 0},
{ 4, s_5_15, 14, 1, 0},
{ 1, s_5_16, -1, 1, 0},
{ 2, s_5_17, 16, 1, 0},
{ 3, s_5_18, 17, 1, 0},
{ 2, s_5_19, 16, 1, 0},
{ 2, s_5_20, 16, 1, 0},
{ 2, s_5_21, -1, 1, 0},
{ 2, s_5_22, -1, 1, 0},
{ 3, s_5_23, 22, 1, 0},
{ 2, s_5_24, -1, 1, 0},
{ 2, s_5_25, -1, 1, 0},
{ 3, s_5_26, 25, 1, 0},
{ 1, s_5_27, -1, 1, 0},
{ 1, s_5_28, -1, 1, 0},
{ 2, s_5_29, 28, 1, 0},
{ 2, s_5_30, 28, 1, 0},
{ 1, s_5_31, -1, 1, 0},
{ 2, s_5_32, -1, 1, 0},
{ 2, s_5_33, -1, 1, 0},
{ 1, s_5_34, -1, 1, 0},
{ 1, s_5_35, -1, 1, 0}
static const struct among a_5[36] = {
{ 1, s_5_0, 0, 1, 0},
{ 2, s_5_1, -1, 1, 0},
{ 2, s_5_2, -2, 1, 0},
{ 1, s_5_3, 0, 1, 0},
{ 1, s_5_4, 0, 1, 0},
{ 2, s_5_5, -1, 1, 0},
{ 2, s_5_6, -2, 1, 0},
{ 2, s_5_7, 0, 1, 0},
{ 2, s_5_8, 0, 1, 0},
{ 3, s_5_9, -1, 1, 0},
{ 1, s_5_10, 0, 1, 0},
{ 2, s_5_11, -1, 1, 0},
{ 2, s_5_12, -2, 1, 0},
{ 3, s_5_13, -3, 1, 0},
{ 3, s_5_14, -4, 1, 0},
{ 4, s_5_15, -1, 1, 0},
{ 1, s_5_16, 0, 1, 0},
{ 2, s_5_17, -1, 1, 0},
{ 3, s_5_18, -1, 1, 0},
{ 2, s_5_19, -3, 1, 0},
{ 2, s_5_20, -4, 1, 0},
{ 2, s_5_21, 0, 1, 0},
{ 2, s_5_22, 0, 1, 0},
{ 3, s_5_23, -1, 1, 0},
{ 2, s_5_24, 0, 1, 0},
{ 2, s_5_25, 0, 1, 0},
{ 3, s_5_26, -1, 1, 0},
{ 1, s_5_27, 0, 1, 0},
{ 1, s_5_28, 0, 1, 0},
{ 2, s_5_29, -1, 1, 0},
{ 2, s_5_30, -2, 1, 0},
{ 1, s_5_31, 0, 1, 0},
{ 2, s_5_32, 0, 1, 0},
{ 2, s_5_33, 0, 1, 0},
{ 1, s_5_34, 0, 1, 0},
{ 1, s_5_35, 0, 1, 0}
};
static const symbol s_6_0[3] = { 0xCF, 0xD3, 0xD4 };
static const symbol s_6_1[4] = { 0xCF, 0xD3, 0xD4, 0xD8 };
static const struct among a_6[2] =
{
{ 3, s_6_0, -1, 1, 0},
{ 4, s_6_1, -1, 1, 0}
static const struct among a_6[2] = {
{ 3, s_6_0, 0, 1, 0},
{ 4, s_6_1, 0, 1, 0}
};
static const symbol s_7_0[4] = { 0xC5, 0xCA, 0xDB, 0xC5 };
static const symbol s_7_1[1] = { 0xCE };
static const symbol s_7_2[1] = { 0xD8 };
static const symbol s_7_3[3] = { 0xC5, 0xCA, 0xDB };
static const struct among a_7[4] =
{
{ 4, s_7_0, -1, 1, 0},
{ 1, s_7_1, -1, 2, 0},
{ 1, s_7_2, -1, 3, 0},
{ 3, s_7_3, -1, 1, 0}
static const struct among a_7[4] = {
{ 4, s_7_0, 0, 1, 0},
{ 1, s_7_1, 0, 2, 0},
{ 1, s_7_2, 0, 3, 0},
{ 3, s_7_3, 0, 1, 0}
};
static const unsigned char g_v[] = { 35, 130, 34, 18 };
static const symbol s_0[] = { 0xC5 };
static int r_mark_regions(struct SN_env * z) {
z->I[1] = z->l;
z->I[0] = z->l;
{ int c1 = z->c;
((SN_local *)z)->i_pV = z->l;
((SN_local *)z)->i_p2 = z->l;
{
int v_1 = z->c;
{
int ret = out_grouping(z, g_v, 192, 220, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[1] = z->c;
((SN_local *)z)->i_pV = z->c;
{
int ret = in_grouping(z, g_v, 192, 220, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{
int ret = out_grouping(z, g_v, 192, 220, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{
int ret = in_grouping(z, g_v, 192, 220, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[0] = z->c;
((SN_local *)z)->i_p2 = z->c;
lab0:
z->c = c1;
z->c = v_1;
}
return 1;
}
static int r_R2(struct SN_env * z) {
return z->I[0] <= z->c;
return ((SN_local *)z)->i_p2 <= z->c;
}
static int r_perfective_gerund(struct SN_env * z) {
int among_var;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((25166336 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_0, 9);
among_var = find_among_b(z, a_0, 9, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int m1 = z->l - z->c; (void)m1;
if (z->c <= z->lb || z->p[z->c - 1] != 0xC1) goto lab1;
do {
int v_1 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 0xC1) goto lab0;
z->c--;
goto lab0;
lab1:
z->c = z->l - m1;
break;
lab0:
z->c = z->l - v_1;
if (z->c <= z->lb || z->p[z->c - 1] != 0xD1) return 0;
z->c--;
}
lab0:
{ int ret = slice_del(z);
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -416,9 +401,10 @@ static int r_perfective_gerund(struct SN_env * z) {
static int r_adjective(struct SN_env * z) {
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((2271009 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
if (!find_among_b(z, a_1, 26)) return 0;
if (!find_among_b(z, a_1, 26, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -426,33 +412,37 @@ static int r_adjective(struct SN_env * z) {
static int r_adjectival(struct SN_env * z) {
int among_var;
{ int ret = r_adjective(z);
{
int ret = r_adjective(z);
if (ret <= 0) return ret;
}
{ int m1 = z->l - z->c; (void)m1;
{
int v_1 = z->l - z->c;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((671113216 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->c = z->l - m1; goto lab0; }
among_var = find_among_b(z, a_2, 8);
if (!among_var) { z->c = z->l - m1; goto lab0; }
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((671113216 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->c = z->l - v_1; goto lab0; }
among_var = find_among_b(z, a_2, 8, 0);
if (!among_var) { z->c = z->l - v_1; goto lab0; }
z->bra = z->c;
switch (among_var) {
case 1:
{ int m2 = z->l - z->c; (void)m2;
if (z->c <= z->lb || z->p[z->c - 1] != 0xC1) goto lab2;
do {
int v_2 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 0xC1) goto lab1;
z->c--;
goto lab1;
lab2:
z->c = z->l - m2;
if (z->c <= z->lb || z->p[z->c - 1] != 0xD1) { z->c = z->l - m1; goto lab0; }
break;
lab1:
z->c = z->l - v_2;
if (z->c <= z->lb || z->p[z->c - 1] != 0xD1) { z->c = z->l - v_1; goto lab0; }
z->c--;
}
lab1:
{ int ret = slice_del(z);
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -466,9 +456,10 @@ static int r_adjectival(struct SN_env * z) {
static int r_reflexive(struct SN_env * z) {
z->ket = z->c;
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 209 && z->p[z->c - 1] != 216)) return 0;
if (!find_among_b(z, a_3, 2)) return 0;
if (!find_among_b(z, a_3, 2, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -478,27 +469,29 @@ static int r_verb(struct SN_env * z) {
int among_var;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((51443235 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_4, 46);
among_var = find_among_b(z, a_4, 46, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int m1 = z->l - z->c; (void)m1;
if (z->c <= z->lb || z->p[z->c - 1] != 0xC1) goto lab1;
do {
int v_1 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 0xC1) goto lab0;
z->c--;
goto lab0;
lab1:
z->c = z->l - m1;
break;
lab0:
z->c = z->l - v_1;
if (z->c <= z->lb || z->p[z->c - 1] != 0xD1) return 0;
z->c--;
}
lab0:
{ int ret = slice_del(z);
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -509,9 +502,10 @@ static int r_verb(struct SN_env * z) {
static int r_noun(struct SN_env * z) {
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((60991267 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
if (!find_among_b(z, a_5, 36)) return 0;
if (!find_among_b(z, a_5, 36, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -520,12 +514,14 @@ static int r_noun(struct SN_env * z) {
static int r_derivational(struct SN_env * z) {
z->ket = z->c;
if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 212 && z->p[z->c - 1] != 216)) return 0;
if (!find_among_b(z, a_6, 2)) return 0;
if (!find_among_b(z, a_6, 2, 0)) return 0;
z->bra = z->c;
{ int ret = r_R2(z);
{
int ret = r_R2(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -535,12 +531,13 @@ static int r_tidy_up(struct SN_env * z) {
int among_var;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((151011360 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_7, 4);
among_var = find_among_b(z, a_7, 4, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->ket = z->c;
@ -549,19 +546,22 @@ static int r_tidy_up(struct SN_env * z) {
z->bra = z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 0xCE) return 0;
z->c--;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (z->c <= z->lb || z->p[z->c - 1] != 0xCE) return 0;
z->c--;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -570,116 +570,138 @@ static int r_tidy_up(struct SN_env * z) {
}
extern int russian_KOI8_R_stem(struct SN_env * z) {
{ int c1 = z->c;
while(1) {
int c2 = z->c;
while(1) {
int c3 = z->c;
{
int v_1 = z->c;
while (1) {
int v_2 = z->c;
while (1) {
int v_3 = z->c;
z->bra = z->c;
if (z->c == z->l || z->p[z->c] != 0xA3) goto lab2;
z->c++;
z->ket = z->c;
z->c = c3;
z->c = v_3;
break;
lab2:
z->c = c3;
z->c = v_3;
if (z->c >= z->l) goto lab1;
z->c++;
}
{ int ret = slice_from_s(z, 1, s_0);
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
continue;
lab1:
z->c = c2;
z->c = v_2;
break;
}
z->c = c1;
z->c = v_1;
}
{ int ret = r_mark_regions(z);
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->lb = z->c; z->c = z->l;
{ int mlimit4;
if (z->c < z->I[1]) return 0;
mlimit4 = z->lb; z->lb = z->I[1];
{ int m5 = z->l - z->c; (void)m5;
{ int m6 = z->l - z->c; (void)m6;
{ int ret = r_perfective_gerund(z);
if (ret == 0) goto lab5;
{
int v_4;
if (z->c < ((SN_local *)z)->i_pV) return 0;
v_4 = z->lb; z->lb = ((SN_local *)z)->i_pV;
{
int v_5 = z->l - z->c;
do {
int v_6 = z->l - z->c;
{
int ret = r_perfective_gerund(z);
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
goto lab4;
lab5:
z->c = z->l - m6;
{ int m7 = z->l - z->c; (void)m7;
{ int ret = r_reflexive(z);
if (ret == 0) { z->c = z->l - m7; goto lab6; }
break;
lab4:
z->c = z->l - v_6;
{
int v_7 = z->l - z->c;
{
int ret = r_reflexive(z);
if (ret == 0) { z->c = z->l - v_7; goto lab5; }
if (ret < 0) return ret;
}
lab6:
lab5:
;
}
{ int m8 = z->l - z->c; (void)m8;
{ int ret = r_adjectival(z);
if (ret == 0) goto lab8;
do {
int v_8 = z->l - z->c;
{
int ret = r_adjectival(z);
if (ret == 0) goto lab6;
if (ret < 0) return ret;
}
goto lab7;
lab8:
z->c = z->l - m8;
{ int ret = r_verb(z);
if (ret == 0) goto lab9;
break;
lab6:
z->c = z->l - v_8;
{
int ret = r_verb(z);
if (ret == 0) goto lab7;
if (ret < 0) return ret;
}
goto lab7;
lab9:
z->c = z->l - m8;
{ int ret = r_noun(z);
break;
lab7:
z->c = z->l - v_8;
{
int ret = r_noun(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
}
lab7:
;
}
lab4:
} while (0);
} while (0);
lab3:
z->c = z->l - m5;
z->c = z->l - v_5;
}
{ int m9 = z->l - z->c; (void)m9;
{
int v_9 = z->l - z->c;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 0xC9) { z->c = z->l - m9; goto lab10; }
if (z->c <= z->lb || z->p[z->c - 1] != 0xC9) { z->c = z->l - v_9; goto lab8; }
z->c--;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab10:
lab8:
;
}
{ int m10 = z->l - z->c; (void)m10;
{ int ret = r_derivational(z);
{
int v_10 = z->l - z->c;
{
int ret = r_derivational(z);
if (ret < 0) return ret;
}
z->c = z->l - m10;
z->c = z->l - v_10;
}
{ int m11 = z->l - z->c; (void)m11;
{ int ret = r_tidy_up(z);
{
int v_11 = z->l - z->c;
{
int ret = r_tidy_up(z);
if (ret < 0) return ret;
}
z->c = z->l - m11;
z->c = z->l - v_11;
}
z->lb = mlimit4;
z->lb = v_4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * russian_KOI8_R_create_env(void) { return SN_create_env(0, 2); }
extern struct SN_env * russian_KOI8_R_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p2 = 0;
((SN_local *)z)->i_pV = 0;
}
return z;
}
extern void russian_KOI8_R_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void russian_KOI8_R_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,18 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from armenian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_UTF_8_armenian.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p2;
int i_pV;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,24 +21,15 @@ extern int armenian_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_ending(struct SN_env * z);
static int r_noun(struct SN_env * z);
static int r_verb(struct SN_env * z);
static int r_adjective(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * armenian_UTF_8_create_env(void);
extern void armenian_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[6] = { 0xD5, 0xA2, 0xD5, 0xA1, 0xD6, 0x80 };
static const symbol s_0_1[8] = { 0xD6, 0x80, 0xD5, 0xB8, 0xD6, 0x80, 0xD5, 0xA4 };
static const symbol s_0_2[10] = { 0xD5, 0xA5, 0xD6, 0x80, 0xD5, 0xB8, 0xD6, 0x80, 0xD5, 0xA4 };
@ -50,32 +53,30 @@ static const symbol s_0_19[4] = { 0xD5, 0xAB, 0xD5, 0xBE };
static const symbol s_0_20[4] = { 0xD5, 0xA1, 0xD5, 0xBF };
static const symbol s_0_21[8] = { 0xD5, 0xA1, 0xD5, 0xBE, 0xD5, 0xA5, 0xD5, 0xBF };
static const symbol s_0_22[6] = { 0xD5, 0xAF, 0xD5, 0xB8, 0xD5, 0xBF };
static const struct among a_0[23] =
{
{ 6, s_0_0, -1, 1, 0},
{ 8, s_0_1, -1, 1, 0},
{ 10, s_0_2, 1, 1, 0},
{ 6, s_0_3, -1, 1, 0},
{ 6, s_0_4, -1, 1, 0},
{ 8, s_0_5, -1, 1, 0},
{ 4, s_0_6, -1, 1, 0},
{ 8, s_0_7, -1, 1, 0},
{ 8, s_0_8, -1, 1, 0},
{ 8, s_0_9, -1, 1, 0},
{ 4, s_0_10, -1, 1, 0},
{ 8, s_0_11, 10, 1, 0},
{ 8, s_0_12, 10, 1, 0},
{ 8, s_0_13, -1, 1, 0},
{ 4, s_0_14, -1, 1, 0},
{ 6, s_0_15, 14, 1, 0},
{ 8, s_0_16, 14, 1, 0},
{ 8, s_0_17, -1, 1, 0},
{ 6, s_0_18, -1, 1, 0},
{ 4, s_0_19, -1, 1, 0},
{ 4, s_0_20, -1, 1, 0},
{ 8, s_0_21, -1, 1, 0},
{ 6, s_0_22, -1, 1, 0}
static const struct among a_0[23] = {
{ 6, s_0_0, 0, 1, 0},
{ 8, s_0_1, 0, 1, 0},
{ 10, s_0_2, -1, 1, 0},
{ 6, s_0_3, 0, 1, 0},
{ 6, s_0_4, 0, 1, 0},
{ 8, s_0_5, 0, 1, 0},
{ 4, s_0_6, 0, 1, 0},
{ 8, s_0_7, 0, 1, 0},
{ 8, s_0_8, 0, 1, 0},
{ 8, s_0_9, 0, 1, 0},
{ 4, s_0_10, 0, 1, 0},
{ 8, s_0_11, -1, 1, 0},
{ 8, s_0_12, -2, 1, 0},
{ 8, s_0_13, 0, 1, 0},
{ 4, s_0_14, 0, 1, 0},
{ 6, s_0_15, -1, 1, 0},
{ 8, s_0_16, -2, 1, 0},
{ 8, s_0_17, 0, 1, 0},
{ 6, s_0_18, 0, 1, 0},
{ 4, s_0_19, 0, 1, 0},
{ 4, s_0_20, 0, 1, 0},
{ 8, s_0_21, 0, 1, 0},
{ 6, s_0_22, 0, 1, 0}
};
static const symbol s_1_0[4] = { 0xD5, 0xA1, 0xD6, 0x80 };
@ -149,80 +150,78 @@ static const symbol s_1_67[8] = { 0xD5, 0xA1, 0xD6, 0x81, 0xD5, 0xA1, 0xD5, 0xBE
static const symbol s_1_68[8] = { 0xD5, 0xA5, 0xD6, 0x81, 0xD5, 0xA1, 0xD5, 0xBE };
static const symbol s_1_69[8] = { 0xD5, 0xA1, 0xD5, 0xAC, 0xD5, 0xB8, 0xD5, 0xBE };
static const symbol s_1_70[8] = { 0xD5, 0xA5, 0xD5, 0xAC, 0xD5, 0xB8, 0xD5, 0xBE };
static const struct among a_1[71] =
{
{ 4, s_1_0, -1, 1, 0},
{ 8, s_1_1, 0, 1, 0},
{ 8, s_1_2, 0, 1, 0},
{ 10, s_1_3, -1, 1, 0},
{ 8, s_1_4, -1, 1, 0},
{ 8, s_1_5, -1, 1, 0},
{ 10, s_1_6, 5, 1, 0},
{ 10, s_1_7, -1, 1, 0},
{ 10, s_1_8, -1, 1, 0},
{ 4, s_1_9, -1, 1, 0},
{ 4, s_1_10, -1, 1, 0},
{ 10, s_1_11, 10, 1, 0},
{ 8, s_1_12, -1, 1, 0},
{ 8, s_1_13, -1, 1, 0},
{ 4, s_1_14, -1, 1, 0},
{ 6, s_1_15, 14, 1, 0},
{ 8, s_1_16, 15, 1, 0},
{ 10, s_1_17, -1, 1, 0},
{ 8, s_1_18, -1, 1, 0},
{ 8, s_1_19, -1, 1, 0},
{ 10, s_1_20, 19, 1, 0},
{ 6, s_1_21, -1, 1, 0},
{ 8, s_1_22, 21, 1, 0},
{ 10, s_1_23, 22, 1, 0},
{ 12, s_1_24, -1, 1, 0},
{ 10, s_1_25, -1, 1, 0},
{ 10, s_1_26, -1, 1, 0},
{ 12, s_1_27, 26, 1, 0},
{ 2, s_1_28, -1, 1, 0},
{ 6, s_1_29, 28, 1, 0},
{ 6, s_1_30, 28, 1, 0},
{ 4, s_1_31, -1, 1, 0},
{ 8, s_1_32, -1, 1, 0},
{ 6, s_1_33, -1, 1, 0},
{ 6, s_1_34, -1, 1, 0},
{ 8, s_1_35, 34, 1, 0},
{ 4, s_1_36, -1, 1, 0},
{ 6, s_1_37, 36, 1, 0},
{ 10, s_1_38, 36, 1, 0},
{ 8, s_1_39, 36, 1, 0},
{ 8, s_1_40, 36, 1, 0},
{ 4, s_1_41, -1, 1, 0},
{ 6, s_1_42, 41, 1, 0},
{ 6, s_1_43, 41, 1, 0},
{ 8, s_1_44, 43, 1, 0},
{ 10, s_1_45, 44, 1, 0},
{ 6, s_1_46, 41, 1, 0},
{ 6, s_1_47, 41, 1, 0},
{ 10, s_1_48, 47, 1, 0},
{ 10, s_1_49, 47, 1, 0},
{ 6, s_1_50, 41, 1, 0},
{ 8, s_1_51, 50, 1, 0},
{ 8, s_1_52, 50, 1, 0},
{ 10, s_1_53, 52, 1, 0},
{ 6, s_1_54, -1, 1, 0},
{ 6, s_1_55, -1, 1, 0},
{ 8, s_1_56, 55, 1, 0},
{ 4, s_1_57, -1, 1, 0},
{ 6, s_1_58, 57, 1, 0},
{ 8, s_1_59, 58, 1, 0},
{ 10, s_1_60, -1, 1, 0},
{ 8, s_1_61, -1, 1, 0},
{ 8, s_1_62, -1, 1, 0},
{ 10, s_1_63, 62, 1, 0},
{ 8, s_1_64, -1, 1, 0},
{ 8, s_1_65, -1, 1, 0},
{ 4, s_1_66, -1, 1, 0},
{ 8, s_1_67, 66, 1, 0},
{ 8, s_1_68, 66, 1, 0},
{ 8, s_1_69, -1, 1, 0},
{ 8, s_1_70, -1, 1, 0}
static const struct among a_1[71] = {
{ 4, s_1_0, 0, 1, 0},
{ 8, s_1_1, -1, 1, 0},
{ 8, s_1_2, -2, 1, 0},
{ 10, s_1_3, 0, 1, 0},
{ 8, s_1_4, 0, 1, 0},
{ 8, s_1_5, 0, 1, 0},
{ 10, s_1_6, -1, 1, 0},
{ 10, s_1_7, 0, 1, 0},
{ 10, s_1_8, 0, 1, 0},
{ 4, s_1_9, 0, 1, 0},
{ 4, s_1_10, 0, 1, 0},
{ 10, s_1_11, -1, 1, 0},
{ 8, s_1_12, 0, 1, 0},
{ 8, s_1_13, 0, 1, 0},
{ 4, s_1_14, 0, 1, 0},
{ 6, s_1_15, -1, 1, 0},
{ 8, s_1_16, -1, 1, 0},
{ 10, s_1_17, 0, 1, 0},
{ 8, s_1_18, 0, 1, 0},
{ 8, s_1_19, 0, 1, 0},
{ 10, s_1_20, -1, 1, 0},
{ 6, s_1_21, 0, 1, 0},
{ 8, s_1_22, -1, 1, 0},
{ 10, s_1_23, -1, 1, 0},
{ 12, s_1_24, 0, 1, 0},
{ 10, s_1_25, 0, 1, 0},
{ 10, s_1_26, 0, 1, 0},
{ 12, s_1_27, -1, 1, 0},
{ 2, s_1_28, 0, 1, 0},
{ 6, s_1_29, -1, 1, 0},
{ 6, s_1_30, -2, 1, 0},
{ 4, s_1_31, 0, 1, 0},
{ 8, s_1_32, 0, 1, 0},
{ 6, s_1_33, 0, 1, 0},
{ 6, s_1_34, 0, 1, 0},
{ 8, s_1_35, -1, 1, 0},
{ 4, s_1_36, 0, 1, 0},
{ 6, s_1_37, -1, 1, 0},
{ 10, s_1_38, -2, 1, 0},
{ 8, s_1_39, -3, 1, 0},
{ 8, s_1_40, -4, 1, 0},
{ 4, s_1_41, 0, 1, 0},
{ 6, s_1_42, -1, 1, 0},
{ 6, s_1_43, -2, 1, 0},
{ 8, s_1_44, -1, 1, 0},
{ 10, s_1_45, -1, 1, 0},
{ 6, s_1_46, -5, 1, 0},
{ 6, s_1_47, -6, 1, 0},
{ 10, s_1_48, -1, 1, 0},
{ 10, s_1_49, -2, 1, 0},
{ 6, s_1_50, -9, 1, 0},
{ 8, s_1_51, -1, 1, 0},
{ 8, s_1_52, -2, 1, 0},
{ 10, s_1_53, -1, 1, 0},
{ 6, s_1_54, 0, 1, 0},
{ 6, s_1_55, 0, 1, 0},
{ 8, s_1_56, -1, 1, 0},
{ 4, s_1_57, 0, 1, 0},
{ 6, s_1_58, -1, 1, 0},
{ 8, s_1_59, -1, 1, 0},
{ 10, s_1_60, 0, 1, 0},
{ 8, s_1_61, 0, 1, 0},
{ 8, s_1_62, 0, 1, 0},
{ 10, s_1_63, -1, 1, 0},
{ 8, s_1_64, 0, 1, 0},
{ 8, s_1_65, 0, 1, 0},
{ 4, s_1_66, 0, 1, 0},
{ 8, s_1_67, -1, 1, 0},
{ 8, s_1_68, -2, 1, 0},
{ 8, s_1_69, 0, 1, 0},
{ 8, s_1_70, 0, 1, 0}
};
static const symbol s_2_0[6] = { 0xD5, 0xA3, 0xD5, 0xA1, 0xD6, 0x80 };
@ -265,49 +264,47 @@ static const symbol s_2_36[6] = { 0xD5, 0xA1, 0xD5, 0xAE, 0xD5, 0xB8 };
static const symbol s_2_37[4] = { 0xD5, 0xAB, 0xD5, 0xB9 };
static const symbol s_2_38[6] = { 0xD5, 0xB8, 0xD6, 0x82, 0xD5, 0xBD };
static const symbol s_2_39[8] = { 0xD5, 0xB8, 0xD6, 0x82, 0xD5, 0xBD, 0xD5, 0xBF };
static const struct among a_2[40] =
{
{ 6, s_2_0, -1, 1, 0},
{ 6, s_2_1, -1, 1, 0},
{ 8, s_2_2, 1, 1, 0},
{ 8, s_2_3, -1, 1, 0},
{ 4, s_2_4, -1, 1, 0},
{ 4, s_2_5, -1, 1, 0},
{ 2, s_2_6, -1, 1, 0},
{ 6, s_2_7, 6, 1, 0},
{ 6, s_2_8, 6, 1, 0},
{ 4, s_2_9, 6, 1, 0},
{ 8, s_2_10, 9, 1, 0},
{ 8, s_2_11, 9, 1, 0},
{ 8, s_2_12, 6, 1, 0},
{ 8, s_2_13, 6, 1, 0},
{ 8, s_2_14, 6, 1, 0},
{ 10, s_2_15, 14, 1, 0},
{ 6, s_2_16, 6, 1, 0},
{ 6, s_2_17, 6, 1, 0},
{ 6, s_2_18, 6, 1, 0},
{ 6, s_2_19, -1, 1, 0},
{ 8, s_2_20, -1, 1, 0},
{ 4, s_2_21, -1, 1, 0},
{ 8, s_2_22, -1, 1, 0},
{ 4, s_2_23, -1, 1, 0},
{ 6, s_2_24, -1, 1, 0},
{ 4, s_2_25, -1, 1, 0},
{ 6, s_2_26, 25, 1, 0},
{ 8, s_2_27, 25, 1, 0},
{ 4, s_2_28, -1, 1, 0},
{ 8, s_2_29, -1, 1, 0},
{ 14, s_2_30, 29, 1, 0},
{ 4, s_2_31, -1, 1, 0},
{ 8, s_2_32, 31, 1, 0},
{ 6, s_2_33, 31, 1, 0},
{ 8, s_2_34, 31, 1, 0},
{ 8, s_2_35, -1, 1, 0},
{ 6, s_2_36, -1, 1, 0},
{ 4, s_2_37, -1, 1, 0},
{ 6, s_2_38, -1, 1, 0},
{ 8, s_2_39, -1, 1, 0}
static const struct among a_2[40] = {
{ 6, s_2_0, 0, 1, 0},
{ 6, s_2_1, 0, 1, 0},
{ 8, s_2_2, -1, 1, 0},
{ 8, s_2_3, 0, 1, 0},
{ 4, s_2_4, 0, 1, 0},
{ 4, s_2_5, 0, 1, 0},
{ 2, s_2_6, 0, 1, 0},
{ 6, s_2_7, -1, 1, 0},
{ 6, s_2_8, -2, 1, 0},
{ 4, s_2_9, -3, 1, 0},
{ 8, s_2_10, -1, 1, 0},
{ 8, s_2_11, -2, 1, 0},
{ 8, s_2_12, -6, 1, 0},
{ 8, s_2_13, -7, 1, 0},
{ 8, s_2_14, -8, 1, 0},
{ 10, s_2_15, -1, 1, 0},
{ 6, s_2_16, -10, 1, 0},
{ 6, s_2_17, -11, 1, 0},
{ 6, s_2_18, -12, 1, 0},
{ 6, s_2_19, 0, 1, 0},
{ 8, s_2_20, 0, 1, 0},
{ 4, s_2_21, 0, 1, 0},
{ 8, s_2_22, 0, 1, 0},
{ 4, s_2_23, 0, 1, 0},
{ 6, s_2_24, 0, 1, 0},
{ 4, s_2_25, 0, 1, 0},
{ 6, s_2_26, -1, 1, 0},
{ 8, s_2_27, -2, 1, 0},
{ 4, s_2_28, 0, 1, 0},
{ 8, s_2_29, 0, 1, 0},
{ 14, s_2_30, -1, 1, 0},
{ 4, s_2_31, 0, 1, 0},
{ 8, s_2_32, -1, 1, 0},
{ 6, s_2_33, -2, 1, 0},
{ 8, s_2_34, -3, 1, 0},
{ 8, s_2_35, 0, 1, 0},
{ 6, s_2_36, 0, 1, 0},
{ 4, s_2_37, 0, 1, 0},
{ 6, s_2_38, 0, 1, 0},
{ 8, s_2_39, 0, 1, 0}
};
static const symbol s_3_0[4] = { 0xD5, 0xA5, 0xD6, 0x80 };
@ -367,116 +364,111 @@ static const symbol s_3_53[8] = { 0xD5, 0xA5, 0xD6, 0x80, 0xD5, 0xB8, 0xD5, 0xBE
static const symbol s_3_54[10] = { 0xD5, 0xB6, 0xD5, 0xA5, 0xD6, 0x80, 0xD5, 0xB8, 0xD5, 0xBE };
static const symbol s_3_55[8] = { 0xD5, 0xA1, 0xD5, 0xB6, 0xD5, 0xB8, 0xD5, 0xBE };
static const symbol s_3_56[6] = { 0xD5, 0xBE, 0xD5, 0xB8, 0xD5, 0xBE };
static const struct among a_3[57] =
{
{ 4, s_3_0, -1, 1, 0},
{ 6, s_3_1, 0, 1, 0},
{ 2, s_3_2, -1, 1, 0},
{ 6, s_3_3, 2, 1, 0},
{ 4, s_3_4, 2, 1, 0},
{ 8, s_3_5, 4, 1, 0},
{ 10, s_3_6, 5, 1, 0},
{ 6, s_3_7, 4, 1, 0},
{ 10, s_3_8, 4, 1, 0},
{ 8, s_3_9, 4, 1, 0},
{ 6, s_3_10, 4, 1, 0},
{ 4, s_3_11, 2, 1, 0},
{ 4, s_3_12, -1, 1, 0},
{ 4, s_3_13, -1, 1, 0},
{ 6, s_3_14, -1, 1, 0},
{ 2, s_3_15, -1, 1, 0},
{ 6, s_3_16, 15, 1, 0},
{ 8, s_3_17, 16, 1, 0},
{ 6, s_3_18, 15, 1, 0},
{ 6, s_3_19, 15, 1, 0},
{ 14, s_3_20, 19, 1, 0},
{ 8, s_3_21, 19, 1, 0},
{ 6, s_3_22, 15, 1, 0},
{ 2, s_3_23, -1, 1, 0},
{ 6, s_3_24, 23, 1, 0},
{ 8, s_3_25, 24, 1, 0},
{ 6, s_3_26, 23, 1, 0},
{ 14, s_3_27, 26, 1, 0},
{ 8, s_3_28, 26, 1, 0},
{ 6, s_3_29, 23, 1, 0},
{ 2, s_3_30, -1, 1, 0},
{ 6, s_3_31, 30, 1, 0},
{ 8, s_3_32, 31, 1, 0},
{ 4, s_3_33, 30, 1, 0},
{ 10, s_3_34, -1, 1, 0},
{ 12, s_3_35, 34, 1, 0},
{ 10, s_3_36, -1, 1, 0},
{ 2, s_3_37, -1, 1, 0},
{ 6, s_3_38, 37, 1, 0},
{ 8, s_3_39, 38, 1, 0},
{ 6, s_3_40, 37, 1, 0},
{ 4, s_3_41, 37, 1, 0},
{ 12, s_3_42, 41, 1, 0},
{ 6, s_3_43, 41, 1, 0},
{ 4, s_3_44, 37, 1, 0},
{ 8, s_3_45, 44, 1, 0},
{ 10, s_3_46, 45, 1, 0},
{ 14, s_3_47, 37, 1, 0},
{ 4, s_3_48, -1, 1, 0},
{ 14, s_3_49, -1, 1, 0},
{ 8, s_3_50, -1, 1, 0},
{ 6, s_3_51, -1, 1, 0},
{ 4, s_3_52, -1, 1, 0},
{ 8, s_3_53, 52, 1, 0},
{ 10, s_3_54, 53, 1, 0},
{ 8, s_3_55, 52, 1, 0},
{ 6, s_3_56, 52, 1, 0}
static const struct among a_3[57] = {
{ 4, s_3_0, 0, 1, 0},
{ 6, s_3_1, -1, 1, 0},
{ 2, s_3_2, 0, 1, 0},
{ 6, s_3_3, -1, 1, 0},
{ 4, s_3_4, -2, 1, 0},
{ 8, s_3_5, -1, 1, 0},
{ 10, s_3_6, -1, 1, 0},
{ 6, s_3_7, -3, 1, 0},
{ 10, s_3_8, -4, 1, 0},
{ 8, s_3_9, -5, 1, 0},
{ 6, s_3_10, -6, 1, 0},
{ 4, s_3_11, -9, 1, 0},
{ 4, s_3_12, 0, 1, 0},
{ 4, s_3_13, 0, 1, 0},
{ 6, s_3_14, 0, 1, 0},
{ 2, s_3_15, 0, 1, 0},
{ 6, s_3_16, -1, 1, 0},
{ 8, s_3_17, -1, 1, 0},
{ 6, s_3_18, -3, 1, 0},
{ 6, s_3_19, -4, 1, 0},
{ 14, s_3_20, -1, 1, 0},
{ 8, s_3_21, -2, 1, 0},
{ 6, s_3_22, -7, 1, 0},
{ 2, s_3_23, 0, 1, 0},
{ 6, s_3_24, -1, 1, 0},
{ 8, s_3_25, -1, 1, 0},
{ 6, s_3_26, -3, 1, 0},
{ 14, s_3_27, -1, 1, 0},
{ 8, s_3_28, -2, 1, 0},
{ 6, s_3_29, -6, 1, 0},
{ 2, s_3_30, 0, 1, 0},
{ 6, s_3_31, -1, 1, 0},
{ 8, s_3_32, -1, 1, 0},
{ 4, s_3_33, -3, 1, 0},
{ 10, s_3_34, 0, 1, 0},
{ 12, s_3_35, -1, 1, 0},
{ 10, s_3_36, 0, 1, 0},
{ 2, s_3_37, 0, 1, 0},
{ 6, s_3_38, -1, 1, 0},
{ 8, s_3_39, -1, 1, 0},
{ 6, s_3_40, -3, 1, 0},
{ 4, s_3_41, -4, 1, 0},
{ 12, s_3_42, -1, 1, 0},
{ 6, s_3_43, -2, 1, 0},
{ 4, s_3_44, -7, 1, 0},
{ 8, s_3_45, -1, 1, 0},
{ 10, s_3_46, -1, 1, 0},
{ 14, s_3_47, -10, 1, 0},
{ 4, s_3_48, 0, 1, 0},
{ 14, s_3_49, 0, 1, 0},
{ 8, s_3_50, 0, 1, 0},
{ 6, s_3_51, 0, 1, 0},
{ 4, s_3_52, 0, 1, 0},
{ 8, s_3_53, -1, 1, 0},
{ 10, s_3_54, -1, 1, 0},
{ 8, s_3_55, -3, 1, 0},
{ 6, s_3_56, -4, 1, 0}
};
static const unsigned char g_v[] = { 209, 4, 128, 0, 18 };
static int r_mark_regions(struct SN_env * z) {
z->I[1] = z->l;
z->I[0] = z->l;
{ int c1 = z->c;
((SN_local *)z)->i_pV = z->l;
((SN_local *)z)->i_p2 = z->l;
{
int v_1 = z->c;
{
int ret = out_grouping_U(z, g_v, 1377, 1413, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[1] = z->c;
((SN_local *)z)->i_pV = z->c;
{
int ret = in_grouping_U(z, g_v, 1377, 1413, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{
int ret = out_grouping_U(z, g_v, 1377, 1413, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{
int ret = in_grouping_U(z, g_v, 1377, 1413, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[0] = z->c;
((SN_local *)z)->i_p2 = z->c;
lab0:
z->c = c1;
z->c = v_1;
}
return 1;
}
static int r_R2(struct SN_env * z) {
return z->I[0] <= z->c;
return ((SN_local *)z)->i_p2 <= z->c;
}
static int r_adjective(struct SN_env * z) {
z->ket = z->c;
if (!find_among_b(z, a_0, 23)) return 0;
if (!find_among_b(z, a_0, 23, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -484,9 +476,10 @@ static int r_adjective(struct SN_env * z) {
static int r_verb(struct SN_env * z) {
z->ket = z->c;
if (!find_among_b(z, a_1, 71)) return 0;
if (!find_among_b(z, a_1, 71, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -494,9 +487,10 @@ static int r_verb(struct SN_env * z) {
static int r_noun(struct SN_env * z) {
z->ket = z->c;
if (!find_among_b(z, a_2, 40)) return 0;
if (!find_among_b(z, a_2, 40, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -504,59 +498,77 @@ static int r_noun(struct SN_env * z) {
static int r_ending(struct SN_env * z) {
z->ket = z->c;
if (!find_among_b(z, a_3, 57)) return 0;
if (!find_among_b(z, a_3, 57, 0)) return 0;
z->bra = z->c;
{ int ret = r_R2(z);
{
int ret = r_R2(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
extern int armenian_UTF_8_stem(struct SN_env * z) {
{ int ret = r_mark_regions(z);
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->lb = z->c; z->c = z->l;
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{ int m2 = z->l - z->c; (void)m2;
{ int ret = r_ending(z);
{
int v_1;
if (z->c < ((SN_local *)z)->i_pV) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_pV;
{
int v_2 = z->l - z->c;
{
int ret = r_ending(z);
if (ret < 0) return ret;
}
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_verb(z);
{
int v_3 = z->l - z->c;
{
int ret = r_verb(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_adjective(z);
{
int v_4 = z->l - z->c;
{
int ret = r_adjective(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
{ int m5 = z->l - z->c; (void)m5;
{ int ret = r_noun(z);
{
int v_5 = z->l - z->c;
{
int ret = r_noun(z);
if (ret < 0) return ret;
}
z->c = z->l - m5;
z->c = z->l - v_5;
}
z->lb = mlimit1;
z->lb = v_1;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * armenian_UTF_8_create_env(void) { return SN_create_env(0, 2); }
extern struct SN_env * armenian_UTF_8_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p2 = 0;
((SN_local *)z)->i_pV = 0;
}
return z;
}
extern void armenian_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void armenian_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,18 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from danish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_UTF_8_danish.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p1;
symbol * s_ch;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,23 +21,17 @@ extern int danish_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_undouble(struct SN_env * z);
static int r_other_suffix(struct SN_env * z);
static int r_consonant_pair(struct SN_env * z);
static int r_main_suffix(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static const symbol s_0[] = { 's', 't' };
static const symbol s_1[] = { 'i', 'g' };
static const symbol s_2[] = { 'l', 0xC3, 0xB8, 's' };
extern struct SN_env * danish_UTF_8_create_env(void);
extern void danish_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[3] = { 'h', 'e', 'd' };
static const symbol s_0_1[5] = { 'e', 't', 'h', 'e', 'd' };
static const symbol s_0_2[4] = { 'e', 'r', 'e', 'd' };
@ -58,54 +64,50 @@ static const symbol s_0_28[3] = { 'e', 't', 's' };
static const symbol s_0_29[5] = { 'e', 'r', 'e', 't', 's' };
static const symbol s_0_30[2] = { 'e', 't' };
static const symbol s_0_31[4] = { 'e', 'r', 'e', 't' };
static const struct among a_0[32] =
{
{ 3, s_0_0, -1, 1, 0},
{ 5, s_0_1, 0, 1, 0},
{ 4, s_0_2, -1, 1, 0},
{ 1, s_0_3, -1, 1, 0},
{ 5, s_0_4, 3, 1, 0},
{ 4, s_0_5, 3, 1, 0},
{ 6, s_0_6, 5, 1, 0},
{ 3, s_0_7, 3, 1, 0},
{ 4, s_0_8, 3, 1, 0},
{ 3, s_0_9, 3, 1, 0},
{ 2, s_0_10, -1, 1, 0},
{ 5, s_0_11, 10, 1, 0},
{ 4, s_0_12, 10, 1, 0},
{ 2, s_0_13, -1, 1, 0},
{ 5, s_0_14, 13, 1, 0},
{ 4, s_0_15, 13, 1, 0},
{ 1, s_0_16, -1, 2, 0},
{ 4, s_0_17, 16, 1, 0},
{ 2, s_0_18, 16, 1, 0},
{ 5, s_0_19, 18, 1, 0},
{ 7, s_0_20, 19, 1, 0},
{ 4, s_0_21, 18, 1, 0},
{ 5, s_0_22, 18, 1, 0},
{ 4, s_0_23, 18, 1, 0},
{ 3, s_0_24, 16, 1, 0},
{ 6, s_0_25, 24, 1, 0},
{ 5, s_0_26, 24, 1, 0},
{ 3, s_0_27, 16, 1, 0},
{ 3, s_0_28, 16, 1, 0},
{ 5, s_0_29, 28, 1, 0},
{ 2, s_0_30, -1, 1, 0},
{ 4, s_0_31, 30, 1, 0}
static const struct among a_0[32] = {
{ 3, s_0_0, 0, 1, 0},
{ 5, s_0_1, -1, 1, 0},
{ 4, s_0_2, 0, 1, 0},
{ 1, s_0_3, 0, 1, 0},
{ 5, s_0_4, -1, 1, 0},
{ 4, s_0_5, -2, 1, 0},
{ 6, s_0_6, -1, 1, 0},
{ 3, s_0_7, -4, 1, 0},
{ 4, s_0_8, -5, 1, 0},
{ 3, s_0_9, -6, 1, 0},
{ 2, s_0_10, 0, 1, 0},
{ 5, s_0_11, -1, 1, 0},
{ 4, s_0_12, -2, 1, 0},
{ 2, s_0_13, 0, 1, 0},
{ 5, s_0_14, -1, 1, 0},
{ 4, s_0_15, -2, 1, 0},
{ 1, s_0_16, 0, 2, 0},
{ 4, s_0_17, -1, 1, 0},
{ 2, s_0_18, -2, 1, 0},
{ 5, s_0_19, -1, 1, 0},
{ 7, s_0_20, -1, 1, 0},
{ 4, s_0_21, -3, 1, 0},
{ 5, s_0_22, -4, 1, 0},
{ 4, s_0_23, -5, 1, 0},
{ 3, s_0_24, -8, 1, 0},
{ 6, s_0_25, -1, 1, 0},
{ 5, s_0_26, -2, 1, 0},
{ 3, s_0_27, -11, 1, 0},
{ 3, s_0_28, -12, 1, 0},
{ 5, s_0_29, -1, 1, 0},
{ 2, s_0_30, 0, 1, 0},
{ 4, s_0_31, -1, 1, 0}
};
static const symbol s_1_0[2] = { 'g', 'd' };
static const symbol s_1_1[2] = { 'd', 't' };
static const symbol s_1_2[2] = { 'g', 't' };
static const symbol s_1_3[2] = { 'k', 't' };
static const struct among a_1[4] =
{
{ 2, s_1_0, -1, -1, 0},
{ 2, s_1_1, -1, -1, 0},
{ 2, s_1_2, -1, -1, 0},
{ 2, s_1_3, -1, -1, 0}
static const struct among a_1[4] = {
{ 2, s_1_0, 0, -1, 0},
{ 2, s_1_1, 0, -1, 0},
{ 2, s_1_2, 0, -1, 0},
{ 2, s_1_3, 0, -1, 0}
};
static const symbol s_2_0[2] = { 'i', 'g' };
@ -113,14 +115,12 @@ static const symbol s_2_1[3] = { 'l', 'i', 'g' };
static const symbol s_2_2[4] = { 'e', 'l', 'i', 'g' };
static const symbol s_2_3[3] = { 'e', 'l', 's' };
static const symbol s_2_4[5] = { 'l', 0xC3, 0xB8, 's', 't' };
static const struct among a_2[5] =
{
{ 2, s_2_0, -1, 1, 0},
{ 3, s_2_1, 0, 1, 0},
{ 4, s_2_2, 1, 1, 0},
{ 3, s_2_3, -1, 1, 0},
{ 5, s_2_4, -1, 2, 0}
static const struct among a_2[5] = {
{ 2, s_2_0, 0, 1, 0},
{ 3, s_2_1, -1, 1, 0},
{ 4, s_2_2, -1, 1, 0},
{ 3, s_2_3, 0, 1, 0},
{ 5, s_2_4, 0, 2, 0}
};
static const unsigned char g_c[] = { 119, 223, 119, 1 };
@ -129,58 +129,60 @@ static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
static const unsigned char g_s_ending[] = { 239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 };
static const symbol s_0[] = { 's', 't' };
static const symbol s_1[] = { 'i', 'g' };
static const symbol s_2[] = { 'l', 0xC3, 0xB8, 's' };
static int r_mark_regions(struct SN_env * z) {
z->I[1] = z->l;
{ int c_test1 = z->c;
{ int ret = skip_utf8(z->p, z->c, z->l, 3);
int i_x;
((SN_local *)z)->i_p1 = z->l;
{
int v_1 = z->c;
{
int ret = skip_utf8(z->p, z->c, z->l, 3);
if (ret < 0) return 0;
z->c = ret;
}
z->I[0] = z->c;
z->c = c_test1;
i_x = z->c;
z->c = v_1;
}
{
int ret = out_grouping_U(z, g_v, 97, 248, 1);
if (ret < 0) return 0;
z->c += ret;
}
if (out_grouping_U(z, g_v, 97, 248, 1) < 0) return 0;
{
int ret = in_grouping_U(z, g_v, 97, 248, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c;
if (z->I[1] >= z->I[0]) goto lab0;
z->I[1] = z->I[0];
((SN_local *)z)->i_p1 = z->c;
if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
((SN_local *)z)->i_p1 = i_x;
lab0:
return 1;
}
static int r_main_suffix(struct SN_env * z) {
int among_var;
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
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; }
among_var = find_among_b(z, a_0, 32);
if (!among_var) { z->lb = mlimit1; return 0; }
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851440 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
among_var = find_among_b(z, a_0, 32, 0);
if (!among_var) { z->lb = v_1; return 0; }
z->bra = z->c;
z->lb = mlimit1;
z->lb = v_1;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b_U(z, g_s_ending, 97, 229, 0)) return 0;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -189,25 +191,28 @@ static int r_main_suffix(struct SN_env * z) {
}
static int r_consonant_pair(struct SN_env * z) {
{ int m_test1 = z->l - z->c;
{ int mlimit2;
if (z->c < z->I[1]) return 0;
mlimit2 = z->lb; z->lb = z->I[1];
{
int v_1 = z->l - z->c;
{
int v_2;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_2 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit2; return 0; }
if (!find_among_b(z, a_1, 4)) { z->lb = mlimit2; return 0; }
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = v_2; return 0; }
if (!find_among_b(z, a_1, 4, 0)) { z->lb = v_2; return 0; }
z->bra = z->c;
z->lb = mlimit2;
z->lb = v_2;
}
z->c = z->l - m_test1;
z->c = z->l - v_1;
}
{ int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
{
int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
if (ret < 0) return 0;
z->c = ret;
}
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -215,42 +220,48 @@ static int r_consonant_pair(struct SN_env * z) {
static int r_other_suffix(struct SN_env * z) {
int among_var;
{ int m1 = z->l - z->c; (void)m1;
{
int v_1 = z->l - z->c;
z->ket = z->c;
if (!(eq_s_b(z, 2, s_0))) goto lab0;
z->bra = z->c;
if (!(eq_s_b(z, 2, s_1))) goto lab0;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab0:
z->c = z->l - m1;
z->c = z->l - v_1;
}
{ int mlimit2;
if (z->c < z->I[1]) return 0;
mlimit2 = z->lb; z->lb = z->I[1];
{
int v_2;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_2 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
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; }
among_var = find_among_b(z, a_2, 5);
if (!among_var) { z->lb = mlimit2; return 0; }
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_2; return 0; }
among_var = find_among_b(z, a_2, 5, 0);
if (!among_var) { z->lb = v_2; return 0; }
z->bra = z->c;
z->lb = mlimit2;
z->lb = v_2;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_consonant_pair(z);
{
int v_3 = z->l - z->c;
{
int ret = r_consonant_pair(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
break;
case 2:
{ int ret = slice_from_s(z, 4, s_2);
{
int ret = slice_from_s(z, 4, s_2);
if (ret < 0) return ret;
}
break;
@ -259,62 +270,91 @@ static int r_other_suffix(struct SN_env * z) {
}
static int r_undouble(struct SN_env * z) {
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (in_grouping_b_U(z, g_c, 98, 122, 0)) { z->lb = mlimit1; return 0; }
if (in_grouping_b_U(z, g_c, 98, 122, 0)) { z->lb = v_1; return 0; }
z->bra = z->c;
z->S[0] = slice_to(z, z->S[0]);
if (z->S[0] == 0) return -1;
z->lb = mlimit1;
{
int ret = slice_to(z, &((SN_local *)z)->s_ch);
if (ret < 0) return ret;
}
z->lb = v_1;
}
if (!(eq_v_b(z, z->S[0]))) return 0;
{ int ret = slice_del(z);
if (!(eq_v_b(z, ((SN_local *)z)->s_ch))) return 0;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
extern int danish_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c;
{ int ret = r_mark_regions(z);
{
int v_1 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = c1;
z->c = v_1;
}
z->lb = z->c; z->c = z->l;
{ int m2 = z->l - z->c; (void)m2;
{ int ret = r_main_suffix(z);
{
int v_2 = z->l - z->c;
{
int ret = r_main_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_consonant_pair(z);
{
int v_3 = z->l - z->c;
{
int ret = r_consonant_pair(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_other_suffix(z);
{
int v_4 = z->l - z->c;
{
int ret = r_other_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
{ int m5 = z->l - z->c; (void)m5;
{ int ret = r_undouble(z);
{
int v_5 = z->l - z->c;
{
int ret = r_undouble(z);
if (ret < 0) return ret;
}
z->c = z->l - m5;
z->c = z->l - v_5;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * danish_UTF_8_create_env(void) { return SN_create_env(1, 2); }
extern struct SN_env * danish_UTF_8_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p1 = 0;
((SN_local *)z)->s_ch = NULL;
extern void danish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 1); }
if ((((SN_local *)z)->s_ch = create_s()) == NULL) {
danish_UTF_8_close_env(z);
return NULL;
}
}
return z;
}
extern void danish_UTF_8_close_env(struct SN_env * z) {
if (z) {
lose_s(((SN_local *)z)->s_ch);
}
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,680 @@
/* Generated from dutch_porter.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "stem_UTF_8_dutch_porter.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p2;
int i_p1;
unsigned char b_e_found;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
#endif
extern int dutch_porter_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_standard_suffix(struct SN_env * z);
static int r_undouble(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_R1(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
static int r_en_ending(struct SN_env * z);
static int r_e_ending(struct SN_env * z);
static int r_postlude(struct SN_env * z);
static int r_prelude(struct SN_env * z);
static const symbol s_0[] = { 'a' };
static const symbol s_1[] = { 'e' };
static const symbol s_2[] = { 'i' };
static const symbol s_3[] = { 'o' };
static const symbol s_4[] = { 'u' };
static const symbol s_5[] = { 'Y' };
static const symbol s_6[] = { 'I' };
static const symbol s_7[] = { 'Y' };
static const symbol s_8[] = { 'y' };
static const symbol s_9[] = { 'i' };
static const symbol s_10[] = { 'g', 'e', 'm' };
static const symbol s_11[] = { 'h', 'e', 'i', 'd' };
static const symbol s_12[] = { 'h', 'e', 'i', 'd' };
static const symbol s_13[] = { 'e', 'n' };
static const symbol s_14[] = { 'i', 'g' };
static const symbol s_0_1[2] = { 0xC3, 0xA1 };
static const symbol s_0_2[2] = { 0xC3, 0xA4 };
static const symbol s_0_3[2] = { 0xC3, 0xA9 };
static const symbol s_0_4[2] = { 0xC3, 0xAB };
static const symbol s_0_5[2] = { 0xC3, 0xAD };
static const symbol s_0_6[2] = { 0xC3, 0xAF };
static const symbol s_0_7[2] = { 0xC3, 0xB3 };
static const symbol s_0_8[2] = { 0xC3, 0xB6 };
static const symbol s_0_9[2] = { 0xC3, 0xBA };
static const symbol s_0_10[2] = { 0xC3, 0xBC };
static const struct among a_0[11] = {
{ 0, 0, 0, 6, 0},
{ 2, s_0_1, -1, 1, 0},
{ 2, s_0_2, -2, 1, 0},
{ 2, s_0_3, -3, 2, 0},
{ 2, s_0_4, -4, 2, 0},
{ 2, s_0_5, -5, 3, 0},
{ 2, s_0_6, -6, 3, 0},
{ 2, s_0_7, -7, 4, 0},
{ 2, s_0_8, -8, 4, 0},
{ 2, s_0_9, -9, 5, 0},
{ 2, s_0_10, -10, 5, 0}
};
static const symbol s_1_1[1] = { 'I' };
static const symbol s_1_2[1] = { 'Y' };
static const struct among a_1[3] = {
{ 0, 0, 0, 3, 0},
{ 1, s_1_1, -1, 2, 0},
{ 1, s_1_2, -2, 1, 0}
};
static const symbol s_2_0[2] = { 'd', 'd' };
static const symbol s_2_1[2] = { 'k', 'k' };
static const symbol s_2_2[2] = { 't', 't' };
static const struct among a_2[3] = {
{ 2, s_2_0, 0, -1, 0},
{ 2, s_2_1, 0, -1, 0},
{ 2, s_2_2, 0, -1, 0}
};
static const symbol s_3_0[3] = { 'e', 'n', 'e' };
static const symbol s_3_1[2] = { 's', 'e' };
static const symbol s_3_2[2] = { 'e', 'n' };
static const symbol s_3_3[5] = { 'h', 'e', 'd', 'e', 'n' };
static const symbol s_3_4[1] = { 's' };
static const struct among a_3[5] = {
{ 3, s_3_0, 0, 2, 0},
{ 2, s_3_1, 0, 3, 0},
{ 2, s_3_2, 0, 2, 0},
{ 5, s_3_3, -1, 1, 0},
{ 1, s_3_4, 0, 3, 0}
};
static const symbol s_4_0[3] = { 'e', 'n', 'd' };
static const symbol s_4_1[2] = { 'i', 'g' };
static const symbol s_4_2[3] = { 'i', 'n', 'g' };
static const symbol s_4_3[4] = { 'l', 'i', 'j', 'k' };
static const symbol s_4_4[4] = { 'b', 'a', 'a', 'r' };
static const symbol s_4_5[3] = { 'b', 'a', 'r' };
static const struct among a_4[6] = {
{ 3, s_4_0, 0, 1, 0},
{ 2, s_4_1, 0, 2, 0},
{ 3, s_4_2, 0, 1, 0},
{ 4, s_4_3, 0, 3, 0},
{ 4, s_4_4, 0, 4, 0},
{ 3, s_4_5, 0, 5, 0}
};
static const symbol s_5_0[2] = { 'a', 'a' };
static const symbol s_5_1[2] = { 'e', 'e' };
static const symbol s_5_2[2] = { 'o', 'o' };
static const symbol s_5_3[2] = { 'u', 'u' };
static const struct among a_5[4] = {
{ 2, s_5_0, 0, -1, 0},
{ 2, s_5_1, 0, -1, 0},
{ 2, s_5_2, 0, -1, 0},
{ 2, s_5_3, 0, -1, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
static const unsigned char g_v_I[] = { 1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
static const unsigned char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
static int r_prelude(struct SN_env * z) {
int among_var;
{
int v_1 = z->c;
while (1) {
int v_2 = z->c;
z->bra = z->c;
if (z->c + 1 >= z->l || z->p[z->c + 1] >> 5 != 5 || !((340306450 >> (z->p[z->c + 1] & 0x1f)) & 1)) among_var = 6; else
among_var = find_among(z, a_0, 11, 0);
z->ket = z->c;
switch (among_var) {
case 1:
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 1, s_1);
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = slice_from_s(z, 1, s_2);
if (ret < 0) return ret;
}
break;
case 4:
{
int ret = slice_from_s(z, 1, s_3);
if (ret < 0) return ret;
}
break;
case 5:
{
int ret = slice_from_s(z, 1, s_4);
if (ret < 0) return ret;
}
break;
case 6:
{
int ret = skip_utf8(z->p, z->c, z->l, 1);
if (ret < 0) goto lab0;
z->c = ret;
}
break;
}
continue;
lab0:
z->c = v_2;
break;
}
z->c = v_1;
}
{
int v_3 = z->c;
z->bra = z->c;
if (z->c == z->l || z->p[z->c] != 'y') { z->c = v_3; goto lab1; }
z->c++;
z->ket = z->c;
{
int ret = slice_from_s(z, 1, s_5);
if (ret < 0) return ret;
}
lab1:
;
}
while (1) {
int v_4 = z->c;
{
int ret = out_grouping_U(z, g_v, 97, 232, 1);
if (ret < 0) goto lab2;
z->c += ret;
}
{
int v_5 = z->c;
z->bra = z->c;
do {
int v_6 = z->c;
if (z->c == z->l || z->p[z->c] != 'i') goto lab4;
z->c++;
z->ket = z->c;
{
int v_7 = z->c;
if (in_grouping_U(z, g_v, 97, 232, 0)) goto lab5;
{
int ret = slice_from_s(z, 1, s_6);
if (ret < 0) return ret;
}
lab5:
z->c = v_7;
}
break;
lab4:
z->c = v_6;
if (z->c == z->l || z->p[z->c] != 'y') { z->c = v_5; goto lab3; }
z->c++;
z->ket = z->c;
{
int ret = slice_from_s(z, 1, s_7);
if (ret < 0) return ret;
}
} while (0);
lab3:
;
}
continue;
lab2:
z->c = v_4;
break;
}
return 1;
}
static int r_mark_regions(struct SN_env * z) {
int i_x;
((SN_local *)z)->i_p1 = z->l;
((SN_local *)z)->i_p2 = z->l;
{
int v_1 = z->c;
{
int ret = skip_utf8(z->p, z->c, z->l, 3);
if (ret < 0) return 0;
z->c = ret;
}
i_x = z->c;
z->c = v_1;
}
{
int ret = out_grouping_U(z, g_v, 97, 232, 1);
if (ret < 0) return 0;
z->c += ret;
}
{
int ret = in_grouping_U(z, g_v, 97, 232, 1);
if (ret < 0) return 0;
z->c += ret;
}
((SN_local *)z)->i_p1 = z->c;
if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
((SN_local *)z)->i_p1 = i_x;
lab0:
{
int ret = out_grouping_U(z, g_v, 97, 232, 1);
if (ret < 0) return 0;
z->c += ret;
}
{
int ret = in_grouping_U(z, g_v, 97, 232, 1);
if (ret < 0) return 0;
z->c += ret;
}
((SN_local *)z)->i_p2 = z->c;
return 1;
}
static int r_postlude(struct SN_env * z) {
int among_var;
while (1) {
int v_1 = z->c;
z->bra = z->c;
if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
among_var = find_among(z, a_1, 3, 0);
z->ket = z->c;
switch (among_var) {
case 1:
{
int ret = slice_from_s(z, 1, s_8);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 1, s_9);
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = skip_utf8(z->p, z->c, z->l, 1);
if (ret < 0) goto lab0;
z->c = ret;
}
break;
}
continue;
lab0:
z->c = v_1;
break;
}
return 1;
}
static int r_R1(struct SN_env * z) {
return ((SN_local *)z)->i_p1 <= z->c;
}
static int r_R2(struct SN_env * z) {
return ((SN_local *)z)->i_p2 <= z->c;
}
static int r_undouble(struct SN_env * z) {
{
int v_1 = z->l - z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
if (!find_among_b(z, a_2, 3, 0)) return 0;
z->c = z->l - v_1;
}
z->ket = z->c;
{
int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
if (ret < 0) return 0;
z->c = ret;
}
z->bra = z->c;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
static int r_e_ending(struct SN_env * z) {
((SN_local *)z)->b_e_found = 0;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') return 0;
z->c--;
z->bra = z->c;
{
int ret = r_R1(z);
if (ret <= 0) return ret;
}
{
int v_1 = z->l - z->c;
if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
z->c = z->l - v_1;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
((SN_local *)z)->b_e_found = 1;
return r_undouble(z);
}
static int r_en_ending(struct SN_env * z) {
{
int ret = r_R1(z);
if (ret <= 0) return ret;
}
{
int v_1 = z->l - z->c;
if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
z->c = z->l - v_1;
{
int v_2 = z->l - z->c;
if (!(eq_s_b(z, 3, s_10))) goto lab0;
return 0;
lab0:
z->c = z->l - v_2;
}
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return r_undouble(z);
}
static int r_standard_suffix(struct SN_env * z) {
int among_var;
{
int v_1 = z->l - z->c;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
among_var = find_among_b(z, a_3, 5, 0);
if (!among_var) goto lab0;
z->bra = z->c;
switch (among_var) {
case 1:
{
int ret = r_R1(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
{
int ret = slice_from_s(z, 4, s_11);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = r_en_ending(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = r_R1(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
if (out_grouping_b_U(z, g_v_j, 97, 232, 0)) goto lab0;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
}
lab0:
z->c = z->l - v_1;
}
{
int v_2 = z->l - z->c;
{
int ret = r_e_ending(z);
if (ret < 0) return ret;
}
z->c = z->l - v_2;
}
{
int v_3 = z->l - z->c;
z->ket = z->c;
if (!(eq_s_b(z, 4, s_12))) goto lab1;
z->bra = z->c;
{
int ret = r_R2(z);
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
{
int v_4 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'c') goto lab2;
z->c--;
goto lab1;
lab2:
z->c = z->l - v_4;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->ket = z->c;
if (!(eq_s_b(z, 2, s_13))) goto lab1;
z->bra = z->c;
{
int ret = r_en_ending(z);
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - v_3;
}
{
int v_5 = z->l - z->c;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
among_var = find_among_b(z, a_4, 6, 0);
if (!among_var) goto lab3;
z->bra = z->c;
switch (among_var) {
case 1:
{
int ret = r_R2(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
do {
int v_6 = z->l - z->c;
z->ket = z->c;
if (!(eq_s_b(z, 2, s_14))) goto lab4;
z->bra = z->c;
{
int ret = r_R2(z);
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
{
int v_7 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab5;
z->c--;
goto lab4;
lab5:
z->c = z->l - v_7;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
lab4:
z->c = z->l - v_6;
{
int ret = r_undouble(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
} while (0);
break;
case 2:
{
int ret = r_R2(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
{
int v_8 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab6;
z->c--;
goto lab3;
lab6:
z->c = z->l - v_8;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = r_R2(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{
int ret = r_e_ending(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
break;
case 4:
{
int ret = r_R2(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 5:
{
int ret = r_R2(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
if (!((SN_local *)z)->b_e_found) goto lab3;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
}
lab3:
z->c = z->l - v_5;
}
{
int v_9 = z->l - z->c;
if (out_grouping_b_U(z, g_v_I, 73, 232, 0)) goto lab7;
{
int v_10 = z->l - z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab7;
if (!find_among_b(z, a_5, 4, 0)) goto lab7;
if (out_grouping_b_U(z, g_v, 97, 232, 0)) goto lab7;
z->c = z->l - v_10;
}
z->ket = z->c;
{
int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
if (ret < 0) goto lab7;
z->c = ret;
}
z->bra = z->c;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab7:
z->c = z->l - v_9;
}
return 1;
}
extern int dutch_porter_UTF_8_stem(struct SN_env * z) {
{
int v_1 = z->c;
{
int ret = r_prelude(z);
if (ret < 0) return ret;
}
z->c = v_1;
}
{
int v_2 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = v_2;
}
z->lb = z->c; z->c = z->l;
{
int ret = r_standard_suffix(z);
if (ret < 0) return ret;
}
z->c = z->lb;
{
int v_3 = z->c;
{
int ret = r_postlude(z);
if (ret < 0) return ret;
}
z->c = v_3;
}
return 1;
}
extern struct SN_env * dutch_porter_UTF_8_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p2 = 0;
((SN_local *)z)->i_p1 = 0;
((SN_local *)z)->b_e_found = 0;
}
return z;
}
extern void dutch_porter_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,820 @@
/* Generated from esperanto.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "stem_UTF_8_esperanto.h"
#include <stddef.h>
#include "snowball_runtime.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int esperanto_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_uninflected(struct SN_env * z);
static int r_ujn_suffix(struct SN_env * z);
static int r_standard_suffix(struct SN_env * z);
static int r_pronoun(struct SN_env * z);
static int r_merged_numeral(struct SN_env * z);
static int r_long_word(struct SN_env * z);
static int r_initial_apostrophe(struct SN_env * z);
static int r_final_apostrophe(struct SN_env * z);
static int r_correlative(struct SN_env * z);
static int r_canonical_form(struct SN_env * z);
static const symbol s_0[] = { 0xC4, 0x89 };
static const symbol s_1[] = { 0xC4, 0x9D };
static const symbol s_2[] = { 0xC4, 0xA5 };
static const symbol s_3[] = { 0xC4, 0xB5 };
static const symbol s_4[] = { 0xC5, 0x9D };
static const symbol s_5[] = { 0xC5, 0xAD };
static const symbol s_6[] = { 'a' };
static const symbol s_7[] = { 'e' };
static const symbol s_8[] = { 'i' };
static const symbol s_9[] = { 'o' };
static const symbol s_10[] = { 'u' };
static const symbol s_11[] = { 's', 't' };
static const symbol s_12[] = { 'e' };
static const symbol s_13[] = { 'a' };
static const symbol s_14[] = { 'u', 'n' };
static const symbol s_15[] = { 'u' };
static const symbol s_16[] = { 'a', 0xC5, 0xAD };
static const symbol s_17[] = { 'o' };
static const symbol s_0_1[1] = { '-' };
static const symbol s_0_2[2] = { 'c', 'x' };
static const symbol s_0_3[2] = { 'g', 'x' };
static const symbol s_0_4[2] = { 'h', 'x' };
static const symbol s_0_5[2] = { 'j', 'x' };
static const symbol s_0_6[1] = { 'q' };
static const symbol s_0_7[2] = { 's', 'x' };
static const symbol s_0_8[2] = { 'u', 'x' };
static const symbol s_0_9[1] = { 'w' };
static const symbol s_0_10[1] = { 'x' };
static const symbol s_0_11[1] = { 'y' };
static const symbol s_0_12[2] = { 0xC3, 0xA1 };
static const symbol s_0_13[2] = { 0xC3, 0xA9 };
static const symbol s_0_14[2] = { 0xC3, 0xAD };
static const symbol s_0_15[2] = { 0xC3, 0xB3 };
static const symbol s_0_16[2] = { 0xC3, 0xBA };
static const struct among a_0[17] = {
{ 0, 0, 0, 14, 0},
{ 1, s_0_1, -1, 13, 0},
{ 2, s_0_2, -2, 1, 0},
{ 2, s_0_3, -3, 2, 0},
{ 2, s_0_4, -4, 3, 0},
{ 2, s_0_5, -5, 4, 0},
{ 1, s_0_6, -6, 12, 0},
{ 2, s_0_7, -7, 5, 0},
{ 2, s_0_8, -8, 6, 0},
{ 1, s_0_9, -9, 12, 0},
{ 1, s_0_10, -10, 12, 0},
{ 1, s_0_11, -11, 12, 0},
{ 2, s_0_12, -12, 7, 0},
{ 2, s_0_13, -13, 8, 0},
{ 2, s_0_14, -14, 9, 0},
{ 2, s_0_15, -15, 10, 0},
{ 2, s_0_16, -16, 11, 0}
};
static const symbol s_1_0[2] = { 'a', 's' };
static const symbol s_1_1[1] = { 'i' };
static const symbol s_1_2[2] = { 'i', 's' };
static const symbol s_1_3[2] = { 'o', 's' };
static const symbol s_1_4[1] = { 'u' };
static const symbol s_1_5[2] = { 'u', 's' };
static const struct among a_1[6] = {
{ 2, s_1_0, 0, -1, 0},
{ 1, s_1_1, 0, -1, 0},
{ 2, s_1_2, -1, -1, 0},
{ 2, s_1_3, 0, -1, 0},
{ 1, s_1_4, 0, -1, 0},
{ 2, s_1_5, -1, -1, 0}
};
static const symbol s_2_0[2] = { 'c', 'i' };
static const symbol s_2_1[2] = { 'g', 'i' };
static const symbol s_2_2[2] = { 'h', 'i' };
static const symbol s_2_3[2] = { 'l', 'i' };
static const symbol s_2_4[3] = { 'i', 'l', 'i' };
static const symbol s_2_5[4] = { 0xC5, 0x9D, 'l', 'i' };
static const symbol s_2_6[2] = { 'm', 'i' };
static const symbol s_2_7[2] = { 'n', 'i' };
static const symbol s_2_8[3] = { 'o', 'n', 'i' };
static const symbol s_2_9[2] = { 'r', 'i' };
static const symbol s_2_10[2] = { 's', 'i' };
static const symbol s_2_11[2] = { 'v', 'i' };
static const symbol s_2_12[3] = { 'i', 'v', 'i' };
static const symbol s_2_13[3] = { 0xC4, 0x9D, 'i' };
static const symbol s_2_14[3] = { 0xC5, 0x9D, 'i' };
static const symbol s_2_15[4] = { 'i', 0xC5, 0x9D, 'i' };
static const symbol s_2_16[6] = { 'm', 'a', 'l', 0xC5, 0x9D, 'i' };
static const struct among a_2[17] = {
{ 2, s_2_0, 0, -1, 0},
{ 2, s_2_1, 0, -1, 0},
{ 2, s_2_2, 0, -1, 0},
{ 2, s_2_3, 0, -1, 0},
{ 3, s_2_4, -1, -1, 0},
{ 4, s_2_5, -2, -1, 0},
{ 2, s_2_6, 0, -1, 0},
{ 2, s_2_7, 0, -1, 0},
{ 3, s_2_8, -1, -1, 0},
{ 2, s_2_9, 0, -1, 0},
{ 2, s_2_10, 0, -1, 0},
{ 2, s_2_11, 0, -1, 0},
{ 3, s_2_12, -1, -1, 0},
{ 3, s_2_13, 0, -1, 0},
{ 3, s_2_14, 0, -1, 0},
{ 4, s_2_15, -1, -1, 0},
{ 6, s_2_16, -2, -1, 0}
};
static const symbol s_3_0[3] = { 'a', 'm', 'b' };
static const symbol s_3_1[4] = { 'b', 'a', 'l', 'd' };
static const symbol s_3_2[7] = { 'm', 'a', 'l', 'b', 'a', 'l', 'd' };
static const symbol s_3_3[4] = { 'm', 'o', 'r', 'g' };
static const symbol s_3_4[8] = { 'p', 'o', 's', 't', 'm', 'o', 'r', 'g' };
static const symbol s_3_5[3] = { 'a', 'd', 'i' };
static const symbol s_3_6[4] = { 'h', 'o', 'd', 'i' };
static const symbol s_3_7[3] = { 'a', 'n', 'k' };
static const symbol s_3_8[5] = { 0xC4, 0x89, 'i', 'r', 'k' };
static const symbol s_3_9[8] = { 't', 'u', 't', 0xC4, 0x89, 'i', 'r', 'k' };
static const symbol s_3_10[5] = { 'p', 'r', 'e', 's', 'k' };
static const symbol s_3_11[5] = { 'a', 'l', 'm', 'e', 'n' };
static const symbol s_3_12[4] = { 'a', 'p', 'e', 'n' };
static const symbol s_3_13[4] = { 'h', 'i', 'e', 'r' };
static const symbol s_3_14[10] = { 'a', 'n', 't', 'a', 0xC5, 0xAD, 'h', 'i', 'e', 'r' };
static const symbol s_3_15[5] = { 'm', 'a', 'l', 'g', 'r' };
static const symbol s_3_16[5] = { 'a', 'n', 'k', 'o', 'r' };
static const symbol s_3_17[5] = { 'k', 'o', 'n', 't', 'r' };
static const symbol s_3_18[6] = { 'a', 'n', 's', 't', 'a', 't' };
static const symbol s_3_19[4] = { 'k', 'v', 'a', 'z' };
static const struct among a_3[20] = {
{ 3, s_3_0, 0, -1, 0},
{ 4, s_3_1, 0, -1, 0},
{ 7, s_3_2, -1, -1, 0},
{ 4, s_3_3, 0, -1, 0},
{ 8, s_3_4, -1, -1, 0},
{ 3, s_3_5, 0, -1, 0},
{ 4, s_3_6, 0, -1, 0},
{ 3, s_3_7, 0, -1, 0},
{ 5, s_3_8, 0, -1, 0},
{ 8, s_3_9, -1, -1, 0},
{ 5, s_3_10, 0, -1, 0},
{ 5, s_3_11, 0, -1, 0},
{ 4, s_3_12, 0, -1, 0},
{ 4, s_3_13, 0, -1, 0},
{ 10, s_3_14, -1, -1, 0},
{ 5, s_3_15, 0, -1, 0},
{ 5, s_3_16, 0, -1, 0},
{ 5, s_3_17, 0, -1, 0},
{ 6, s_3_18, 0, -1, 0},
{ 4, s_3_19, 0, -1, 0}
};
static const symbol s_4_0[4] = { 'a', 'l', 'i', 'u' };
static const symbol s_4_1[3] = { 'u', 'n', 'u' };
static const struct among a_4[2] = {
{ 4, s_4_0, 0, -1, 0},
{ 3, s_4_1, 0, -1, 0}
};
static const symbol s_5_0[3] = { 'a', 'h', 'a' };
static const symbol s_5_1[4] = { 'h', 'a', 'h', 'a' };
static const symbol s_5_2[8] = { 'h', 'a', 'l', 'e', 'l', 'u', 'j', 'a' };
static const symbol s_5_3[4] = { 'h', 'o', 'l', 'a' };
static const symbol s_5_4[6] = { 'h', 'o', 's', 'a', 'n', 'a' };
static const symbol s_5_5[6] = { 'm', 'a', 'l', 't', 'r', 'a' };
static const symbol s_5_6[4] = { 'h', 'u', 'r', 'a' };
static const symbol s_5_7[6] = { 0xC4, 0xA5, 'a', 0xC4, 0xA5, 'a' };
static const symbol s_5_8[4] = { 'e', 'k', 'd', 'e' };
static const symbol s_5_9[4] = { 'e', 'l', 'd', 'e' };
static const symbol s_5_10[5] = { 'd', 'i', 's', 'd', 'e' };
static const symbol s_5_11[3] = { 'e', 'h', 'e' };
static const symbol s_5_12[6] = { 'm', 'a', 'l', 't', 'r', 'e' };
static const symbol s_5_13[9] = { 'd', 'i', 'r', 'l', 'i', 'd', 'i', 'd', 'i' };
static const symbol s_5_14[6] = { 'm', 'a', 'l', 'p', 'l', 'i' };
static const symbol s_5_15[6] = { 'm', 'a', 'l', 0xC4, 0x89, 'i' };
static const symbol s_5_16[6] = { 'm', 'a', 'l', 'k', 'a', 'j' };
static const symbol s_5_17[4] = { 'a', 'm', 'e', 'n' };
static const symbol s_5_18[5] = { 't', 'a', 'm', 'e', 'n' };
static const symbol s_5_19[3] = { 'o', 'h', 'o' };
static const symbol s_5_20[6] = { 'm', 'a', 'l', 't', 'r', 'o' };
static const symbol s_5_21[5] = { 'm', 'i', 'n', 'u', 's' };
static const symbol s_5_22[3] = { 'u', 'h', 'u' };
static const symbol s_5_23[3] = { 'm', 'u', 'u' };
static const struct among a_5[24] = {
{ 3, s_5_0, 0, -1, 0},
{ 4, s_5_1, -1, -1, 0},
{ 8, s_5_2, 0, -1, 0},
{ 4, s_5_3, 0, -1, 0},
{ 6, s_5_4, 0, -1, 0},
{ 6, s_5_5, 0, -1, 0},
{ 4, s_5_6, 0, -1, 0},
{ 6, s_5_7, 0, -1, 0},
{ 4, s_5_8, 0, -1, 0},
{ 4, s_5_9, 0, -1, 0},
{ 5, s_5_10, 0, -1, 0},
{ 3, s_5_11, 0, -1, 0},
{ 6, s_5_12, 0, -1, 0},
{ 9, s_5_13, 0, -1, 0},
{ 6, s_5_14, 0, -1, 0},
{ 6, s_5_15, 0, -1, 0},
{ 6, s_5_16, 0, -1, 0},
{ 4, s_5_17, 0, -1, 0},
{ 5, s_5_18, -1, -1, 0},
{ 3, s_5_19, 0, -1, 0},
{ 6, s_5_20, 0, -1, 0},
{ 5, s_5_21, 0, -1, 0},
{ 3, s_5_22, 0, -1, 0},
{ 3, s_5_23, 0, -1, 0}
};
static const symbol s_6_0[3] = { 't', 'r', 'i' };
static const symbol s_6_1[2] = { 'd', 'u' };
static const symbol s_6_2[3] = { 'u', 'n', 'u' };
static const struct among a_6[3] = {
{ 3, s_6_0, 0, -1, 0},
{ 2, s_6_1, 0, -1, 0},
{ 3, s_6_2, 0, -1, 0}
};
static const symbol s_7_0[3] = { 'd', 'e', 'k' };
static const symbol s_7_1[4] = { 'c', 'e', 'n', 't' };
static const struct among a_7[2] = {
{ 3, s_7_0, 0, -1, 0},
{ 4, s_7_1, 0, -1, 0}
};
static const symbol s_8_0[1] = { 'k' };
static const symbol s_8_1[4] = { 'k', 'e', 'l', 'k' };
static const symbol s_8_2[3] = { 'n', 'e', 'n' };
static const symbol s_8_3[1] = { 't' };
static const symbol s_8_4[4] = { 'm', 'u', 'l', 't' };
static const symbol s_8_5[4] = { 's', 'a', 'm', 't' };
static const symbol s_8_6[2] = { 0xC4, 0x89 };
static const struct among a_8[7] = {
{ 1, s_8_0, 0, -1, 0},
{ 4, s_8_1, -1, -1, 0},
{ 3, s_8_2, 0, -1, 0},
{ 1, s_8_3, 0, -1, 0},
{ 4, s_8_4, -1, -1, 0},
{ 4, s_8_5, -2, -1, 0},
{ 2, s_8_6, 0, -1, 0}
};
static const symbol s_9_0[1] = { 'a' };
static const symbol s_9_1[1] = { 'e' };
static const symbol s_9_2[1] = { 'i' };
static const symbol s_9_3[1] = { 'j' };
static const symbol s_9_4[2] = { 'a', 'j' };
static const symbol s_9_5[2] = { 'o', 'j' };
static const symbol s_9_6[1] = { 'n' };
static const symbol s_9_7[2] = { 'a', 'n' };
static const symbol s_9_8[2] = { 'e', 'n' };
static const symbol s_9_9[2] = { 'j', 'n' };
static const symbol s_9_10[3] = { 'a', 'j', 'n' };
static const symbol s_9_11[3] = { 'o', 'j', 'n' };
static const symbol s_9_12[2] = { 'o', 'n' };
static const symbol s_9_13[1] = { 'o' };
static const symbol s_9_14[2] = { 'a', 's' };
static const symbol s_9_15[2] = { 'i', 's' };
static const symbol s_9_16[2] = { 'o', 's' };
static const symbol s_9_17[2] = { 'u', 's' };
static const symbol s_9_18[1] = { 'u' };
static const struct among a_9[19] = {
{ 1, s_9_0, 0, -1, 0},
{ 1, s_9_1, 0, -1, 0},
{ 1, s_9_2, 0, -1, 0},
{ 1, s_9_3, 0, 1, 0},
{ 2, s_9_4, -1, -1, 0},
{ 2, s_9_5, -2, -1, 0},
{ 1, s_9_6, 0, 1, 0},
{ 2, s_9_7, -1, -1, 0},
{ 2, s_9_8, -2, -1, 0},
{ 2, s_9_9, -3, 1, 0},
{ 3, s_9_10, -1, -1, 0},
{ 3, s_9_11, -2, -1, 0},
{ 2, s_9_12, -6, -1, 0},
{ 1, s_9_13, 0, -1, 0},
{ 2, s_9_14, 0, -1, 0},
{ 2, s_9_15, 0, -1, 0},
{ 2, s_9_16, 0, -1, 0},
{ 2, s_9_17, 0, -1, 0},
{ 1, s_9_18, 0, -1, 0}
};
static const unsigned char g_vowel[] = { 17, 65, 16 };
static const unsigned char g_aou[] = { 1, 64, 16 };
static const unsigned char g_digit[] = { 255, 3 };
static int r_canonical_form(struct SN_env * z) {
int among_var;
int b_foreign;
b_foreign = 0;
while (1) {
int v_1 = z->c;
z->bra = z->c;
among_var = find_among(z, a_0, 17, 0);
z->ket = z->c;
switch (among_var) {
case 1:
{
int ret = slice_from_s(z, 2, s_0);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 2, s_1);
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = slice_from_s(z, 2, s_2);
if (ret < 0) return ret;
}
break;
case 4:
{
int ret = slice_from_s(z, 2, s_3);
if (ret < 0) return ret;
}
break;
case 5:
{
int ret = slice_from_s(z, 2, s_4);
if (ret < 0) return ret;
}
break;
case 6:
{
int ret = slice_from_s(z, 2, s_5);
if (ret < 0) return ret;
}
break;
case 7:
{
int ret = slice_from_s(z, 1, s_6);
if (ret < 0) return ret;
}
b_foreign = 1;
break;
case 8:
{
int ret = slice_from_s(z, 1, s_7);
if (ret < 0) return ret;
}
b_foreign = 1;
break;
case 9:
{
int ret = slice_from_s(z, 1, s_8);
if (ret < 0) return ret;
}
b_foreign = 1;
break;
case 10:
{
int ret = slice_from_s(z, 1, s_9);
if (ret < 0) return ret;
}
b_foreign = 1;
break;
case 11:
{
int ret = slice_from_s(z, 1, s_10);
if (ret < 0) return ret;
}
b_foreign = 1;
break;
case 12:
b_foreign = 1;
break;
case 13:
b_foreign = 0;
break;
case 14:
{
int ret = skip_utf8(z->p, z->c, z->l, 1);
if (ret < 0) goto lab0;
z->c = ret;
}
break;
}
continue;
lab0:
z->c = v_1;
break;
}
return !b_foreign;
}
static int r_initial_apostrophe(struct SN_env * z) {
z->bra = z->c;
if (z->c == z->l || z->p[z->c] != '\'') return 0;
z->c++;
z->ket = z->c;
if (!(eq_s(z, 2, s_11))) return 0;
if (z->c >= z->l || z->p[z->c + 0] >> 5 != 3 || !((2130434 >> (z->p[z->c + 0] & 0x1f)) & 1)) return 0;
if (!find_among(z, a_1, 6, 0)) return 0;
if (z->c < z->l) return 0;
{
int ret = slice_from_s(z, 1, s_12);
if (ret < 0) return ret;
}
return 1;
}
static int r_pronoun(struct SN_env * z) {
z->ket = z->c;
{
int v_1 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'n') { z->c = z->l - v_1; goto lab0; }
z->c--;
lab0:
;
}
z->bra = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] != 105) return 0;
if (!find_among_b(z, a_2, 17, 0)) return 0;
do {
int v_2 = z->l - z->c;
if (z->c > z->lb) goto lab1;
break;
lab1:
z->c = z->l - v_2;
if (z->c <= z->lb || z->p[z->c - 1] != '-') return 0;
z->c--;
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
static int r_final_apostrophe(struct SN_env * z) {
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] != '\'') return 0;
z->c--;
z->bra = z->c;
do {
int v_1 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'l') goto lab0;
z->c--;
if (z->c > z->lb) goto lab0;
{
int ret = slice_from_s(z, 1, s_13);
if (ret < 0) return ret;
}
break;
lab0:
z->c = z->l - v_1;
if (!(eq_s_b(z, 2, s_14))) goto lab1;
if (z->c > z->lb) goto lab1;
{
int ret = slice_from_s(z, 1, s_15);
if (ret < 0) return ret;
}
break;
lab1:
z->c = z->l - v_1;
if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((68438676 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
if (!find_among_b(z, a_3, 20, 0)) goto lab2;
do {
int v_2 = z->l - z->c;
if (z->c > z->lb) goto lab3;
break;
lab3:
z->c = z->l - v_2;
if (z->c <= z->lb || z->p[z->c - 1] != '-') goto lab2;
z->c--;
} while (0);
{
int ret = slice_from_s(z, 3, s_16);
if (ret < 0) return ret;
}
break;
lab2:
z->c = z->l - v_1;
{
int ret = slice_from_s(z, 1, s_17);
if (ret < 0) return ret;
}
} while (0);
return 1;
}
static int r_ujn_suffix(struct SN_env * z) {
z->ket = z->c;
{
int v_1 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'n') { z->c = z->l - v_1; goto lab0; }
z->c--;
lab0:
;
}
{
int v_2 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'j') { z->c = z->l - v_2; goto lab1; }
z->c--;
lab1:
;
}
z->bra = z->c;
if (z->c - 2 <= z->lb || z->p[z->c - 1] != 117) return 0;
if (!find_among_b(z, a_4, 2, 0)) return 0;
do {
int v_3 = z->l - z->c;
if (z->c > z->lb) goto lab2;
break;
lab2:
z->c = z->l - v_3;
if (z->c <= z->lb || z->p[z->c - 1] != '-') return 0;
z->c--;
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
static int r_uninflected(struct SN_env * z) {
if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2672162 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
if (!find_among_b(z, a_5, 24, 0)) return 0;
do {
int v_1 = z->l - z->c;
if (z->c > z->lb) goto lab0;
break;
lab0:
z->c = z->l - v_1;
if (z->c <= z->lb || z->p[z->c - 1] != '-') return 0;
z->c--;
} while (0);
return 1;
}
static int r_merged_numeral(struct SN_env * z) {
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 117)) return 0;
if (!find_among_b(z, a_6, 3, 0)) return 0;
if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 107 && z->p[z->c - 1] != 116)) return 0;
return find_among_b(z, a_7, 2, 0) != 0;
}
static int r_correlative(struct SN_env * z) {
z->ket = z->c;
z->bra = z->c;
{
int v_1 = z->l - z->c;
do {
int v_2 = z->l - z->c;
{
int v_3 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'n') { z->c = z->l - v_3; goto lab1; }
z->c--;
lab1:
;
}
z->bra = z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab0;
z->c--;
break;
lab0:
z->c = z->l - v_2;
{
int v_4 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'n') { z->c = z->l - v_4; goto lab2; }
z->c--;
lab2:
;
}
{
int v_5 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'j') { z->c = z->l - v_5; goto lab3; }
z->c--;
lab3:
;
}
z->bra = z->c;
if (in_grouping_b_U(z, g_aou, 97, 117, 0)) return 0;
} while (0);
if (z->c <= z->lb || z->p[z->c - 1] != 'i') return 0;
z->c--;
{
int v_6 = z->l - z->c;
if (!find_among_b(z, a_8, 7, 0)) { z->c = z->l - v_6; goto lab4; }
lab4:
;
}
do {
int v_7 = z->l - z->c;
if (z->c > z->lb) goto lab5;
break;
lab5:
z->c = z->l - v_7;
if (z->c <= z->lb || z->p[z->c - 1] != '-') return 0;
z->c--;
} while (0);
z->c = z->l - v_1;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
static int r_long_word(struct SN_env * z) {
do {
int v_1 = z->l - z->c;
{
int i; for (i = 2; i > 0; i--) {
{
int ret = out_grouping_b_U(z, g_vowel, 97, 117, 1);
if (ret < 0) goto lab0;
z->c -= ret;
}
}
}
break;
lab0:
z->c = z->l - v_1;
while (1) {
if (z->c <= z->lb || z->p[z->c - 1] != '-') goto lab2;
z->c--;
break;
lab2:
{
int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
if (ret < 0) goto lab1;
z->c = ret;
}
}
{
int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
if (ret < 0) goto lab1;
z->c = ret;
}
break;
lab1:
z->c = z->l - v_1;
{
int ret = out_grouping_b_U(z, g_digit, 48, 57, 1);
if (ret < 0) return 0;
z->c -= ret;
}
} while (0);
return 1;
}
static int r_standard_suffix(struct SN_env * z) {
int among_var;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2672162 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_9, 19, 0);
if (!among_var) return 0;
switch (among_var) {
case 1:
{
int v_1 = z->l - z->c;
do {
int v_2 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != '-') goto lab0;
z->c--;
break;
lab0:
z->c = z->l - v_2;
if (in_grouping_b_U(z, g_digit, 48, 57, 0)) return 0;
} while (0);
z->c = z->l - v_1;
}
break;
}
{
int v_3 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != '-') { z->c = z->l - v_3; goto lab1; }
z->c--;
lab1:
;
}
z->bra = z->c;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
extern int esperanto_UTF_8_stem(struct SN_env * z) {
{
int v_1 = z->c;
{
int ret = r_canonical_form(z);
if (ret <= 0) return ret;
}
z->c = v_1;
}
{
int v_2 = z->c;
{
int ret = r_initial_apostrophe(z);
if (ret < 0) return ret;
}
z->c = v_2;
}
z->lb = z->c; z->c = z->l;
{
int v_3 = z->l - z->c;
{
int ret = r_pronoun(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
return 0;
lab0:
z->c = z->l - v_3;
}
{
int v_4 = z->l - z->c;
{
int ret = r_final_apostrophe(z);
if (ret < 0) return ret;
}
z->c = z->l - v_4;
}
{
int v_5 = z->l - z->c;
{
int ret = r_correlative(z);
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
return 0;
lab1:
z->c = z->l - v_5;
}
{
int v_6 = z->l - z->c;
{
int ret = r_uninflected(z);
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
return 0;
lab2:
z->c = z->l - v_6;
}
{
int v_7 = z->l - z->c;
{
int ret = r_merged_numeral(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
return 0;
lab3:
z->c = z->l - v_7;
}
{
int v_8 = z->l - z->c;
{
int ret = r_ujn_suffix(z);
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
return 0;
lab4:
z->c = z->l - v_8;
}
{
int v_9 = z->l - z->c;
{
int ret = r_long_word(z);
if (ret <= 0) return ret;
}
z->c = z->l - v_9;
}
{
int ret = r_standard_suffix(z);
if (ret <= 0) return ret;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * esperanto_UTF_8_create_env(void) {
return SN_new_env(sizeof(struct SN_env));
}
extern void esperanto_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,18 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from german.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_UTF_8_german.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p2;
int i_p1;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,131 +21,13 @@ extern int german_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_standard_suffix(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_R1(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
static int r_postlude(struct SN_env * z);
static int r_prelude(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * german_UTF_8_create_env(void);
extern void german_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_1[2] = { 'a', 'e' };
static const symbol s_0_2[2] = { 'o', 'e' };
static const symbol s_0_3[2] = { 'q', 'u' };
static const symbol s_0_4[2] = { 'u', 'e' };
static const symbol s_0_5[2] = { 0xC3, 0x9F };
static const struct among a_0[6] =
{
{ 0, 0, -1, 5, 0},
{ 2, s_0_1, 0, 2, 0},
{ 2, s_0_2, 0, 3, 0},
{ 2, s_0_3, 0, -1, 0},
{ 2, s_0_4, 0, 4, 0},
{ 2, s_0_5, 0, 1, 0}
};
static const symbol s_1_1[1] = { 'U' };
static const symbol s_1_2[1] = { 'Y' };
static const symbol s_1_3[2] = { 0xC3, 0xA4 };
static const symbol s_1_4[2] = { 0xC3, 0xB6 };
static const symbol s_1_5[2] = { 0xC3, 0xBC };
static const struct among a_1[6] =
{
{ 0, 0, -1, 5, 0},
{ 1, s_1_1, 0, 2, 0},
{ 1, s_1_2, 0, 1, 0},
{ 2, s_1_3, 0, 3, 0},
{ 2, s_1_4, 0, 4, 0},
{ 2, s_1_5, 0, 2, 0}
};
static const symbol s_2_0[1] = { 'e' };
static const symbol s_2_1[2] = { 'e', 'm' };
static const symbol s_2_2[2] = { 'e', 'n' };
static const symbol s_2_3[7] = { 'e', 'r', 'i', 'n', 'n', 'e', 'n' };
static const symbol s_2_4[4] = { 'e', 'r', 'i', 'n' };
static const symbol s_2_5[2] = { 'l', 'n' };
static const symbol s_2_6[3] = { 'e', 'r', 'n' };
static const symbol s_2_7[2] = { 'e', 'r' };
static const symbol s_2_8[1] = { 's' };
static const symbol s_2_9[2] = { 'e', 's' };
static const symbol s_2_10[3] = { 'l', 'n', 's' };
static const struct among a_2[11] =
{
{ 1, s_2_0, -1, 3, 0},
{ 2, s_2_1, -1, 1, 0},
{ 2, s_2_2, -1, 3, 0},
{ 7, s_2_3, 2, 2, 0},
{ 4, s_2_4, -1, 2, 0},
{ 2, s_2_5, -1, 5, 0},
{ 3, s_2_6, -1, 2, 0},
{ 2, s_2_7, -1, 2, 0},
{ 1, s_2_8, -1, 4, 0},
{ 2, s_2_9, 8, 3, 0},
{ 3, s_2_10, 8, 5, 0}
};
static const symbol s_3_0[2] = { 'e', 'n' };
static const symbol s_3_1[2] = { 'e', 'r' };
static const symbol s_3_2[2] = { 's', 't' };
static const symbol s_3_3[3] = { 'e', 's', 't' };
static const struct among a_3[4] =
{
{ 2, s_3_0, -1, 1, 0},
{ 2, s_3_1, -1, 1, 0},
{ 2, s_3_2, -1, 2, 0},
{ 3, s_3_3, 2, 1, 0}
};
static const symbol s_4_0[2] = { 'i', 'g' };
static const symbol s_4_1[4] = { 'l', 'i', 'c', 'h' };
static const struct among a_4[2] =
{
{ 2, s_4_0, -1, 1, 0},
{ 4, s_4_1, -1, 1, 0}
};
static const symbol s_5_0[3] = { 'e', 'n', 'd' };
static const symbol s_5_1[2] = { 'i', 'g' };
static const symbol s_5_2[3] = { 'u', 'n', 'g' };
static const symbol s_5_3[4] = { 'l', 'i', 'c', 'h' };
static const symbol s_5_4[4] = { 'i', 's', 'c', 'h' };
static const symbol s_5_5[2] = { 'i', 'k' };
static const symbol s_5_6[4] = { 'h', 'e', 'i', 't' };
static const symbol s_5_7[4] = { 'k', 'e', 'i', 't' };
static const struct among a_5[8] =
{
{ 3, s_5_0, -1, 1, 0},
{ 2, s_5_1, -1, 2, 0},
{ 3, s_5_2, -1, 1, 0},
{ 4, s_5_3, -1, 3, 0},
{ 4, s_5_4, -1, 2, 0},
{ 2, s_5_5, -1, 2, 0},
{ 4, s_5_6, -1, 3, 0},
{ 4, s_5_7, -1, 4, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
static const unsigned char g_s_ending[] = { 117, 30, 5 };
static const unsigned char g_st_ending[] = { 117, 30, 4 };
static const symbol s_0[] = { 'U' };
static const symbol s_1[] = { 'Y' };
@ -152,166 +46,291 @@ static const symbol s_13[] = { 'i', 'g' };
static const symbol s_14[] = { 'e', 'r' };
static const symbol s_15[] = { 'e', 'n' };
static const symbol s_0_1[2] = { 'a', 'e' };
static const symbol s_0_2[2] = { 'o', 'e' };
static const symbol s_0_3[2] = { 'q', 'u' };
static const symbol s_0_4[2] = { 'u', 'e' };
static const symbol s_0_5[2] = { 0xC3, 0x9F };
static const struct among a_0[6] = {
{ 0, 0, 0, 5, 0},
{ 2, s_0_1, -1, 2, 0},
{ 2, s_0_2, -2, 3, 0},
{ 2, s_0_3, -3, -1, 0},
{ 2, s_0_4, -4, 4, 0},
{ 2, s_0_5, -5, 1, 0}
};
static const symbol s_1_1[1] = { 'U' };
static const symbol s_1_2[1] = { 'Y' };
static const symbol s_1_3[2] = { 0xC3, 0xA4 };
static const symbol s_1_4[2] = { 0xC3, 0xB6 };
static const symbol s_1_5[2] = { 0xC3, 0xBC };
static const struct among a_1[6] = {
{ 0, 0, 0, 5, 0},
{ 1, s_1_1, -1, 2, 0},
{ 1, s_1_2, -2, 1, 0},
{ 2, s_1_3, -3, 3, 0},
{ 2, s_1_4, -4, 4, 0},
{ 2, s_1_5, -5, 2, 0}
};
static const symbol s_2_0[1] = { 'e' };
static const symbol s_2_1[2] = { 'e', 'm' };
static const symbol s_2_2[2] = { 'e', 'n' };
static const symbol s_2_3[7] = { 'e', 'r', 'i', 'n', 'n', 'e', 'n' };
static const symbol s_2_4[4] = { 'e', 'r', 'i', 'n' };
static const symbol s_2_5[2] = { 'l', 'n' };
static const symbol s_2_6[3] = { 'e', 'r', 'n' };
static const symbol s_2_7[2] = { 'e', 'r' };
static const symbol s_2_8[1] = { 's' };
static const symbol s_2_9[2] = { 'e', 's' };
static const symbol s_2_10[3] = { 'l', 'n', 's' };
static const struct among a_2[11] = {
{ 1, s_2_0, 0, 3, 0},
{ 2, s_2_1, 0, 1, 0},
{ 2, s_2_2, 0, 3, 0},
{ 7, s_2_3, -1, 2, 0},
{ 4, s_2_4, 0, 2, 0},
{ 2, s_2_5, 0, 5, 0},
{ 3, s_2_6, 0, 2, 0},
{ 2, s_2_7, 0, 2, 0},
{ 1, s_2_8, 0, 4, 0},
{ 2, s_2_9, -1, 3, 0},
{ 3, s_2_10, -2, 5, 0}
};
static const symbol s_3_0[4] = { 't', 'i', 'c', 'k' };
static const symbol s_3_1[4] = { 'p', 'l', 'a', 'n' };
static const symbol s_3_2[6] = { 'g', 'e', 'o', 'r', 'd', 'n' };
static const symbol s_3_3[6] = { 'i', 'n', 't', 'e', 'r', 'n' };
static const symbol s_3_4[2] = { 't', 'r' };
static const struct among a_3[5] = {
{ 4, s_3_0, 0, -1, 0},
{ 4, s_3_1, 0, -1, 0},
{ 6, s_3_2, 0, -1, 0},
{ 6, s_3_3, 0, -1, 0},
{ 2, s_3_4, 0, -1, 0}
};
static const symbol s_4_0[2] = { 'e', 'n' };
static const symbol s_4_1[2] = { 'e', 'r' };
static const symbol s_4_2[2] = { 'e', 't' };
static const symbol s_4_3[2] = { 's', 't' };
static const symbol s_4_4[3] = { 'e', 's', 't' };
static const struct among a_4[5] = {
{ 2, s_4_0, 0, 1, 0},
{ 2, s_4_1, 0, 1, 0},
{ 2, s_4_2, 0, 3, 0},
{ 2, s_4_3, 0, 2, 0},
{ 3, s_4_4, -1, 1, 0}
};
static const symbol s_5_0[2] = { 'i', 'g' };
static const symbol s_5_1[4] = { 'l', 'i', 'c', 'h' };
static const struct among a_5[2] = {
{ 2, s_5_0, 0, 1, 0},
{ 4, s_5_1, 0, 1, 0}
};
static const symbol s_6_0[3] = { 'e', 'n', 'd' };
static const symbol s_6_1[2] = { 'i', 'g' };
static const symbol s_6_2[3] = { 'u', 'n', 'g' };
static const symbol s_6_3[4] = { 'l', 'i', 'c', 'h' };
static const symbol s_6_4[4] = { 'i', 's', 'c', 'h' };
static const symbol s_6_5[2] = { 'i', 'k' };
static const symbol s_6_6[4] = { 'h', 'e', 'i', 't' };
static const symbol s_6_7[4] = { 'k', 'e', 'i', 't' };
static const struct among a_6[8] = {
{ 3, s_6_0, 0, 1, 0},
{ 2, s_6_1, 0, 2, 0},
{ 3, s_6_2, 0, 1, 0},
{ 4, s_6_3, 0, 3, 0},
{ 4, s_6_4, 0, 2, 0},
{ 2, s_6_5, 0, 2, 0},
{ 4, s_6_6, 0, 3, 0},
{ 4, s_6_7, 0, 4, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
static const unsigned char g_et_ending[] = { 1, 128, 198, 227, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
static const unsigned char g_s_ending[] = { 117, 30, 5 };
static const unsigned char g_st_ending[] = { 117, 30, 4 };
static int r_prelude(struct SN_env * z) {
int among_var;
{ int c_test1 = z->c;
while(1) {
int c2 = z->c;
while(1) {
int c3 = z->c;
{
int v_1 = z->c;
while (1) {
int v_2 = z->c;
while (1) {
int v_3 = z->c;
if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab1;
z->bra = z->c;
{ int c4 = z->c;
if (z->c == z->l || z->p[z->c] != 'u') goto lab3;
do {
int v_4 = z->c;
if (z->c == z->l || z->p[z->c] != 'u') goto lab2;
z->c++;
z->ket = z->c;
if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab3;
{ int ret = slice_from_s(z, 1, s_0);
if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab2;
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
goto lab2;
lab3:
z->c = c4;
break;
lab2:
z->c = v_4;
if (z->c == z->l || z->p[z->c] != 'y') goto lab1;
z->c++;
z->ket = z->c;
if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab1;
{ int ret = slice_from_s(z, 1, s_1);
{
int ret = slice_from_s(z, 1, s_1);
if (ret < 0) return ret;
}
}
lab2:
z->c = c3;
} while (0);
z->c = v_3;
break;
lab1:
z->c = c3;
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
z->c = v_3;
{
int ret = skip_utf8(z->p, z->c, z->l, 1);
if (ret < 0) goto lab0;
z->c = ret;
}
}
continue;
lab0:
z->c = c2;
z->c = v_2;
break;
}
z->c = c_test1;
z->c = v_1;
}
while(1) {
int c5 = z->c;
while (1) {
int v_5 = z->c;
z->bra = z->c;
among_var = find_among(z, a_0, 6);
among_var = find_among(z, a_0, 6, 0);
z->ket = z->c;
switch (among_var) {
case 1:
{ int ret = slice_from_s(z, 2, s_2);
{
int ret = slice_from_s(z, 2, s_2);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 2, s_3);
{
int ret = slice_from_s(z, 2, s_3);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 2, s_4);
{
int ret = slice_from_s(z, 2, s_4);
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 2, s_5);
{
int ret = slice_from_s(z, 2, s_5);
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
if (ret < 0) goto lab4;
{
int ret = skip_utf8(z->p, z->c, z->l, 1);
if (ret < 0) goto lab3;
z->c = ret;
}
break;
}
continue;
lab4:
z->c = c5;
lab3:
z->c = v_5;
break;
}
return 1;
}
static int r_mark_regions(struct SN_env * z) {
z->I[2] = z->l;
z->I[1] = z->l;
{ int c_test1 = z->c;
{ int ret = skip_utf8(z->p, z->c, z->l, 3);
int i_x;
((SN_local *)z)->i_p1 = z->l;
((SN_local *)z)->i_p2 = z->l;
{
int v_1 = z->c;
{
int ret = skip_utf8(z->p, z->c, z->l, 3);
if (ret < 0) return 0;
z->c = ret;
}
z->I[0] = z->c;
z->c = c_test1;
i_x = z->c;
z->c = v_1;
}
{
int ret = out_grouping_U(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
{
int ret = in_grouping_U(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[2] = z->c;
if (z->I[2] >= z->I[0]) goto lab0;
z->I[2] = z->I[0];
((SN_local *)z)->i_p1 = z->c;
if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
((SN_local *)z)->i_p1 = i_x;
lab0:
{
int ret = out_grouping_U(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
{
int ret = in_grouping_U(z, g_v, 97, 252, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c;
((SN_local *)z)->i_p2 = z->c;
return 1;
}
static int r_postlude(struct SN_env * z) {
int among_var;
while(1) {
int c1 = z->c;
while (1) {
int v_1 = z->c;
z->bra = z->c;
among_var = find_among(z, a_1, 6);
among_var = find_among(z, a_1, 6, 0);
z->ket = z->c;
switch (among_var) {
case 1:
{ int ret = slice_from_s(z, 1, s_6);
{
int ret = slice_from_s(z, 1, s_6);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_7);
{
int ret = slice_from_s(z, 1, s_7);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 1, s_8);
{
int ret = slice_from_s(z, 1, s_8);
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 1, s_9);
{
int ret = slice_from_s(z, 1, s_9);
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
{
int ret = skip_utf8(z->p, z->c, z->l, 1);
if (ret < 0) goto lab0;
z->c = ret;
}
@ -319,60 +338,68 @@ static int r_postlude(struct SN_env * z) {
}
continue;
lab0:
z->c = c1;
z->c = v_1;
break;
}
return 1;
}
static int r_R1(struct SN_env * z) {
return z->I[2] <= z->c;
return ((SN_local *)z)->i_p1 <= z->c;
}
static int r_R2(struct SN_env * z) {
return z->I[1] <= z->c;
return ((SN_local *)z)->i_p2 <= z->c;
}
static int r_standard_suffix(struct SN_env * z) {
int among_var;
{ int m1 = z->l - z->c; (void)m1;
{
int v_1 = z->l - z->c;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
among_var = find_among_b(z, a_2, 11);
among_var = find_among_b(z, a_2, 11, 0);
if (!among_var) goto lab0;
z->bra = z->c;
{ int ret = r_R1(z);
{
int ret = r_R1(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
switch (among_var) {
case 1:
{ int m2 = z->l - z->c; (void)m2;
{
int v_2 = z->l - z->c;
if (!(eq_s_b(z, 4, s_10))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{ int m3 = z->l - z->c; (void)m3;
{
int v_3 = z->l - z->c;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 's') { z->c = z->l - m3; goto lab2; }
if (z->c <= z->lb || z->p[z->c - 1] != 's') { z->c = z->l - v_3; goto lab2; }
z->c--;
z->bra = z->c;
if (!(eq_s_b(z, 3, s_11))) { z->c = z->l - m3; goto lab2; }
{ int ret = slice_del(z);
if (!(eq_s_b(z, 3, s_11))) { z->c = z->l - v_3; goto lab2; }
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab2:
@ -381,138 +408,181 @@ static int r_standard_suffix(struct SN_env * z) {
break;
case 4:
if (in_grouping_b_U(z, g_s_ending, 98, 116, 0)) goto lab0;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 1, s_12);
{
int ret = slice_from_s(z, 1, s_12);
if (ret < 0) return ret;
}
break;
}
lab0:
z->c = z->l - m1;
z->c = z->l - v_1;
}
{ int m4 = z->l - z->c; (void)m4;
{
int v_4 = z->l - z->c;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
among_var = find_among_b(z, a_3, 4);
among_var = find_among_b(z, a_4, 5, 0);
if (!among_var) goto lab3;
z->bra = z->c;
{ int ret = r_R1(z);
{
int ret = r_R1(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b_U(z, g_st_ending, 98, 116, 0)) goto lab3;
{ int ret = skip_b_utf8(z->p, z->c, z->lb, 3);
{
int ret = skip_b_utf8(z->p, z->c, z->lb, 3);
if (ret < 0) goto lab3;
z->c = ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{
int v_5 = z->l - z->c;
if (in_grouping_b_U(z, g_et_ending, 85, 228, 0)) goto lab3;
z->c = z->l - v_5;
}
{
int v_6 = z->l - z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((280576 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
if (!find_among_b(z, a_3, 5, 0)) goto lab4;
goto lab3;
lab4:
z->c = z->l - v_6;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
}
lab3:
z->c = z->l - m4;
z->c = z->l - v_4;
}
{ int m5 = z->l - z->c; (void)m5;
{
int v_7 = z->l - z->c;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
among_var = find_among_b(z, a_5, 8);
if (!among_var) goto lab4;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab5;
among_var = find_among_b(z, a_6, 8, 0);
if (!among_var) goto lab5;
z->bra = z->c;
{ int ret = r_R2(z);
if (ret == 0) goto lab4;
{
int ret = r_R2(z);
if (ret == 0) goto lab5;
if (ret < 0) return ret;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{ int m6 = z->l - z->c; (void)m6;
{
int v_8 = z->l - z->c;
z->ket = z->c;
if (!(eq_s_b(z, 2, s_13))) { z->c = z->l - m6; goto lab5; }
if (!(eq_s_b(z, 2, s_13))) { z->c = z->l - v_8; goto lab6; }
z->bra = z->c;
{ int m7 = z->l - z->c; (void)m7;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab6;
{
int v_9 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab7;
z->c--;
{ z->c = z->l - m6; goto lab5; }
lab6:
z->c = z->l - m7;
{ z->c = z->l - v_8; goto lab6; }
lab7:
z->c = z->l - v_9;
}
{ int ret = r_R2(z);
if (ret == 0) { z->c = z->l - m6; goto lab5; }
{
int ret = r_R2(z);
if (ret == 0) { z->c = z->l - v_8; goto lab6; }
if (ret < 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab5:
lab6:
;
}
break;
case 2:
{ int m8 = z->l - z->c; (void)m8;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab7;
{
int v_10 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab8;
z->c--;
goto lab4;
lab7:
z->c = z->l - m8;
goto lab5;
lab8:
z->c = z->l - v_10;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{ int m9 = z->l - z->c; (void)m9;
{
int v_11 = z->l - z->c;
z->ket = z->c;
{ int m10 = z->l - z->c; (void)m10;
do {
int v_12 = z->l - z->c;
if (!(eq_s_b(z, 2, s_14))) goto lab10;
goto lab9;
break;
lab10:
z->c = z->l - m10;
if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m9; goto lab8; }
z->c = z->l - v_12;
if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - v_11; goto lab9; }
} while (0);
z->bra = z->c;
{
int ret = r_R1(z);
if (ret == 0) { z->c = z->l - v_11; goto lab9; }
if (ret < 0) return ret;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab9:
z->bra = z->c;
{ int ret = r_R1(z);
if (ret == 0) { z->c = z->l - m9; goto lab8; }
if (ret < 0) return ret;
}
{ int ret = slice_del(z);
if (ret < 0) return ret;
}
lab8:
;
}
break;
case 4:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{ int m11 = z->l - z->c; (void)m11;
{
int v_13 = z->l - z->c;
z->ket = z->c;
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m11; goto lab11; }
if (!find_among_b(z, a_4, 2)) { z->c = z->l - m11; goto lab11; }
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - v_13; goto lab11; }
if (!find_among_b(z, a_5, 2, 0)) { z->c = z->l - v_13; goto lab11; }
z->bra = z->c;
{ int ret = r_R2(z);
if (ret == 0) { z->c = z->l - m11; goto lab11; }
{
int ret = r_R2(z);
if (ret == 0) { z->c = z->l - v_13; goto lab11; }
if (ret < 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab11:
@ -520,42 +590,56 @@ static int r_standard_suffix(struct SN_env * z) {
}
break;
}
lab4:
z->c = z->l - m5;
lab5:
z->c = z->l - v_7;
}
return 1;
}
extern int german_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c;
{ int ret = r_prelude(z);
{
int v_1 = z->c;
{
int ret = r_prelude(z);
if (ret < 0) return ret;
}
z->c = c1;
z->c = v_1;
}
{ int c2 = z->c;
{ int ret = r_mark_regions(z);
{
int v_2 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = c2;
z->c = v_2;
}
z->lb = z->c; z->c = z->l;
{ int ret = r_standard_suffix(z);
{
int ret = r_standard_suffix(z);
if (ret < 0) return ret;
}
z->c = z->lb;
{ int c3 = z->c;
{ int ret = r_postlude(z);
{
int v_3 = z->c;
{
int ret = r_postlude(z);
if (ret < 0) return ret;
}
z->c = c3;
z->c = v_3;
}
return 1;
}
extern struct SN_env * german_UTF_8_create_env(void) { return SN_create_env(0, 3); }
extern struct SN_env * german_UTF_8_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p2 = 0;
((SN_local *)z)->i_p1 = 0;
}
return z;
}
extern void german_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void german_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,11 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from hindi.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_UTF_8_hindi.h"
#include <stddef.h>
#include "snowball_runtime.h"
static int r_CONSONANT(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
@ -10,18 +13,10 @@ extern int hindi_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
static int r_CONSONANT(struct SN_env * z);
extern struct SN_env * hindi_UTF_8_create_env(void);
extern void hindi_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[3] = { 0xE0, 0xA5, 0x80 };
static const symbol s_0_1[12] = { 0xE0, 0xA5, 0x82, 0xE0, 0xA4, 0x82, 0xE0, 0xA4, 0x97, 0xE0, 0xA5, 0x80 };
static const symbol s_0_2[12] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x82, 0xE0, 0xA4, 0x97, 0xE0, 0xA5, 0x80 };
@ -154,169 +149,170 @@ static const symbol s_0_128[9] = { 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xA8, 0xE0, 0xA
static const symbol s_0_129[9] = { 0xE0, 0xA4, 0x86, 0xE0, 0xA4, 0xAF, 0xE0, 0xA4, 0xBE };
static const symbol s_0_130[9] = { 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xAF, 0xE0, 0xA4, 0xBE };
static const symbol s_0_131[3] = { 0xE0, 0xA4, 0xBF };
static const struct among a_0[132] =
{
{ 3, s_0_0, -1, -1, 0},
{ 12, s_0_1, 0, -1, 0},
{ 12, s_0_2, 0, -1, 0},
{ 12, s_0_3, 0, -1, 0},
{ 15, s_0_4, 3, -1, 0},
{ 15, s_0_5, 3, -1, 0},
{ 12, s_0_6, 0, -1, 0},
{ 15, s_0_7, 6, -1, 0},
{ 15, s_0_8, 6, -1, 0},
{ 9, s_0_9, 0, -1, 0},
{ 9, s_0_10, 0, -1, 0},
{ 9, s_0_11, 0, -1, 0},
{ 12, s_0_12, 11, -1, 0},
{ 12, s_0_13, 11, -1, 0},
{ 9, s_0_14, 0, -1, 0},
{ 12, s_0_15, 14, -1, 0},
{ 12, s_0_16, 14, -1, 0},
{ 6, s_0_17, 0, -1, r_CONSONANT},
{ 9, s_0_18, 17, -1, 0},
{ 9, s_0_19, 17, -1, 0},
{ 9, s_0_20, 17, -1, 0},
{ 6, s_0_21, 0, -1, r_CONSONANT},
{ 9, s_0_22, 21, -1, 0},
{ 6, s_0_23, -1, -1, 0},
{ 6, s_0_24, -1, -1, 0},
{ 12, s_0_25, 24, -1, 0},
{ 15, s_0_26, 25, -1, 0},
{ 15, s_0_27, 25, -1, 0},
{ 12, s_0_28, 24, -1, 0},
{ 3, s_0_29, -1, -1, 0},
{ 6, s_0_30, -1, -1, 0},
{ 9, s_0_31, 30, -1, r_CONSONANT},
{ 12, s_0_32, 31, -1, 0},
{ 12, s_0_33, 31, -1, 0},
{ 12, s_0_34, 31, -1, 0},
{ 6, s_0_35, -1, -1, 0},
{ 9, s_0_36, 35, -1, 0},
{ 9, s_0_37, 35, -1, 0},
{ 6, s_0_38, -1, -1, 0},
{ 6, s_0_39, -1, -1, 0},
{ 9, s_0_40, 39, -1, 0},
{ 9, s_0_41, 39, -1, 0},
{ 6, s_0_42, -1, -1, 0},
{ 12, s_0_43, 42, -1, 0},
{ 15, s_0_44, 43, -1, 0},
{ 15, s_0_45, 43, -1, 0},
{ 12, s_0_46, 42, -1, 0},
{ 6, s_0_47, -1, -1, 0},
{ 9, s_0_48, 47, -1, 0},
{ 9, s_0_49, 47, -1, 0},
{ 9, s_0_50, 47, -1, 0},
{ 9, s_0_51, 47, -1, 0},
{ 12, s_0_52, 51, -1, r_CONSONANT},
{ 15, s_0_53, 52, -1, 0},
{ 12, s_0_54, 51, -1, r_CONSONANT},
{ 15, s_0_55, 54, -1, 0},
{ 6, s_0_56, -1, -1, 0},
{ 9, s_0_57, 56, -1, 0},
{ 9, s_0_58, 56, -1, 0},
{ 9, s_0_59, 56, -1, 0},
{ 9, s_0_60, 56, -1, 0},
{ 12, s_0_61, 60, -1, r_CONSONANT},
{ 15, s_0_62, 61, -1, 0},
{ 12, s_0_63, 60, -1, r_CONSONANT},
{ 15, s_0_64, 63, -1, 0},
{ 6, s_0_65, -1, -1, 0},
{ 12, s_0_66, 65, -1, 0},
{ 15, s_0_67, 66, -1, 0},
{ 15, s_0_68, 66, -1, 0},
{ 12, s_0_69, 65, -1, 0},
{ 3, s_0_70, -1, -1, 0},
{ 3, s_0_71, -1, -1, 0},
{ 3, s_0_72, -1, -1, 0},
{ 3, s_0_73, -1, -1, 0},
{ 3, s_0_74, -1, -1, 0},
{ 12, s_0_75, 74, -1, 0},
{ 12, s_0_76, 74, -1, 0},
{ 15, s_0_77, 76, -1, 0},
{ 15, s_0_78, 76, -1, 0},
{ 9, s_0_79, 74, -1, 0},
{ 9, s_0_80, 74, -1, 0},
{ 12, s_0_81, 80, -1, 0},
{ 12, s_0_82, 80, -1, 0},
{ 6, s_0_83, 74, -1, r_CONSONANT},
{ 9, s_0_84, 83, -1, 0},
{ 9, s_0_85, 83, -1, 0},
{ 9, s_0_86, 83, -1, 0},
{ 6, s_0_87, 74, -1, r_CONSONANT},
{ 9, s_0_88, 87, -1, 0},
{ 9, s_0_89, 87, -1, 0},
{ 9, s_0_90, 87, -1, 0},
{ 3, s_0_91, -1, -1, 0},
{ 6, s_0_92, 91, -1, 0},
{ 6, s_0_93, 91, -1, 0},
{ 3, s_0_94, -1, -1, 0},
{ 3, s_0_95, -1, -1, 0},
{ 3, s_0_96, -1, -1, 0},
{ 3, s_0_97, -1, -1, 0},
{ 3, s_0_98, -1, -1, 0},
{ 6, s_0_99, 98, -1, 0},
{ 6, s_0_100, 98, -1, 0},
{ 9, s_0_101, 100, -1, 0},
{ 9, s_0_102, 100, -1, 0},
{ 6, s_0_103, 98, -1, 0},
{ 6, s_0_104, 98, -1, 0},
{ 3, s_0_105, -1, -1, 0},
{ 6, s_0_106, 105, -1, 0},
{ 6, s_0_107, 105, -1, 0},
{ 6, s_0_108, -1, -1, r_CONSONANT},
{ 9, s_0_109, 108, -1, 0},
{ 9, s_0_110, 108, -1, 0},
{ 9, s_0_111, 108, -1, 0},
{ 3, s_0_112, -1, -1, 0},
{ 12, s_0_113, 112, -1, 0},
{ 12, s_0_114, 112, -1, 0},
{ 15, s_0_115, 114, -1, 0},
{ 15, s_0_116, 114, -1, 0},
{ 9, s_0_117, 112, -1, 0},
{ 9, s_0_118, 112, -1, 0},
{ 12, s_0_119, 118, -1, 0},
{ 12, s_0_120, 118, -1, 0},
{ 6, s_0_121, 112, -1, r_CONSONANT},
{ 9, s_0_122, 121, -1, 0},
{ 9, s_0_123, 121, -1, 0},
{ 9, s_0_124, 121, -1, 0},
{ 6, s_0_125, 112, -1, r_CONSONANT},
{ 9, s_0_126, 125, -1, 0},
{ 9, s_0_127, 125, -1, 0},
{ 9, s_0_128, 125, -1, 0},
{ 9, s_0_129, 112, -1, 0},
{ 9, s_0_130, 112, -1, 0},
{ 3, s_0_131, -1, -1, 0}
static const struct among a_0[132] = {
{ 3, s_0_0, 0, -1, 0},
{ 12, s_0_1, -1, -1, 0},
{ 12, s_0_2, -2, -1, 0},
{ 12, s_0_3, -3, -1, 0},
{ 15, s_0_4, -1, -1, 0},
{ 15, s_0_5, -2, -1, 0},
{ 12, s_0_6, -6, -1, 0},
{ 15, s_0_7, -1, -1, 0},
{ 15, s_0_8, -2, -1, 0},
{ 9, s_0_9, -9, -1, 0},
{ 9, s_0_10, -10, -1, 0},
{ 9, s_0_11, -11, -1, 0},
{ 12, s_0_12, -1, -1, 0},
{ 12, s_0_13, -2, -1, 0},
{ 9, s_0_14, -14, -1, 0},
{ 12, s_0_15, -1, -1, 0},
{ 12, s_0_16, -2, -1, 0},
{ 6, s_0_17, -17, -1, 1},
{ 9, s_0_18, -1, -1, 0},
{ 9, s_0_19, -2, -1, 0},
{ 9, s_0_20, -3, -1, 0},
{ 6, s_0_21, -21, -1, 1},
{ 9, s_0_22, -1, -1, 0},
{ 6, s_0_23, 0, -1, 0},
{ 6, s_0_24, 0, -1, 0},
{ 12, s_0_25, -1, -1, 0},
{ 15, s_0_26, -1, -1, 0},
{ 15, s_0_27, -2, -1, 0},
{ 12, s_0_28, -4, -1, 0},
{ 3, s_0_29, 0, -1, 0},
{ 6, s_0_30, 0, -1, 0},
{ 9, s_0_31, -1, -1, 1},
{ 12, s_0_32, -1, -1, 0},
{ 12, s_0_33, -2, -1, 0},
{ 12, s_0_34, -3, -1, 0},
{ 6, s_0_35, 0, -1, 0},
{ 9, s_0_36, -1, -1, 0},
{ 9, s_0_37, -2, -1, 0},
{ 6, s_0_38, 0, -1, 0},
{ 6, s_0_39, 0, -1, 0},
{ 9, s_0_40, -1, -1, 0},
{ 9, s_0_41, -2, -1, 0},
{ 6, s_0_42, 0, -1, 0},
{ 12, s_0_43, -1, -1, 0},
{ 15, s_0_44, -1, -1, 0},
{ 15, s_0_45, -2, -1, 0},
{ 12, s_0_46, -4, -1, 0},
{ 6, s_0_47, 0, -1, 0},
{ 9, s_0_48, -1, -1, 0},
{ 9, s_0_49, -2, -1, 0},
{ 9, s_0_50, -3, -1, 0},
{ 9, s_0_51, -4, -1, 0},
{ 12, s_0_52, -1, -1, 1},
{ 15, s_0_53, -1, -1, 0},
{ 12, s_0_54, -3, -1, 1},
{ 15, s_0_55, -1, -1, 0},
{ 6, s_0_56, 0, -1, 0},
{ 9, s_0_57, -1, -1, 0},
{ 9, s_0_58, -2, -1, 0},
{ 9, s_0_59, -3, -1, 0},
{ 9, s_0_60, -4, -1, 0},
{ 12, s_0_61, -1, -1, 1},
{ 15, s_0_62, -1, -1, 0},
{ 12, s_0_63, -3, -1, 1},
{ 15, s_0_64, -1, -1, 0},
{ 6, s_0_65, 0, -1, 0},
{ 12, s_0_66, -1, -1, 0},
{ 15, s_0_67, -1, -1, 0},
{ 15, s_0_68, -2, -1, 0},
{ 12, s_0_69, -4, -1, 0},
{ 3, s_0_70, 0, -1, 0},
{ 3, s_0_71, 0, -1, 0},
{ 3, s_0_72, 0, -1, 0},
{ 3, s_0_73, 0, -1, 0},
{ 3, s_0_74, 0, -1, 0},
{ 12, s_0_75, -1, -1, 0},
{ 12, s_0_76, -2, -1, 0},
{ 15, s_0_77, -1, -1, 0},
{ 15, s_0_78, -2, -1, 0},
{ 9, s_0_79, -5, -1, 0},
{ 9, s_0_80, -6, -1, 0},
{ 12, s_0_81, -1, -1, 0},
{ 12, s_0_82, -2, -1, 0},
{ 6, s_0_83, -9, -1, 1},
{ 9, s_0_84, -1, -1, 0},
{ 9, s_0_85, -2, -1, 0},
{ 9, s_0_86, -3, -1, 0},
{ 6, s_0_87, -13, -1, 1},
{ 9, s_0_88, -1, -1, 0},
{ 9, s_0_89, -2, -1, 0},
{ 9, s_0_90, -3, -1, 0},
{ 3, s_0_91, 0, -1, 0},
{ 6, s_0_92, -1, -1, 0},
{ 6, s_0_93, -2, -1, 0},
{ 3, s_0_94, 0, -1, 0},
{ 3, s_0_95, 0, -1, 0},
{ 3, s_0_96, 0, -1, 0},
{ 3, s_0_97, 0, -1, 0},
{ 3, s_0_98, 0, -1, 0},
{ 6, s_0_99, -1, -1, 0},
{ 6, s_0_100, -2, -1, 0},
{ 9, s_0_101, -1, -1, 0},
{ 9, s_0_102, -2, -1, 0},
{ 6, s_0_103, -5, -1, 0},
{ 6, s_0_104, -6, -1, 0},
{ 3, s_0_105, 0, -1, 0},
{ 6, s_0_106, -1, -1, 0},
{ 6, s_0_107, -2, -1, 0},
{ 6, s_0_108, 0, -1, 1},
{ 9, s_0_109, -1, -1, 0},
{ 9, s_0_110, -2, -1, 0},
{ 9, s_0_111, -3, -1, 0},
{ 3, s_0_112, 0, -1, 0},
{ 12, s_0_113, -1, -1, 0},
{ 12, s_0_114, -2, -1, 0},
{ 15, s_0_115, -1, -1, 0},
{ 15, s_0_116, -2, -1, 0},
{ 9, s_0_117, -5, -1, 0},
{ 9, s_0_118, -6, -1, 0},
{ 12, s_0_119, -1, -1, 0},
{ 12, s_0_120, -2, -1, 0},
{ 6, s_0_121, -9, -1, 1},
{ 9, s_0_122, -1, -1, 0},
{ 9, s_0_123, -2, -1, 0},
{ 9, s_0_124, -3, -1, 0},
{ 6, s_0_125, -13, -1, 1},
{ 9, s_0_126, -1, -1, 0},
{ 9, s_0_127, -2, -1, 0},
{ 9, s_0_128, -3, -1, 0},
{ 9, s_0_129, -17, -1, 0},
{ 9, s_0_130, -18, -1, 0},
{ 3, s_0_131, 0, -1, 0}
};
static const unsigned char g_consonant[] = { 255, 255, 255, 255, 159, 0, 0, 0, 248, 7 };
static int r_CONSONANT(struct SN_env * z) {
if (in_grouping_b_U(z, g_consonant, 2325, 2399, 0)) return 0;
return 1;
return !in_grouping_b_U(z, g_consonant, 2325, 2399, 0);
}
extern int hindi_UTF_8_stem(struct SN_env * z) {
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
{
int ret = skip_utf8(z->p, z->c, z->l, 1);
if (ret < 0) return 0;
z->c = ret;
}
z->lb = z->c; z->c = z->l;
z->ket = z->c;
if (!find_among_b(z, a_0, 132)) return 0;
if (!find_among_b(z, a_0, 132, r_CONSONANT)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * hindi_UTF_8_create_env(void) { return SN_create_env(0, 0); }
extern struct SN_env * hindi_UTF_8_create_env(void) {
return SN_new_env(sizeof(struct SN_env));
}
extern void hindi_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void hindi_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,18 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from indonesian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_UTF_8_indonesian.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_prefix;
int i_measure;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,59 +21,44 @@ extern int indonesian_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_VOWEL(struct SN_env * z);
static int r_SUFFIX_I_OK(struct SN_env * z);
static int r_SUFFIX_AN_OK(struct SN_env * z);
static int r_SUFFIX_KAN_OK(struct SN_env * z);
static int r_KER(struct SN_env * z);
static int r_remove_suffix(struct SN_env * z);
static int r_remove_second_order_prefix(struct SN_env * z);
static int r_remove_first_order_prefix(struct SN_env * z);
static int r_remove_possessive_pronoun(struct SN_env * z);
static int r_remove_particle(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static const symbol s_0[] = { 's' };
static const symbol s_1[] = { 's' };
static const symbol s_2[] = { 'p' };
static const symbol s_3[] = { 'p' };
static const symbol s_4[] = { 'a', 'j', 'a', 'r' };
static const symbol s_5[] = { 'a', 'j', 'a', 'r' };
static const symbol s_6[] = { 'e', 'r' };
extern struct SN_env * indonesian_UTF_8_create_env(void);
extern void indonesian_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[3] = { 'k', 'a', 'h' };
static const symbol s_0_1[3] = { 'l', 'a', 'h' };
static const symbol s_0_2[3] = { 'p', 'u', 'n' };
static const struct among a_0[3] =
{
{ 3, s_0_0, -1, 1, 0},
{ 3, s_0_1, -1, 1, 0},
{ 3, s_0_2, -1, 1, 0}
static const struct among a_0[3] = {
{ 3, s_0_0, 0, 1, 0},
{ 3, s_0_1, 0, 1, 0},
{ 3, s_0_2, 0, 1, 0}
};
static const symbol s_1_0[3] = { 'n', 'y', 'a' };
static const symbol s_1_1[2] = { 'k', 'u' };
static const symbol s_1_2[2] = { 'm', 'u' };
static const struct among a_1[3] =
{
{ 3, s_1_0, -1, 1, 0},
{ 2, s_1_1, -1, 1, 0},
{ 2, s_1_2, -1, 1, 0}
static const struct among a_1[3] = {
{ 3, s_1_0, 0, 1, 0},
{ 2, s_1_1, 0, 1, 0},
{ 2, s_1_2, 0, 1, 0}
};
static const symbol s_2_0[1] = { 'i' };
static const symbol s_2_1[2] = { 'a', 'n' };
static const symbol s_2_2[3] = { 'k', 'a', 'n' };
static const struct among a_2[3] =
{
{ 1, s_2_0, -1, 1, r_SUFFIX_I_OK},
{ 2, s_2_1, -1, 1, r_SUFFIX_AN_OK},
{ 3, s_2_2, 1, 1, r_SUFFIX_KAN_OK}
static const struct among a_2[2] = {
{ 1, s_2_0, 0, 2, 0},
{ 2, s_2_1, 0, 1, 0}
};
static const symbol s_3_0[2] = { 'd', 'i' };
@ -70,123 +67,97 @@ static const symbol s_3_2[2] = { 'm', 'e' };
static const symbol s_3_3[3] = { 'm', 'e', 'm' };
static const symbol s_3_4[3] = { 'm', 'e', 'n' };
static const symbol s_3_5[4] = { 'm', 'e', 'n', 'g' };
static const symbol s_3_6[4] = { 'm', 'e', 'n', 'y' };
static const symbol s_3_7[3] = { 'p', 'e', 'm' };
static const symbol s_3_8[3] = { 'p', 'e', 'n' };
static const symbol s_3_9[4] = { 'p', 'e', 'n', 'g' };
static const symbol s_3_10[4] = { 'p', 'e', 'n', 'y' };
static const symbol s_3_11[3] = { 't', 'e', 'r' };
static const struct among a_3[12] =
{
{ 2, s_3_0, -1, 1, 0},
{ 2, s_3_1, -1, 2, 0},
{ 2, s_3_2, -1, 1, 0},
{ 3, s_3_3, 2, 5, 0},
{ 3, s_3_4, 2, 1, 0},
{ 4, s_3_5, 4, 1, 0},
{ 4, s_3_6, 4, 3, r_VOWEL},
{ 3, s_3_7, -1, 6, 0},
{ 3, s_3_8, -1, 2, 0},
{ 4, s_3_9, 8, 2, 0},
{ 4, s_3_10, 8, 4, r_VOWEL},
{ 3, s_3_11, -1, 1, 0}
static const symbol s_3_6[3] = { 'p', 'e', 'm' };
static const symbol s_3_7[3] = { 'p', 'e', 'n' };
static const symbol s_3_8[4] = { 'p', 'e', 'n', 'g' };
static const symbol s_3_9[3] = { 't', 'e', 'r' };
static const struct among a_3[10] = {
{ 2, s_3_0, 0, 1, 0},
{ 2, s_3_1, 0, 3, 0},
{ 2, s_3_2, 0, 1, 0},
{ 3, s_3_3, -1, 5, 0},
{ 3, s_3_4, -2, 2, 0},
{ 4, s_3_5, -1, 1, 0},
{ 3, s_3_6, 0, 6, 0},
{ 3, s_3_7, 0, 4, 0},
{ 4, s_3_8, -1, 3, 0},
{ 3, s_3_9, 0, 1, 0}
};
static const symbol s_4_0[2] = { 'b', 'e' };
static const symbol s_4_1[7] = { 'b', 'e', 'l', 'a', 'j', 'a', 'r' };
static const symbol s_4_2[3] = { 'b', 'e', 'r' };
static const symbol s_4_3[2] = { 'p', 'e' };
static const symbol s_4_4[7] = { 'p', 'e', 'l', 'a', 'j', 'a', 'r' };
static const symbol s_4_5[3] = { 'p', 'e', 'r' };
static const struct among a_4[6] =
{
{ 2, s_4_0, -1, 3, r_KER},
{ 7, s_4_1, 0, 4, 0},
{ 3, s_4_2, 0, 3, 0},
{ 2, s_4_3, -1, 1, 0},
{ 7, s_4_4, 3, 2, 0},
{ 3, s_4_5, 3, 1, 0}
static const symbol s_4_1[2] = { 'p', 'e' };
static const struct among a_4[2] = {
{ 2, s_4_0, 0, 2, 0},
{ 2, s_4_1, 0, 1, 0}
};
static const unsigned char g_vowel[] = { 17, 65, 16 };
static const symbol s_0[] = { 'e', 'r' };
static const symbol s_1[] = { 's' };
static const symbol s_2[] = { 's' };
static const symbol s_3[] = { 'p' };
static const symbol s_4[] = { 'p' };
static const symbol s_5[] = { 'a', 'j', 'a', 'r' };
static const symbol s_6[] = { 'a', 'j', 'a', 'r' };
static int r_remove_particle(struct SN_env * z) {
z->ket = z->c;
if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 104 && z->p[z->c - 1] != 110)) return 0;
if (!find_among_b(z, a_0, 3)) return 0;
if (!find_among_b(z, a_0, 3, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[1] -= 1;
((SN_local *)z)->i_measure -= 1;
return 1;
}
static int r_remove_possessive_pronoun(struct SN_env * z) {
z->ket = z->c;
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 97 && z->p[z->c - 1] != 117)) return 0;
if (!find_among_b(z, a_1, 3)) return 0;
if (!find_among_b(z, a_1, 3, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[1] -= 1;
return 1;
}
static int r_SUFFIX_KAN_OK(struct SN_env * z) {
if (z->I[0] == 3) return 0;
if (z->I[0] == 2) return 0;
return 1;
}
static int r_SUFFIX_AN_OK(struct SN_env * z) {
return z->I[0] != 1;
}
static int r_SUFFIX_I_OK(struct SN_env * z) {
if (z->I[0] > 2) return 0;
{ int m1 = z->l - z->c; (void)m1;
if (z->c <= z->lb || z->p[z->c - 1] != 's') goto lab0;
z->c--;
return 0;
lab0:
z->c = z->l - m1;
}
((SN_local *)z)->i_measure -= 1;
return 1;
}
static int r_remove_suffix(struct SN_env * z) {
int among_var;
z->ket = z->c;
if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 110)) return 0;
if (!find_among_b(z, a_2, 3)) return 0;
among_var = find_among_b(z, a_2, 2, 0);
if (!among_var) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
switch (among_var) {
case 1:
do {
int v_1 = z->l - z->c;
if (((SN_local *)z)->i_prefix == 3) goto lab0;
if (((SN_local *)z)->i_prefix == 2) goto lab0;
if (z->c <= z->lb || z->p[z->c - 1] != 'k') goto lab0;
z->c--;
z->bra = z->c;
break;
lab0:
z->c = z->l - v_1;
if (((SN_local *)z)->i_prefix == 1) return 0;
} while (0);
break;
case 2:
if (((SN_local *)z)->i_prefix > 2) return 0;
{
int v_2 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 's') goto lab1;
z->c--;
return 0;
lab1:
z->c = z->l - v_2;
}
break;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[1] -= 1;
return 1;
}
static int r_VOWEL(struct SN_env * z) {
if (in_grouping_U(z, g_vowel, 97, 117, 0)) return 0;
return 1;
}
static int r_KER(struct SN_env * z) {
if (out_grouping_U(z, g_vowel, 97, 117, 0)) return 0;
if (!(eq_s(z, 2, s_0))) return 0;
((SN_local *)z)->i_measure -= 1;
return 1;
}
@ -194,77 +165,127 @@ static int r_remove_first_order_prefix(struct SN_env * z) {
int among_var;
z->bra = z->c;
if (z->c + 1 >= z->l || (z->p[z->c + 1] != 105 && z->p[z->c + 1] != 101)) return 0;
among_var = find_among(z, a_3, 12);
among_var = find_among(z, a_3, 10, 0);
if (!among_var) return 0;
z->ket = z->c;
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[0] = 1;
z->I[1] -= 1;
((SN_local *)z)->i_prefix = 1;
((SN_local *)z)->i_measure -= 1;
break;
case 2:
{ int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[0] = 3;
z->I[1] -= 1;
do {
int v_1 = z->c;
if (z->c == z->l || z->p[z->c] != 'y') goto lab0;
z->c++;
{
int v_2 = z->c;
if (in_grouping_U(z, g_vowel, 97, 117, 0)) goto lab0;
z->c = v_2;
}
z->ket = z->c;
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
((SN_local *)z)->i_prefix = 1;
((SN_local *)z)->i_measure -= 1;
break;
lab0:
z->c = v_1;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
((SN_local *)z)->i_prefix = 1;
((SN_local *)z)->i_measure -= 1;
} while (0);
break;
case 3:
z->I[0] = 1;
{ int ret = slice_from_s(z, 1, s_1);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[1] -= 1;
((SN_local *)z)->i_prefix = 3;
((SN_local *)z)->i_measure -= 1;
break;
case 4:
z->I[0] = 3;
{ int ret = slice_from_s(z, 1, s_2);
if (ret < 0) return ret;
}
z->I[1] -= 1;
do {
int v_3 = z->c;
if (z->c == z->l || z->p[z->c] != 'y') goto lab1;
z->c++;
{
int v_4 = z->c;
if (in_grouping_U(z, g_vowel, 97, 117, 0)) goto lab1;
z->c = v_4;
}
z->ket = z->c;
{
int ret = slice_from_s(z, 1, s_1);
if (ret < 0) return ret;
}
((SN_local *)z)->i_prefix = 3;
((SN_local *)z)->i_measure -= 1;
break;
lab1:
z->c = v_3;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
((SN_local *)z)->i_prefix = 3;
((SN_local *)z)->i_measure -= 1;
} while (0);
break;
case 5:
z->I[0] = 1;
z->I[1] -= 1;
{ int c1 = z->c;
{ int c2 = z->c;
if (in_grouping_U(z, g_vowel, 97, 117, 0)) goto lab1;
z->c = c2;
{ int ret = slice_from_s(z, 1, s_3);
((SN_local *)z)->i_prefix = 1;
((SN_local *)z)->i_measure -= 1;
do {
int v_5 = z->c;
{
int v_6 = z->c;
if (in_grouping_U(z, g_vowel, 97, 117, 0)) goto lab2;
z->c = v_6;
{
int ret = slice_from_s(z, 1, s_2);
if (ret < 0) return ret;
}
}
goto lab0;
lab1:
z->c = c1;
{ int ret = slice_del(z);
break;
lab2:
z->c = v_5;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
}
lab0:
} while (0);
break;
case 6:
z->I[0] = 3;
z->I[1] -= 1;
{ int c3 = z->c;
{ int c4 = z->c;
((SN_local *)z)->i_prefix = 3;
((SN_local *)z)->i_measure -= 1;
do {
int v_7 = z->c;
{
int v_8 = z->c;
if (in_grouping_U(z, g_vowel, 97, 117, 0)) goto lab3;
z->c = c4;
{ int ret = slice_from_s(z, 1, s_4);
z->c = v_8;
{
int ret = slice_from_s(z, 1, s_3);
if (ret < 0) return ret;
}
}
goto lab2;
break;
lab3:
z->c = c3;
{ int ret = slice_del(z);
z->c = v_7;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
}
lab2:
} while (0);
break;
}
return 1;
@ -274,134 +295,174 @@ static int r_remove_second_order_prefix(struct SN_env * z) {
int among_var;
z->bra = z->c;
if (z->c + 1 >= z->l || z->p[z->c + 1] != 101) return 0;
among_var = find_among(z, a_4, 6);
among_var = find_among(z, a_4, 2, 0);
if (!among_var) return 0;
z->ket = z->c;
switch (among_var) {
case 1:
{ int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[0] = 2;
z->I[1] -= 1;
do {
int v_1 = z->c;
if (z->c == z->l || z->p[z->c] != 'r') goto lab0;
z->c++;
z->ket = z->c;
((SN_local *)z)->i_prefix = 2;
break;
lab0:
z->c = v_1;
if (z->c == z->l || z->p[z->c] != 'l') goto lab1;
z->c++;
z->ket = z->c;
if (!(eq_s(z, 4, s_4))) goto lab1;
break;
lab1:
z->c = v_1;
z->ket = z->c;
((SN_local *)z)->i_prefix = 2;
} while (0);
break;
case 2:
{ int ret = slice_from_s(z, 4, s_5);
if (ret < 0) return ret;
}
z->I[1] -= 1;
break;
case 3:
{ int ret = slice_del(z);
if (ret < 0) return ret;
}
z->I[0] = 4;
z->I[1] -= 1;
break;
case 4:
{ int ret = slice_from_s(z, 4, s_6);
if (ret < 0) return ret;
}
z->I[0] = 4;
z->I[1] -= 1;
do {
int v_2 = z->c;
if (z->c == z->l || z->p[z->c] != 'r') goto lab2;
z->c++;
z->ket = z->c;
break;
lab2:
z->c = v_2;
if (z->c == z->l || z->p[z->c] != 'l') goto lab3;
z->c++;
z->ket = z->c;
if (!(eq_s(z, 4, s_5))) goto lab3;
break;
lab3:
z->c = v_2;
z->ket = z->c;
if (out_grouping_U(z, g_vowel, 97, 117, 0)) return 0;
if (!(eq_s(z, 2, s_6))) return 0;
} while (0);
((SN_local *)z)->i_prefix = 4;
break;
}
((SN_local *)z)->i_measure -= 1;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
extern int indonesian_UTF_8_stem(struct SN_env * z) {
z->I[1] = 0;
{ int c1 = z->c;
while(1) {
int c2 = z->c;
((SN_local *)z)->i_measure = 0;
{
int v_1 = z->c;
while (1) {
int v_2 = z->c;
{
int ret = out_grouping_U(z, g_vowel, 97, 117, 1);
if (ret < 0) goto lab1;
z->c += ret;
}
z->I[1] += 1;
((SN_local *)z)->i_measure += 1;
continue;
lab1:
z->c = c2;
z->c = v_2;
break;
}
z->c = c1;
z->c = v_1;
}
if (z->I[1] <= 2) return 0;
z->I[0] = 0;
if (((SN_local *)z)->i_measure <= 2) return 0;
((SN_local *)z)->i_prefix = 0;
z->lb = z->c; z->c = z->l;
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_remove_particle(z);
{
int v_3 = z->l - z->c;
{
int ret = r_remove_particle(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
if (z->I[1] <= 2) return 0;
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_remove_possessive_pronoun(z);
if (((SN_local *)z)->i_measure <= 2) return 0;
{
int v_4 = z->l - z->c;
{
int ret = r_remove_possessive_pronoun(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
z->c = z->lb;
if (z->I[1] <= 2) return 0;
{ int c5 = z->c;
{ int c_test6 = z->c;
{ int ret = r_remove_first_order_prefix(z);
if (ret == 0) goto lab3;
if (((SN_local *)z)->i_measure <= 2) return 0;
do {
int v_5 = z->c;
{
int v_6 = z->c;
{
int ret = r_remove_first_order_prefix(z);
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
{ int c7 = z->c;
{ int c_test8 = z->c;
if (z->I[1] <= 2) goto lab4;
{
int v_7 = z->c;
{
int v_8 = z->c;
if (((SN_local *)z)->i_measure <= 2) goto lab3;
z->lb = z->c; z->c = z->l;
{ int ret = r_remove_suffix(z);
if (ret == 0) goto lab4;
{
int ret = r_remove_suffix(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
z->c = z->lb;
z->c = c_test8;
z->c = v_8;
}
if (z->I[1] <= 2) goto lab4;
{ int ret = r_remove_second_order_prefix(z);
if (ret == 0) goto lab4;
if (((SN_local *)z)->i_measure <= 2) goto lab3;
{
int ret = r_remove_second_order_prefix(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab4:
z->c = c7;
lab3:
z->c = v_7;
}
z->c = c_test6;
z->c = v_6;
}
goto lab2;
lab3:
z->c = c5;
{ int c9 = z->c;
{ int ret = r_remove_second_order_prefix(z);
break;
lab2:
z->c = v_5;
{
int v_9 = z->c;
{
int ret = r_remove_second_order_prefix(z);
if (ret < 0) return ret;
}
z->c = c9;
z->c = v_9;
}
{ int c10 = z->c;
if (z->I[1] <= 2) goto lab5;
{
int v_10 = z->c;
if (((SN_local *)z)->i_measure <= 2) goto lab4;
z->lb = z->c; z->c = z->l;
{ int ret = r_remove_suffix(z);
if (ret == 0) goto lab5;
{
int ret = r_remove_suffix(z);
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
z->c = z->lb;
lab5:
z->c = c10;
lab4:
z->c = v_10;
}
}
lab2:
} while (0);
return 1;
}
extern struct SN_env * indonesian_UTF_8_create_env(void) { return SN_create_env(0, 2); }
extern struct SN_env * indonesian_UTF_8_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_prefix = 0;
((SN_local *)z)->i_measure = 0;
}
return z;
}
extern void indonesian_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void indonesian_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

View file

@ -1,6 +1,19 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from irish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_UTF_8_irish.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p2;
int i_p1;
int i_pV;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,6 +22,7 @@ extern int irish_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_verb_sfx(struct SN_env * z);
static int r_deriv(struct SN_env * z);
static int r_noun_sfx(struct SN_env * z);
@ -17,18 +31,22 @@ static int r_initial_morph(struct SN_env * z);
static int r_RV(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_R1(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static const symbol s_0[] = { 'f' };
static const symbol s_1[] = { 's' };
static const symbol s_2[] = { 'b' };
static const symbol s_3[] = { 'c' };
static const symbol s_4[] = { 'd' };
static const symbol s_5[] = { 'g' };
static const symbol s_6[] = { 'p' };
static const symbol s_7[] = { 't' };
static const symbol s_8[] = { 'm' };
static const symbol s_9[] = { 'a', 'r', 'c' };
static const symbol s_10[] = { 'g', 'i', 'n' };
static const symbol s_11[] = { 'g', 'r', 'a', 'f' };
static const symbol s_12[] = { 'p', 'a', 'i', 't', 'e' };
static const symbol s_13[] = { 0xC3, 0xB3, 'i', 'd' };
extern struct SN_env * irish_UTF_8_create_env(void);
extern void irish_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[2] = { 'b', '\'' };
static const symbol s_0_1[2] = { 'b', 'h' };
static const symbol s_0_2[3] = { 'b', 'h', 'f' };
@ -53,33 +71,31 @@ static const symbol s_0_20[2] = { 's', 'h' };
static const symbol s_0_21[2] = { 't', '-' };
static const symbol s_0_22[2] = { 't', 'h' };
static const symbol s_0_23[2] = { 't', 's' };
static const struct among a_0[24] =
{
{ 2, s_0_0, -1, 1, 0},
{ 2, s_0_1, -1, 4, 0},
{ 3, s_0_2, 1, 2, 0},
{ 2, s_0_3, -1, 8, 0},
{ 2, s_0_4, -1, 5, 0},
{ 2, s_0_5, -1, 1, 0},
{ 4, s_0_6, 5, 2, 0},
{ 2, s_0_7, -1, 6, 0},
{ 2, s_0_8, -1, 9, 0},
{ 2, s_0_9, -1, 2, 0},
{ 2, s_0_10, -1, 5, 0},
{ 2, s_0_11, -1, 7, 0},
{ 2, s_0_12, -1, 1, 0},
{ 2, s_0_13, -1, 1, 0},
{ 2, s_0_14, -1, 4, 0},
{ 2, s_0_15, -1, 10, 0},
{ 2, s_0_16, -1, 1, 0},
{ 2, s_0_17, -1, 6, 0},
{ 2, s_0_18, -1, 7, 0},
{ 2, s_0_19, -1, 8, 0},
{ 2, s_0_20, -1, 3, 0},
{ 2, s_0_21, -1, 1, 0},
{ 2, s_0_22, -1, 9, 0},
{ 2, s_0_23, -1, 3, 0}
static const struct among a_0[24] = {
{ 2, s_0_0, 0, 1, 0},
{ 2, s_0_1, 0, 4, 0},
{ 3, s_0_2, -1, 2, 0},
{ 2, s_0_3, 0, 8, 0},
{ 2, s_0_4, 0, 5, 0},
{ 2, s_0_5, 0, 1, 0},
{ 4, s_0_6, -1, 2, 0},
{ 2, s_0_7, 0, 6, 0},
{ 2, s_0_8, 0, 9, 0},
{ 2, s_0_9, 0, 2, 0},
{ 2, s_0_10, 0, 5, 0},
{ 2, s_0_11, 0, 7, 0},
{ 2, s_0_12, 0, 1, 0},
{ 2, s_0_13, 0, 1, 0},
{ 2, s_0_14, 0, 4, 0},
{ 2, s_0_15, 0, 10, 0},
{ 2, s_0_16, 0, 1, 0},
{ 2, s_0_17, 0, 6, 0},
{ 2, s_0_18, 0, 7, 0},
{ 2, s_0_19, 0, 8, 0},
{ 2, s_0_20, 0, 3, 0},
{ 2, s_0_21, 0, 1, 0},
{ 2, s_0_22, 0, 9, 0},
{ 2, s_0_23, 0, 3, 0}
};
static const symbol s_1_0[7] = { 0xC3, 0xAD, 'o', 'c', 'h', 't', 'a' };
@ -98,25 +114,23 @@ static const symbol s_1_12[6] = { 0xC3, 0xAD, 'o', 'c', 'h', 't' };
static const symbol s_1_13[7] = { 'a', 0xC3, 0xAD, 'o', 'c', 'h', 't' };
static const symbol s_1_14[4] = { 'i', 'r', 0xC3, 0xAD };
static const symbol s_1_15[5] = { 'a', 'i', 'r', 0xC3, 0xAD };
static const struct among a_1[16] =
{
{ 7, s_1_0, -1, 1, 0},
{ 8, s_1_1, 0, 1, 0},
{ 3, s_1_2, -1, 2, 0},
{ 4, s_1_3, 2, 2, 0},
{ 3, s_1_4, -1, 1, 0},
{ 4, s_1_5, 4, 1, 0},
{ 3, s_1_6, -1, 1, 0},
{ 4, s_1_7, 6, 1, 0},
{ 3, s_1_8, -1, 1, 0},
{ 4, s_1_9, 8, 1, 0},
{ 3, s_1_10, -1, 1, 0},
{ 4, s_1_11, 10, 1, 0},
{ 6, s_1_12, -1, 1, 0},
{ 7, s_1_13, 12, 1, 0},
{ 4, s_1_14, -1, 2, 0},
{ 5, s_1_15, 14, 2, 0}
static const struct among a_1[16] = {
{ 7, s_1_0, 0, 1, 0},
{ 8, s_1_1, -1, 1, 0},
{ 3, s_1_2, 0, 2, 0},
{ 4, s_1_3, -1, 2, 0},
{ 3, s_1_4, 0, 1, 0},
{ 4, s_1_5, -1, 1, 0},
{ 3, s_1_6, 0, 1, 0},
{ 4, s_1_7, -1, 1, 0},
{ 3, s_1_8, 0, 1, 0},
{ 4, s_1_9, -1, 1, 0},
{ 3, s_1_10, 0, 1, 0},
{ 4, s_1_11, -1, 1, 0},
{ 6, s_1_12, 0, 1, 0},
{ 7, s_1_13, -1, 1, 0},
{ 4, s_1_14, 0, 2, 0},
{ 5, s_1_15, -1, 2, 0}
};
static const symbol s_2_0[9] = { 0xC3, 0xB3, 'i', 'd', 'e', 'a', 'c', 'h', 'a' };
@ -144,34 +158,32 @@ static const symbol s_2_21[5] = { 'e', 'a', 'c', 'h', 't' };
static const symbol s_2_22[11] = { 'g', 'r', 'a', 'f', 'a', 0xC3, 0xAD, 'o', 'c', 'h', 't' };
static const symbol s_2_23[10] = { 'a', 'r', 'c', 'a', 'c', 'h', 't', 'a', 0xC3, 0xAD };
static const symbol s_2_24[14] = { 'g', 'r', 'a', 'f', 'a', 0xC3, 0xAD, 'o', 'c', 'h', 't', 'a', 0xC3, 0xAD };
static const struct among a_2[25] =
{
{ 9, s_2_0, -1, 6, 0},
{ 7, s_2_1, -1, 5, 0},
{ 5, s_2_2, -1, 1, 0},
{ 8, s_2_3, 2, 2, 0},
{ 6, s_2_4, 2, 1, 0},
{ 12, s_2_5, -1, 4, 0},
{ 5, s_2_6, -1, 5, 0},
{ 3, s_2_7, -1, 1, 0},
{ 4, s_2_8, 7, 1, 0},
{ 8, s_2_9, 8, 6, 0},
{ 7, s_2_10, 8, 3, 0},
{ 6, s_2_11, 7, 5, 0},
{ 10, s_2_12, -1, 4, 0},
{ 7, s_2_13, -1, 5, 0},
{ 7, s_2_14, -1, 6, 0},
{ 8, s_2_15, -1, 1, 0},
{ 9, s_2_16, 15, 1, 0},
{ 6, s_2_17, -1, 3, 0},
{ 5, s_2_18, -1, 3, 0},
{ 4, s_2_19, -1, 1, 0},
{ 7, s_2_20, 19, 2, 0},
{ 5, s_2_21, 19, 1, 0},
{ 11, s_2_22, -1, 4, 0},
{ 10, s_2_23, -1, 2, 0},
{ 14, s_2_24, -1, 4, 0}
static const struct among a_2[25] = {
{ 9, s_2_0, 0, 6, 0},
{ 7, s_2_1, 0, 5, 0},
{ 5, s_2_2, 0, 1, 0},
{ 8, s_2_3, -1, 2, 0},
{ 6, s_2_4, -2, 1, 0},
{ 12, s_2_5, 0, 4, 0},
{ 5, s_2_6, 0, 5, 0},
{ 3, s_2_7, 0, 1, 0},
{ 4, s_2_8, -1, 1, 0},
{ 8, s_2_9, -1, 6, 0},
{ 7, s_2_10, -2, 3, 0},
{ 6, s_2_11, -4, 5, 0},
{ 10, s_2_12, 0, 4, 0},
{ 7, s_2_13, 0, 5, 0},
{ 7, s_2_14, 0, 6, 0},
{ 8, s_2_15, 0, 1, 0},
{ 9, s_2_16, -1, 1, 0},
{ 6, s_2_17, 0, 3, 0},
{ 5, s_2_18, 0, 3, 0},
{ 4, s_2_19, 0, 1, 0},
{ 7, s_2_20, -1, 2, 0},
{ 5, s_2_21, -2, 1, 0},
{ 11, s_2_22, 0, 4, 0},
{ 10, s_2_23, 0, 2, 0},
{ 14, s_2_24, 0, 4, 0}
};
static const symbol s_3_0[4] = { 'i', 'm', 'i', 'd' };
@ -186,74 +198,54 @@ static const symbol s_3_8[4] = { 0xC3, 0xA1, 'i', 'l' };
static const symbol s_3_9[3] = { 'a', 'i', 'n' };
static const symbol s_3_10[4] = { 't', 'e', 'a', 'r' };
static const symbol s_3_11[3] = { 't', 'a', 'r' };
static const struct among a_3[12] =
{
{ 4, s_3_0, -1, 1, 0},
{ 5, s_3_1, 0, 1, 0},
{ 5, s_3_2, -1, 1, 0},
{ 6, s_3_3, 2, 1, 0},
{ 3, s_3_4, -1, 2, 0},
{ 4, s_3_5, 4, 2, 0},
{ 5, s_3_6, -1, 1, 0},
{ 4, s_3_7, -1, 1, 0},
{ 4, s_3_8, -1, 2, 0},
{ 3, s_3_9, -1, 2, 0},
{ 4, s_3_10, -1, 2, 0},
{ 3, s_3_11, -1, 2, 0}
static const struct among a_3[12] = {
{ 4, s_3_0, 0, 1, 0},
{ 5, s_3_1, -1, 1, 0},
{ 5, s_3_2, 0, 1, 0},
{ 6, s_3_3, -1, 1, 0},
{ 3, s_3_4, 0, 2, 0},
{ 4, s_3_5, -1, 2, 0},
{ 5, s_3_6, 0, 1, 0},
{ 4, s_3_7, 0, 1, 0},
{ 4, s_3_8, 0, 2, 0},
{ 3, s_3_9, 0, 2, 0},
{ 4, s_3_10, 0, 2, 0},
{ 3, s_3_11, 0, 2, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 2 };
static const symbol s_0[] = { 'f' };
static const symbol s_1[] = { 's' };
static const symbol s_2[] = { 'b' };
static const symbol s_3[] = { 'c' };
static const symbol s_4[] = { 'd' };
static const symbol s_5[] = { 'g' };
static const symbol s_6[] = { 'p' };
static const symbol s_7[] = { 't' };
static const symbol s_8[] = { 'm' };
static const symbol s_9[] = { 'a', 'r', 'c' };
static const symbol s_10[] = { 'g', 'i', 'n' };
static const symbol s_11[] = { 'g', 'r', 'a', 'f' };
static const symbol s_12[] = { 'p', 'a', 'i', 't', 'e' };
static const symbol s_13[] = { 0xC3, 0xB3, 'i', 'd' };
static int r_mark_regions(struct SN_env * z) {
z->I[2] = z->l;
z->I[1] = z->l;
z->I[0] = z->l;
{ int c1 = z->c;
((SN_local *)z)->i_pV = z->l;
((SN_local *)z)->i_p1 = z->l;
((SN_local *)z)->i_p2 = z->l;
{
int v_1 = z->c;
{
int ret = out_grouping_U(z, g_v, 97, 250, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[2] = z->c;
((SN_local *)z)->i_pV = z->c;
{
int ret = in_grouping_U(z, g_v, 97, 250, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[1] = z->c;
((SN_local *)z)->i_p1 = z->c;
{
int ret = out_grouping_U(z, g_v, 97, 250, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{
int ret = in_grouping_U(z, g_v, 97, 250, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[0] = z->c;
((SN_local *)z)->i_p2 = z->c;
lab0:
z->c = c1;
z->c = v_1;
}
return 1;
}
@ -261,57 +253,67 @@ static int r_mark_regions(struct SN_env * z) {
static int r_initial_morph(struct SN_env * z) {
int among_var;
z->bra = z->c;
among_var = find_among(z, a_0, 24);
among_var = find_among(z, a_0, 24, 0);
if (!among_var) return 0;
z->ket = z->c;
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 1, s_0);
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 1, s_1);
{
int ret = slice_from_s(z, 1, s_1);
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 1, s_2);
{
int ret = slice_from_s(z, 1, s_2);
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 1, s_3);
{
int ret = slice_from_s(z, 1, s_3);
if (ret < 0) return ret;
}
break;
case 6:
{ int ret = slice_from_s(z, 1, s_4);
{
int ret = slice_from_s(z, 1, s_4);
if (ret < 0) return ret;
}
break;
case 7:
{ int ret = slice_from_s(z, 1, s_5);
{
int ret = slice_from_s(z, 1, s_5);
if (ret < 0) return ret;
}
break;
case 8:
{ int ret = slice_from_s(z, 1, s_6);
{
int ret = slice_from_s(z, 1, s_6);
if (ret < 0) return ret;
}
break;
case 9:
{ int ret = slice_from_s(z, 1, s_7);
{
int ret = slice_from_s(z, 1, s_7);
if (ret < 0) return ret;
}
break;
case 10:
{ int ret = slice_from_s(z, 1, s_8);
{
int ret = slice_from_s(z, 1, s_8);
if (ret < 0) return ret;
}
break;
@ -320,37 +322,41 @@ static int r_initial_morph(struct SN_env * z) {
}
static int r_RV(struct SN_env * z) {
return z->I[2] <= z->c;
return ((SN_local *)z)->i_pV <= z->c;
}
static int r_R1(struct SN_env * z) {
return z->I[1] <= z->c;
return ((SN_local *)z)->i_p1 <= z->c;
}
static int r_R2(struct SN_env * z) {
return z->I[0] <= z->c;
return ((SN_local *)z)->i_p2 <= z->c;
}
static int r_noun_sfx(struct SN_env * z) {
int among_var;
z->ket = z->c;
among_var = find_among_b(z, a_1, 16);
among_var = find_among_b(z, a_1, 16, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int ret = r_R1(z);
{
int ret = r_R1(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = r_R2(z);
{
int ret = r_R2(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -361,40 +367,47 @@ static int r_noun_sfx(struct SN_env * z) {
static int r_deriv(struct SN_env * z) {
int among_var;
z->ket = z->c;
among_var = find_among_b(z, a_2, 25);
among_var = find_among_b(z, a_2, 25, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int ret = r_R2(z);
{
int ret = r_R2(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_from_s(z, 3, s_9);
{
int ret = slice_from_s(z, 3, s_9);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 3, s_10);
{
int ret = slice_from_s(z, 3, s_10);
if (ret < 0) return ret;
}
break;
case 4:
{ int ret = slice_from_s(z, 4, s_11);
{
int ret = slice_from_s(z, 4, s_11);
if (ret < 0) return ret;
}
break;
case 5:
{ int ret = slice_from_s(z, 5, s_12);
{
int ret = slice_from_s(z, 5, s_12);
if (ret < 0) return ret;
}
break;
case 6:
{ int ret = slice_from_s(z, 4, s_13);
{
int ret = slice_from_s(z, 4, s_13);
if (ret < 0) return ret;
}
break;
@ -406,23 +419,27 @@ static int r_verb_sfx(struct SN_env * z) {
int among_var;
z->ket = z->c;
if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((282896 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_3, 12);
among_var = find_among_b(z, a_3, 12, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int ret = r_RV(z);
{
int ret = r_RV(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = r_R1(z);
{
int ret = r_R1(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -431,41 +448,58 @@ static int r_verb_sfx(struct SN_env * z) {
}
extern int irish_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c;
{ int ret = r_initial_morph(z);
{
int v_1 = z->c;
{
int ret = r_initial_morph(z);
if (ret < 0) return ret;
}
z->c = c1;
z->c = v_1;
}
{ int ret = r_mark_regions(z);
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->lb = z->c; z->c = z->l;
{ int m2 = z->l - z->c; (void)m2;
{ int ret = r_noun_sfx(z);
{
int v_2 = z->l - z->c;
{
int ret = r_noun_sfx(z);
if (ret < 0) return ret;
}
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_deriv(z);
{
int v_3 = z->l - z->c;
{
int ret = r_deriv(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_verb_sfx(z);
{
int v_4 = z->l - z->c;
{
int ret = r_verb_sfx(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * irish_UTF_8_create_env(void) { return SN_create_env(0, 3); }
extern struct SN_env * irish_UTF_8_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p2 = 0;
((SN_local *)z)->i_p1 = 0;
((SN_local *)z)->i_pV = 0;
}
return z;
}
extern void irish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void irish_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,10 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from nepali.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_UTF_8_nepali.h"
#include <stddef.h>
#include "snowball_runtime.h"
#ifdef __cplusplus
extern "C" {
@ -9,22 +13,19 @@ extern int nepali_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_remove_category_3(struct SN_env * z);
static int r_remove_category_2(struct SN_env * z);
static int r_check_category_2(struct SN_env * z);
static int r_remove_category_1(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static const symbol s_0[] = { 0xE0, 0xA4, 0x8F };
static const symbol s_1[] = { 0xE0, 0xA5, 0x87 };
static const symbol s_2[] = { 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
static const symbol s_3[] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_4[] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8C };
static const symbol s_5[] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x87 };
static const symbol s_6[] = { 0xE0, 0xA4, 0xA4, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xB0 };
extern struct SN_env * nepali_UTF_8_create_env(void);
extern void nepali_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[6] = { 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
static const symbol s_0_1[9] = { 0xE0, 0xA4, 0xB2, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0x87 };
static const symbol s_0_2[6] = { 0xE0, 0xA4, 0xB2, 0xE0, 0xA5, 0x87 };
@ -42,320 +43,288 @@ static const symbol s_0_13[6] = { 0xE0, 0xA4, 0xAE, 0xE0, 0xA4, 0xBE };
static const symbol s_0_14[18] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xB5, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xB0, 0xE0, 0xA4, 0xBE };
static const symbol s_0_15[6] = { 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBF };
static const symbol s_0_16[9] = { 0xE0, 0xA4, 0xAA, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xBF };
static const struct among a_0[17] =
{
{ 6, s_0_0, -1, 2, 0},
{ 9, s_0_1, -1, 1, 0},
{ 6, s_0_2, -1, 1, 0},
{ 9, s_0_3, -1, 1, 0},
{ 6, s_0_4, -1, 2, 0},
{ 12, s_0_5, -1, 1, 0},
{ 6, s_0_6, -1, 1, 0},
{ 6, s_0_7, -1, 2, 0},
{ 9, s_0_8, -1, 1, 0},
{ 9, s_0_9, -1, 1, 0},
{ 18, s_0_10, -1, 1, 0},
{ 6, s_0_11, -1, 1, 0},
{ 6, s_0_12, -1, 2, 0},
{ 6, s_0_13, -1, 1, 0},
{ 18, s_0_14, -1, 1, 0},
{ 6, s_0_15, -1, 2, 0},
{ 9, s_0_16, -1, 1, 0}
static const struct among a_0[17] = {
{ 6, s_0_0, 0, 2, 0},
{ 9, s_0_1, 0, 1, 0},
{ 6, s_0_2, 0, 1, 0},
{ 9, s_0_3, 0, 1, 0},
{ 6, s_0_4, 0, 2, 0},
{ 12, s_0_5, 0, 1, 0},
{ 6, s_0_6, 0, 1, 0},
{ 6, s_0_7, 0, 2, 0},
{ 9, s_0_8, 0, 1, 0},
{ 9, s_0_9, 0, 1, 0},
{ 18, s_0_10, 0, 1, 0},
{ 6, s_0_11, 0, 1, 0},
{ 6, s_0_12, 0, 2, 0},
{ 6, s_0_13, 0, 1, 0},
{ 18, s_0_14, 0, 1, 0},
{ 6, s_0_15, 0, 2, 0},
{ 9, s_0_16, 0, 1, 0}
};
static const symbol s_1_0[3] = { 0xE0, 0xA4, 0x81 };
static const symbol s_1_1[3] = { 0xE0, 0xA4, 0x82 };
static const symbol s_1_2[3] = { 0xE0, 0xA5, 0x88 };
static const struct among a_1[3] =
{
{ 3, s_1_0, -1, -1, 0},
{ 3, s_1_1, -1, -1, 0},
{ 3, s_1_2, -1, -1, 0}
static const struct among a_1[3] = {
{ 3, s_1_0, 0, 1, 0},
{ 3, s_1_1, 0, 1, 0},
{ 3, s_1_2, 0, 2, 0}
};
static const symbol s_2_0[3] = { 0xE0, 0xA4, 0x81 };
static const symbol s_2_1[3] = { 0xE0, 0xA4, 0x82 };
static const symbol s_2_2[3] = { 0xE0, 0xA5, 0x88 };
static const struct among a_2[3] =
{
{ 3, s_2_0, -1, 1, 0},
{ 3, s_2_1, -1, 1, 0},
{ 3, s_2_2, -1, 2, 0}
static const symbol s_2_0[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
static const symbol s_2_1[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
static const symbol s_2_2[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
static const symbol s_2_3[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
static const symbol s_2_4[12] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x96, 0xE0, 0xA5, 0x80 };
static const symbol s_2_5[6] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x80 };
static const symbol s_2_6[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x80 };
static const symbol s_2_7[6] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
static const symbol s_2_8[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
static const symbol s_2_9[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
static const symbol s_2_10[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
static const symbol s_2_11[6] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x81 };
static const symbol s_2_12[9] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA4, 0xB0, 0xE0, 0xA5, 0x81 };
static const symbol s_2_13[9] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA4, 0xB0, 0xE0, 0xA5, 0x82 };
static const symbol s_2_14[6] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x87 };
static const symbol s_2_15[6] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x87 };
static const symbol s_2_16[6] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87 };
static const symbol s_2_17[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x88 };
static const symbol s_2_18[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x88 };
static const symbol s_2_19[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x88 };
static const symbol s_2_20[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x88 };
static const symbol s_2_21[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x88 };
static const symbol s_2_22[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x88 };
static const symbol s_2_23[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
static const symbol s_2_24[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
static const symbol s_2_25[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
static const symbol s_2_26[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
static const symbol s_2_27[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
static const symbol s_2_28[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8B };
static const symbol s_2_29[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8B };
static const symbol s_2_30[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8B };
static const symbol s_2_31[6] = { 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_2_32[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_2_33[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_2_34[9] = { 0xE0, 0xA4, 0xAD, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_2_35[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_2_36[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_2_37[12] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_2_38[6] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_2_39[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_2_40[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_2_41[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_2_42[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_2_43[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_2_44[6] = { 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
static const symbol s_2_45[12] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
static const symbol s_2_46[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
static const symbol s_2_47[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
static const symbol s_2_48[9] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_49[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_50[12] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_51[15] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_52[12] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_53[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_54[12] = { 0xE0, 0xA4, 0xB2, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_55[12] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_56[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_57[9] = { 0xE0, 0xA4, 0xAA, 0xE0, 0xA4, 0xB0, 0xE0, 0xA5, 0x8D };
static const symbol s_2_58[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_59[15] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_60[12] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_61[12] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA5, 0x8B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_62[9] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_63[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_64[12] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_65[15] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_66[12] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_67[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_68[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_69[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_2_70[9] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F };
static const symbol s_2_71[3] = { 0xE0, 0xA4, 0x9B };
static const symbol s_2_72[6] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B };
static const symbol s_2_73[6] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B };
static const symbol s_2_74[9] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B };
static const symbol s_2_75[15] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA5, 0x81, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B };
static const symbol s_2_76[15] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA5, 0x81, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0x9B };
static const symbol s_2_77[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0x9B };
static const symbol s_2_78[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0x9B };
static const symbol s_2_79[6] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B };
static const symbol s_2_80[6] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B };
static const symbol s_2_81[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
static const symbol s_2_82[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
static const symbol s_2_83[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
static const symbol s_2_84[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
static const symbol s_2_85[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
static const symbol s_2_86[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBE };
static const symbol s_2_87[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBE };
static const symbol s_2_88[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBE };
static const symbol s_2_89[12] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x96, 0xE0, 0xA4, 0xBF };
static const symbol s_2_90[12] = { 0xE0, 0xA4, 0xAE, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF };
static const struct among a_2[91] = {
{ 9, s_2_0, 0, 1, 0},
{ 9, s_2_1, 0, 1, 0},
{ 12, s_2_2, -1, 1, 0},
{ 12, s_2_3, -2, 1, 0},
{ 12, s_2_4, 0, 1, 0},
{ 6, s_2_5, 0, 1, 0},
{ 6, s_2_6, 0, 1, 0},
{ 6, s_2_7, 0, 1, 0},
{ 9, s_2_8, -1, 1, 0},
{ 12, s_2_9, -1, 1, 0},
{ 9, s_2_10, -3, 1, 0},
{ 6, s_2_11, 0, 1, 0},
{ 9, s_2_12, 0, 1, 0},
{ 9, s_2_13, 0, 1, 0},
{ 6, s_2_14, 0, 1, 0},
{ 6, s_2_15, 0, 1, 0},
{ 6, s_2_16, 0, 1, 0},
{ 9, s_2_17, 0, 1, 0},
{ 12, s_2_18, -1, 1, 0},
{ 9, s_2_19, 0, 1, 0},
{ 6, s_2_20, 0, 1, 0},
{ 9, s_2_21, -1, 1, 0},
{ 9, s_2_22, -2, 1, 0},
{ 9, s_2_23, 0, 1, 0},
{ 12, s_2_24, -1, 1, 0},
{ 9, s_2_25, 0, 1, 0},
{ 12, s_2_26, -1, 1, 0},
{ 12, s_2_27, -2, 1, 0},
{ 6, s_2_28, 0, 1, 0},
{ 9, s_2_29, -1, 1, 0},
{ 9, s_2_30, -2, 1, 0},
{ 6, s_2_31, 0, 1, 0},
{ 9, s_2_32, -1, 1, 0},
{ 12, s_2_33, -2, 1, 0},
{ 9, s_2_34, -3, 1, 0},
{ 9, s_2_35, -4, 1, 0},
{ 12, s_2_36, -1, 1, 0},
{ 12, s_2_37, -2, 1, 0},
{ 6, s_2_38, 0, 1, 0},
{ 9, s_2_39, -1, 1, 0},
{ 9, s_2_40, -2, 1, 0},
{ 12, s_2_41, -1, 1, 0},
{ 9, s_2_42, -4, 1, 0},
{ 9, s_2_43, -5, 1, 0},
{ 6, s_2_44, 0, 1, 0},
{ 12, s_2_45, -1, 1, 0},
{ 12, s_2_46, -2, 1, 0},
{ 12, s_2_47, -3, 1, 0},
{ 9, s_2_48, 0, 1, 0},
{ 12, s_2_49, -1, 1, 0},
{ 12, s_2_50, -2, 1, 0},
{ 15, s_2_51, -1, 1, 0},
{ 12, s_2_52, -4, 1, 0},
{ 12, s_2_53, -5, 1, 0},
{ 12, s_2_54, 0, 1, 0},
{ 12, s_2_55, 0, 1, 0},
{ 12, s_2_56, 0, 1, 0},
{ 9, s_2_57, 0, 1, 0},
{ 9, s_2_58, 0, 1, 0},
{ 15, s_2_59, -1, 1, 0},
{ 12, s_2_60, 0, 1, 0},
{ 12, s_2_61, 0, 1, 0},
{ 9, s_2_62, 0, 1, 0},
{ 12, s_2_63, -1, 1, 0},
{ 12, s_2_64, -2, 1, 0},
{ 15, s_2_65, -1, 1, 0},
{ 12, s_2_66, -4, 1, 0},
{ 12, s_2_67, -5, 1, 0},
{ 9, s_2_68, 0, 1, 0},
{ 12, s_2_69, -1, 1, 0},
{ 9, s_2_70, 0, 1, 0},
{ 3, s_2_71, 0, 1, 0},
{ 6, s_2_72, -1, 1, 0},
{ 6, s_2_73, -2, 1, 0},
{ 9, s_2_74, -1, 1, 0},
{ 15, s_2_75, -1, 1, 0},
{ 15, s_2_76, -5, 1, 0},
{ 12, s_2_77, -6, 1, 0},
{ 12, s_2_78, -7, 1, 0},
{ 6, s_2_79, -8, 1, 0},
{ 6, s_2_80, -9, 1, 0},
{ 9, s_2_81, 0, 1, 0},
{ 12, s_2_82, -1, 1, 0},
{ 9, s_2_83, 0, 1, 0},
{ 12, s_2_84, -1, 1, 0},
{ 12, s_2_85, -2, 1, 0},
{ 6, s_2_86, 0, 1, 0},
{ 9, s_2_87, -1, 1, 0},
{ 9, s_2_88, -2, 1, 0},
{ 12, s_2_89, 0, 1, 0},
{ 12, s_2_90, 0, 1, 0}
};
static const symbol s_3_0[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
static const symbol s_3_1[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
static const symbol s_3_2[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
static const symbol s_3_3[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x80 };
static const symbol s_3_4[12] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x96, 0xE0, 0xA5, 0x80 };
static const symbol s_3_5[6] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x80 };
static const symbol s_3_6[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x80 };
static const symbol s_3_7[6] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
static const symbol s_3_8[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
static const symbol s_3_9[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
static const symbol s_3_10[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x81 };
static const symbol s_3_11[6] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x81 };
static const symbol s_3_12[9] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA4, 0xB0, 0xE0, 0xA5, 0x81 };
static const symbol s_3_13[9] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA4, 0xB0, 0xE0, 0xA5, 0x82 };
static const symbol s_3_14[6] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x87 };
static const symbol s_3_15[6] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x87 };
static const symbol s_3_16[6] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87 };
static const symbol s_3_17[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x88 };
static const symbol s_3_18[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x88 };
static const symbol s_3_19[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x88 };
static const symbol s_3_20[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x88 };
static const symbol s_3_21[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x88 };
static const symbol s_3_22[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x88 };
static const symbol s_3_23[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
static const symbol s_3_24[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
static const symbol s_3_25[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
static const symbol s_3_26[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
static const symbol s_3_27[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA5, 0x8B };
static const symbol s_3_28[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8B };
static const symbol s_3_29[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8B };
static const symbol s_3_30[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x8B };
static const symbol s_3_31[6] = { 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_3_32[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_3_33[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_3_34[9] = { 0xE0, 0xA4, 0xAD, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_3_35[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_3_36[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_3_37[12] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8B };
static const symbol s_3_38[6] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_3_39[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_3_40[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_3_41[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_3_42[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_3_43[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_3_44[6] = { 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
static const symbol s_3_45[12] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
static const symbol s_3_46[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
static const symbol s_3_47[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
static const symbol s_3_48[9] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_49[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_50[12] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_51[15] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_52[12] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_53[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_54[12] = { 0xE0, 0xA4, 0xB2, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_55[12] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_56[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_57[9] = { 0xE0, 0xA4, 0xAA, 0xE0, 0xA4, 0xB0, 0xE0, 0xA5, 0x8D };
static const symbol s_3_58[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_59[15] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_60[12] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_61[12] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA5, 0x8B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_62[9] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_63[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_64[12] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_65[15] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_66[12] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_67[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_68[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_69[12] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xB8, 0xE0, 0xA5, 0x8D };
static const symbol s_3_70[9] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F };
static const symbol s_3_71[3] = { 0xE0, 0xA4, 0x9B };
static const symbol s_3_72[6] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x9B };
static const symbol s_3_73[6] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B };
static const symbol s_3_74[9] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B };
static const symbol s_3_75[15] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA5, 0x81, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x9B };
static const symbol s_3_76[15] = { 0xE0, 0xA4, 0xB9, 0xE0, 0xA5, 0x81, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0x9B };
static const symbol s_3_77[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0x9B };
static const symbol s_3_78[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0x9B };
static const symbol s_3_79[6] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x9B };
static const symbol s_3_80[6] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x9B };
static const symbol s_3_81[9] = { 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
static const symbol s_3_82[12] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
static const symbol s_3_83[9] = { 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
static const symbol s_3_84[12] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
static const symbol s_3_85[12] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0x8F, 0xE0, 0xA4, 0x95, 0xE0, 0xA4, 0xBE };
static const symbol s_3_86[6] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBE };
static const symbol s_3_87[9] = { 0xE0, 0xA4, 0x87, 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBE };
static const symbol s_3_88[9] = { 0xE0, 0xA4, 0xBF, 0xE0, 0xA4, 0xA6, 0xE0, 0xA4, 0xBE };
static const symbol s_3_89[12] = { 0xE0, 0xA4, 0xA6, 0xE0, 0xA5, 0x87, 0xE0, 0xA4, 0x96, 0xE0, 0xA4, 0xBF };
static const symbol s_3_90[12] = { 0xE0, 0xA4, 0xAE, 0xE0, 0xA4, 0xBE, 0xE0, 0xA4, 0xA5, 0xE0, 0xA4, 0xBF };
static const struct among a_3[91] =
{
{ 9, s_3_0, -1, 1, 0},
{ 9, s_3_1, -1, 1, 0},
{ 12, s_3_2, 1, 1, 0},
{ 12, s_3_3, 1, 1, 0},
{ 12, s_3_4, -1, 1, 0},
{ 6, s_3_5, -1, 1, 0},
{ 6, s_3_6, -1, 1, 0},
{ 6, s_3_7, -1, 1, 0},
{ 9, s_3_8, 7, 1, 0},
{ 12, s_3_9, 8, 1, 0},
{ 9, s_3_10, 7, 1, 0},
{ 6, s_3_11, -1, 1, 0},
{ 9, s_3_12, -1, 1, 0},
{ 9, s_3_13, -1, 1, 0},
{ 6, s_3_14, -1, 1, 0},
{ 6, s_3_15, -1, 1, 0},
{ 6, s_3_16, -1, 1, 0},
{ 9, s_3_17, -1, 1, 0},
{ 12, s_3_18, 17, 1, 0},
{ 9, s_3_19, -1, 1, 0},
{ 6, s_3_20, -1, 1, 0},
{ 9, s_3_21, 20, 1, 0},
{ 9, s_3_22, 20, 1, 0},
{ 9, s_3_23, -1, 1, 0},
{ 12, s_3_24, 23, 1, 0},
{ 9, s_3_25, -1, 1, 0},
{ 12, s_3_26, 25, 1, 0},
{ 12, s_3_27, 25, 1, 0},
{ 6, s_3_28, -1, 1, 0},
{ 9, s_3_29, 28, 1, 0},
{ 9, s_3_30, 28, 1, 0},
{ 6, s_3_31, -1, 1, 0},
{ 9, s_3_32, 31, 1, 0},
{ 12, s_3_33, 31, 1, 0},
{ 9, s_3_34, 31, 1, 0},
{ 9, s_3_35, 31, 1, 0},
{ 12, s_3_36, 35, 1, 0},
{ 12, s_3_37, 35, 1, 0},
{ 6, s_3_38, -1, 1, 0},
{ 9, s_3_39, 38, 1, 0},
{ 9, s_3_40, 38, 1, 0},
{ 12, s_3_41, 40, 1, 0},
{ 9, s_3_42, 38, 1, 0},
{ 9, s_3_43, 38, 1, 0},
{ 6, s_3_44, -1, 1, 0},
{ 12, s_3_45, 44, 1, 0},
{ 12, s_3_46, 44, 1, 0},
{ 12, s_3_47, 44, 1, 0},
{ 9, s_3_48, -1, 1, 0},
{ 12, s_3_49, 48, 1, 0},
{ 12, s_3_50, 48, 1, 0},
{ 15, s_3_51, 50, 1, 0},
{ 12, s_3_52, 48, 1, 0},
{ 12, s_3_53, 48, 1, 0},
{ 12, s_3_54, -1, 1, 0},
{ 12, s_3_55, -1, 1, 0},
{ 12, s_3_56, -1, 1, 0},
{ 9, s_3_57, -1, 1, 0},
{ 9, s_3_58, -1, 1, 0},
{ 15, s_3_59, 58, 1, 0},
{ 12, s_3_60, -1, 1, 0},
{ 12, s_3_61, -1, 1, 0},
{ 9, s_3_62, -1, 1, 0},
{ 12, s_3_63, 62, 1, 0},
{ 12, s_3_64, 62, 1, 0},
{ 15, s_3_65, 64, 1, 0},
{ 12, s_3_66, 62, 1, 0},
{ 12, s_3_67, 62, 1, 0},
{ 9, s_3_68, -1, 1, 0},
{ 12, s_3_69, 68, 1, 0},
{ 9, s_3_70, -1, 1, 0},
{ 3, s_3_71, -1, 1, 0},
{ 6, s_3_72, 71, 1, 0},
{ 6, s_3_73, 71, 1, 0},
{ 9, s_3_74, 73, 1, 0},
{ 15, s_3_75, 74, 1, 0},
{ 15, s_3_76, 71, 1, 0},
{ 12, s_3_77, 71, 1, 0},
{ 12, s_3_78, 71, 1, 0},
{ 6, s_3_79, 71, 1, 0},
{ 6, s_3_80, 71, 1, 0},
{ 9, s_3_81, -1, 1, 0},
{ 12, s_3_82, 81, 1, 0},
{ 9, s_3_83, -1, 1, 0},
{ 12, s_3_84, 83, 1, 0},
{ 12, s_3_85, 83, 1, 0},
{ 6, s_3_86, -1, 1, 0},
{ 9, s_3_87, 86, 1, 0},
{ 9, s_3_88, 86, 1, 0},
{ 12, s_3_89, -1, 1, 0},
{ 12, s_3_90, -1, 1, 0}
};
static const symbol s_0[] = { 0xE0, 0xA4, 0x8F };
static const symbol s_1[] = { 0xE0, 0xA5, 0x87 };
static const symbol s_2[] = { 0xE0, 0xA4, 0xAF, 0xE0, 0xA5, 0x8C };
static const symbol s_3[] = { 0xE0, 0xA4, 0x9B, 0xE0, 0xA5, 0x8C };
static const symbol s_4[] = { 0xE0, 0xA4, 0xA8, 0xE0, 0xA5, 0x8C };
static const symbol s_5[] = { 0xE0, 0xA4, 0xA5, 0xE0, 0xA5, 0x87 };
static const symbol s_6[] = { 0xE0, 0xA4, 0xA4, 0xE0, 0xA5, 0x8D, 0xE0, 0xA4, 0xB0 };
static int r_remove_category_1(struct SN_env * z) {
int among_var;
z->ket = z->c;
among_var = find_among_b(z, a_0, 17);
among_var = find_among_b(z, a_0, 17, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int m1 = z->l - z->c; (void)m1;
{ int m2 = z->l - z->c; (void)m2;
if (!(eq_s_b(z, 3, s_0))) goto lab3;
goto lab2;
lab3:
z->c = z->l - m2;
if (!(eq_s_b(z, 3, s_1))) goto lab1;
}
lab2:
goto lab0;
do {
int v_1 = z->l - z->c;
if (!(eq_s_b(z, 3, s_0))) goto lab0;
break;
lab0:
z->c = z->l - v_1;
if (!(eq_s_b(z, 3, s_1))) goto lab1;
break;
lab1:
z->c = z->l - m1;
{ int ret = slice_del(z);
z->c = z->l - v_1;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
}
lab0:
} while (0);
break;
}
return 1;
}
static int r_check_category_2(struct SN_env * z) {
z->ket = z->c;
if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 4 || !((262 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
if (!find_among_b(z, a_1, 3)) return 0;
z->bra = z->c;
return 1;
}
static int r_remove_category_2(struct SN_env * z) {
int among_var;
z->ket = z->c;
if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 4 || !((262 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
among_var = find_among_b(z, a_2, 3);
among_var = find_among_b(z, a_1, 3, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int m1 = z->l - z->c; (void)m1;
if (!(eq_s_b(z, 6, s_2))) goto lab1;
goto lab0;
do {
int v_1 = z->l - z->c;
if (!(eq_s_b(z, 6, s_2))) goto lab0;
break;
lab0:
z->c = z->l - v_1;
if (!(eq_s_b(z, 6, s_3))) goto lab1;
break;
lab1:
z->c = z->l - m1;
if (!(eq_s_b(z, 6, s_3))) goto lab2;
goto lab0;
z->c = z->l - v_1;
if (!(eq_s_b(z, 6, s_4))) goto lab2;
break;
lab2:
z->c = z->l - m1;
if (!(eq_s_b(z, 6, s_4))) goto lab3;
goto lab0;
lab3:
z->c = z->l - m1;
z->c = z->l - v_1;
if (!(eq_s_b(z, 6, s_5))) return 0;
}
lab0:
{ int ret = slice_del(z);
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (!(eq_s_b(z, 9, s_6))) return 0;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -365,9 +334,10 @@ static int r_remove_category_2(struct SN_env * z) {
static int r_remove_category_3(struct SN_env * z) {
z->ket = z->c;
if (!find_among_b(z, a_3, 91)) return 0;
if (!find_among_b(z, a_2, 91, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -375,47 +345,43 @@ static int r_remove_category_3(struct SN_env * z) {
extern int nepali_UTF_8_stem(struct SN_env * z) {
z->lb = z->c; z->c = z->l;
{ int m1 = z->l - z->c; (void)m1;
{ int ret = r_remove_category_1(z);
{
int v_1 = z->l - z->c;
{
int ret = r_remove_category_1(z);
if (ret < 0) return ret;
}
z->c = z->l - m1;
z->c = z->l - v_1;
}
{ int m2 = z->l - z->c; (void)m2;
while(1) {
int m3 = z->l - z->c; (void)m3;
{ int m4 = z->l - z->c; (void)m4;
{ int m5 = z->l - z->c; (void)m5;
{ int ret = r_check_category_2(z);
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
z->c = z->l - m5;
{ int ret = r_remove_category_2(z);
if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
}
lab2:
z->c = z->l - m4;
}
{ int ret = r_remove_category_3(z);
if (ret == 0) goto lab1;
while (1) {
int v_2 = z->l - z->c;
{
int v_3 = z->l - z->c;
{
int ret = r_remove_category_2(z);
if (ret < 0) return ret;
}
continue;
lab1:
z->c = z->l - m3;
break;
z->c = z->l - v_3;
}
z->c = z->l - m2;
{
int ret = r_remove_category_3(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
continue;
lab0:
z->c = z->l - v_2;
break;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * nepali_UTF_8_create_env(void) { return SN_create_env(0, 0); }
extern struct SN_env * nepali_UTF_8_create_env(void) {
return SN_new_env(sizeof(struct SN_env));
}
extern void nepali_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void nepali_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

View file

@ -1,6 +1,17 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from norwegian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_UTF_8_norwegian.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p1;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,189 +20,237 @@ extern int norwegian_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_other_suffix(struct SN_env * z);
static int r_consonant_pair(struct SN_env * z);
static int r_main_suffix(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * norwegian_UTF_8_create_env(void);
extern void norwegian_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[1] = { 'a' };
static const symbol s_0_1[1] = { 'e' };
static const symbol s_0_2[3] = { 'e', 'd', 'e' };
static const symbol s_0_3[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_0_4[4] = { 'e', 'n', 'd', 'e' };
static const symbol s_0_5[3] = { 'a', 'n', 'e' };
static const symbol s_0_6[3] = { 'e', 'n', 'e' };
static const symbol s_0_7[6] = { 'h', 'e', 't', 'e', 'n', 'e' };
static const symbol s_0_8[4] = { 'e', 'r', 't', 'e' };
static const symbol s_0_9[2] = { 'e', 'n' };
static const symbol s_0_10[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_0_11[2] = { 'a', 'r' };
static const symbol s_0_12[2] = { 'e', 'r' };
static const symbol s_0_13[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_0_14[1] = { 's' };
static const symbol s_0_15[2] = { 'a', 's' };
static const symbol s_0_16[2] = { 'e', 's' };
static const symbol s_0_17[4] = { 'e', 'd', 'e', 's' };
static const symbol s_0_18[5] = { 'e', 'n', 'd', 'e', 's' };
static const symbol s_0_19[4] = { 'e', 'n', 'e', 's' };
static const symbol s_0_20[7] = { 'h', 'e', 't', 'e', 'n', 'e', 's' };
static const symbol s_0_21[3] = { 'e', 'n', 's' };
static const symbol s_0_22[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_0_23[3] = { 'e', 'r', 's' };
static const symbol s_0_24[3] = { 'e', 't', 's' };
static const symbol s_0_25[2] = { 'e', 't' };
static const symbol s_0_26[3] = { 'h', 'e', 't' };
static const symbol s_0_27[3] = { 'e', 'r', 't' };
static const symbol s_0_28[3] = { 'a', 's', 't' };
static const struct among a_0[29] =
{
{ 1, s_0_0, -1, 1, 0},
{ 1, s_0_1, -1, 1, 0},
{ 3, s_0_2, 1, 1, 0},
{ 4, s_0_3, 1, 1, 0},
{ 4, s_0_4, 1, 1, 0},
{ 3, s_0_5, 1, 1, 0},
{ 3, s_0_6, 1, 1, 0},
{ 6, s_0_7, 6, 1, 0},
{ 4, s_0_8, 1, 3, 0},
{ 2, s_0_9, -1, 1, 0},
{ 5, s_0_10, 9, 1, 0},
{ 2, s_0_11, -1, 1, 0},
{ 2, s_0_12, -1, 1, 0},
{ 5, s_0_13, 12, 1, 0},
{ 1, s_0_14, -1, 2, 0},
{ 2, s_0_15, 14, 1, 0},
{ 2, s_0_16, 14, 1, 0},
{ 4, s_0_17, 16, 1, 0},
{ 5, s_0_18, 16, 1, 0},
{ 4, s_0_19, 16, 1, 0},
{ 7, s_0_20, 19, 1, 0},
{ 3, s_0_21, 14, 1, 0},
{ 6, s_0_22, 21, 1, 0},
{ 3, s_0_23, 14, 1, 0},
{ 3, s_0_24, 14, 1, 0},
{ 2, s_0_25, -1, 1, 0},
{ 3, s_0_26, 25, 1, 0},
{ 3, s_0_27, -1, 3, 0},
{ 3, s_0_28, -1, 1, 0}
};
static const symbol s_1_0[2] = { 'd', 't' };
static const symbol s_1_1[2] = { 'v', 't' };
static const struct among a_1[2] =
{
{ 2, s_1_0, -1, -1, 0},
{ 2, s_1_1, -1, -1, 0}
};
static const symbol s_2_0[3] = { 'l', 'e', 'g' };
static const symbol s_2_1[4] = { 'e', 'l', 'e', 'g' };
static const symbol s_2_2[2] = { 'i', 'g' };
static const symbol s_2_3[3] = { 'e', 'i', 'g' };
static const symbol s_2_4[3] = { 'l', 'i', 'g' };
static const symbol s_2_5[4] = { 'e', 'l', 'i', 'g' };
static const symbol s_2_6[3] = { 'e', 'l', 's' };
static const symbol s_2_7[3] = { 'l', 'o', 'v' };
static const symbol s_2_8[4] = { 'e', 'l', 'o', 'v' };
static const symbol s_2_9[4] = { 's', 'l', 'o', 'v' };
static const symbol s_2_10[7] = { 'h', 'e', 't', 's', 'l', 'o', 'v' };
static const struct among a_2[11] =
{
{ 3, s_2_0, -1, 1, 0},
{ 4, s_2_1, 0, 1, 0},
{ 2, s_2_2, -1, 1, 0},
{ 3, s_2_3, 2, 1, 0},
{ 3, s_2_4, 2, 1, 0},
{ 4, s_2_5, 4, 1, 0},
{ 3, s_2_6, -1, 1, 0},
{ 3, s_2_7, -1, 1, 0},
{ 4, s_2_8, 7, 1, 0},
{ 4, s_2_9, 7, 1, 0},
{ 7, s_2_10, 9, 1, 0}
};
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 };
static const unsigned char g_s_ending[] = { 119, 125, 149, 1 };
static const symbol s_0[] = { 'e', 'r' };
static const symbol s_0_1[3] = { 'i', 'n', 'd' };
static const symbol s_0_2[2] = { 'k', 'k' };
static const symbol s_0_3[2] = { 'n', 'k' };
static const symbol s_0_4[3] = { 'a', 'm', 'm' };
static const symbol s_0_5[3] = { 'o', 'm', 'm' };
static const symbol s_0_6[3] = { 'k', 'a', 'p' };
static const symbol s_0_7[4] = { 's', 'k', 'a', 'p' };
static const symbol s_0_8[2] = { 'p', 'p' };
static const symbol s_0_9[2] = { 'l', 't' };
static const symbol s_0_10[3] = { 'a', 's', 't' };
static const symbol s_0_11[4] = { 0xC3, 0xB8, 's', 't' };
static const symbol s_0_12[1] = { 'v' };
static const symbol s_0_13[3] = { 'h', 'a', 'v' };
static const symbol s_0_14[3] = { 'g', 'i', 'v' };
static const struct among a_0[15] = {
{ 0, 0, 0, 1, 0},
{ 3, s_0_1, -1, -1, 0},
{ 2, s_0_2, -2, -1, 0},
{ 2, s_0_3, -3, -1, 0},
{ 3, s_0_4, -4, -1, 0},
{ 3, s_0_5, -5, -1, 0},
{ 3, s_0_6, -6, -1, 0},
{ 4, s_0_7, -1, 1, 0},
{ 2, s_0_8, -8, -1, 0},
{ 2, s_0_9, -9, -1, 0},
{ 3, s_0_10, -10, -1, 0},
{ 4, s_0_11, -11, -1, 0},
{ 1, s_0_12, -12, -1, 0},
{ 3, s_0_13, -1, 1, 0},
{ 3, s_0_14, -2, 1, 0}
};
static const symbol s_1_0[1] = { 'a' };
static const symbol s_1_1[1] = { 'e' };
static const symbol s_1_2[3] = { 'e', 'd', 'e' };
static const symbol s_1_3[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_1_4[4] = { 'e', 'n', 'd', 'e' };
static const symbol s_1_5[3] = { 'a', 'n', 'e' };
static const symbol s_1_6[3] = { 'e', 'n', 'e' };
static const symbol s_1_7[6] = { 'h', 'e', 't', 'e', 'n', 'e' };
static const symbol s_1_8[4] = { 'e', 'r', 't', 'e' };
static const symbol s_1_9[2] = { 'e', 'n' };
static const symbol s_1_10[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_1_11[2] = { 'a', 'r' };
static const symbol s_1_12[2] = { 'e', 'r' };
static const symbol s_1_13[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_1_14[1] = { 's' };
static const symbol s_1_15[2] = { 'a', 's' };
static const symbol s_1_16[2] = { 'e', 's' };
static const symbol s_1_17[4] = { 'e', 'd', 'e', 's' };
static const symbol s_1_18[5] = { 'e', 'n', 'd', 'e', 's' };
static const symbol s_1_19[4] = { 'e', 'n', 'e', 's' };
static const symbol s_1_20[7] = { 'h', 'e', 't', 'e', 'n', 'e', 's' };
static const symbol s_1_21[3] = { 'e', 'n', 's' };
static const symbol s_1_22[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_1_23[3] = { 'e', 'r', 's' };
static const symbol s_1_24[3] = { 'e', 't', 's' };
static const symbol s_1_25[2] = { 'e', 't' };
static const symbol s_1_26[3] = { 'h', 'e', 't' };
static const symbol s_1_27[3] = { 'e', 'r', 't' };
static const symbol s_1_28[3] = { 'a', 's', 't' };
static const struct among a_1[29] = {
{ 1, s_1_0, 0, 1, 0},
{ 1, s_1_1, 0, 1, 0},
{ 3, s_1_2, -1, 1, 0},
{ 4, s_1_3, -2, 1, 0},
{ 4, s_1_4, -3, 1, 0},
{ 3, s_1_5, -4, 1, 0},
{ 3, s_1_6, -5, 1, 0},
{ 6, s_1_7, -1, 1, 0},
{ 4, s_1_8, -7, 4, 0},
{ 2, s_1_9, 0, 1, 0},
{ 5, s_1_10, -1, 1, 0},
{ 2, s_1_11, 0, 1, 0},
{ 2, s_1_12, 0, 1, 0},
{ 5, s_1_13, -1, 1, 0},
{ 1, s_1_14, 0, 3, 0},
{ 2, s_1_15, -1, 1, 0},
{ 2, s_1_16, -2, 1, 0},
{ 4, s_1_17, -1, 1, 0},
{ 5, s_1_18, -2, 1, 0},
{ 4, s_1_19, -3, 1, 0},
{ 7, s_1_20, -1, 1, 0},
{ 3, s_1_21, -7, 1, 0},
{ 6, s_1_22, -1, 1, 0},
{ 3, s_1_23, -9, 2, 0},
{ 3, s_1_24, -10, 1, 0},
{ 2, s_1_25, 0, 1, 0},
{ 3, s_1_26, -1, 1, 0},
{ 3, s_1_27, 0, 4, 0},
{ 3, s_1_28, 0, 1, 0}
};
static const symbol s_2_0[2] = { 'd', 't' };
static const symbol s_2_1[2] = { 'v', 't' };
static const struct among a_2[2] = {
{ 2, s_2_0, 0, -1, 0},
{ 2, s_2_1, 0, -1, 0}
};
static const symbol s_3_0[3] = { 'l', 'e', 'g' };
static const symbol s_3_1[4] = { 'e', 'l', 'e', 'g' };
static const symbol s_3_2[2] = { 'i', 'g' };
static const symbol s_3_3[3] = { 'e', 'i', 'g' };
static const symbol s_3_4[3] = { 'l', 'i', 'g' };
static const symbol s_3_5[4] = { 'e', 'l', 'i', 'g' };
static const symbol s_3_6[3] = { 'e', 'l', 's' };
static const symbol s_3_7[3] = { 'l', 'o', 'v' };
static const symbol s_3_8[4] = { 'e', 'l', 'o', 'v' };
static const symbol s_3_9[4] = { 's', 'l', 'o', 'v' };
static const symbol s_3_10[7] = { 'h', 'e', 't', 's', 'l', 'o', 'v' };
static const struct among a_3[11] = {
{ 3, s_3_0, 0, 1, 0},
{ 4, s_3_1, -1, 1, 0},
{ 2, s_3_2, 0, 1, 0},
{ 3, s_3_3, -1, 1, 0},
{ 3, s_3_4, -2, 1, 0},
{ 4, s_3_5, -1, 1, 0},
{ 3, s_3_6, 0, 1, 0},
{ 3, s_3_7, 0, 1, 0},
{ 4, s_3_8, -1, 1, 0},
{ 4, s_3_9, -2, 1, 0},
{ 7, s_3_10, -1, 1, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 2, 142 };
static const unsigned char g_s_ending[] = { 119, 125, 148, 1 };
static int r_mark_regions(struct SN_env * z) {
z->I[1] = z->l;
{ int c_test1 = z->c;
{ int ret = skip_utf8(z->p, z->c, z->l, 3);
int i_x;
((SN_local *)z)->i_p1 = z->l;
{
int v_1 = z->c;
{
int ret = skip_utf8(z->p, z->c, z->l, 3);
if (ret < 0) return 0;
z->c = ret;
}
z->I[0] = z->c;
z->c = c_test1;
i_x = z->c;
z->c = v_1;
}
{
int ret = out_grouping_U(z, g_v, 97, 248, 1);
if (ret < 0) return 0;
z->c += ret;
}
if (out_grouping_U(z, g_v, 97, 248, 1) < 0) return 0;
{
int ret = in_grouping_U(z, g_v, 97, 248, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c;
if (z->I[1] >= z->I[0]) goto lab0;
z->I[1] = z->I[0];
((SN_local *)z)->i_p1 = z->c;
if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
((SN_local *)z)->i_p1 = i_x;
lab0:
return 1;
}
static int r_main_suffix(struct SN_env * z) {
int among_var;
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851426 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
among_var = find_among_b(z, a_0, 29);
if (!among_var) { z->lb = mlimit1; return 0; }
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851426 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
among_var = find_among_b(z, a_1, 29, 0);
if (!among_var) { z->lb = v_1; return 0; }
z->bra = z->c;
z->lb = mlimit1;
z->lb = v_1;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int m2 = z->l - z->c; (void)m2;
if (in_grouping_b_U(z, g_s_ending, 98, 122, 0)) goto lab1;
goto lab0;
lab1:
z->c = z->l - m2;
if (z->c <= z->lb || z->p[z->c - 1] != 'k') return 0;
z->c--;
if (out_grouping_b_U(z, g_v, 97, 248, 0)) return 0;
}
lab0:
{ int ret = slice_del(z);
if (ret < 0) return ret;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((5318672 >> (z->p[z->c - 1] & 0x1f)) & 1)) among_var = 1; else
among_var = find_among_b(z, a_0, 15, 0);
switch (among_var) {
case 1:
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
}
break;
case 3:
{ int ret = slice_from_s(z, 2, s_0);
do {
int v_2 = z->l - z->c;
if (in_grouping_b_U(z, g_s_ending, 98, 122, 0)) goto lab0;
break;
lab0:
z->c = z->l - v_2;
if (z->c <= z->lb || z->p[z->c - 1] != 'r') goto lab1;
z->c--;
{
int v_3 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab2;
z->c--;
goto lab1;
lab2:
z->c = z->l - v_3;
}
break;
lab1:
z->c = z->l - v_2;
if (z->c <= z->lb || z->p[z->c - 1] != 'k') return 0;
z->c--;
if (out_grouping_b_U(z, g_v, 97, 248, 0)) return 0;
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 4:
{
int ret = slice_from_s(z, 2, s_0);
if (ret < 0) return ret;
}
break;
@ -200,79 +259,98 @@ static int r_main_suffix(struct SN_env * z) {
}
static int r_consonant_pair(struct SN_env * z) {
{ int m_test1 = z->l - z->c;
{ int mlimit2;
if (z->c < z->I[1]) return 0;
mlimit2 = z->lb; z->lb = z->I[1];
{
int v_1 = z->l - z->c;
{
int v_2;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_2 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] != 116) { z->lb = mlimit2; return 0; }
if (!find_among_b(z, a_1, 2)) { z->lb = mlimit2; return 0; }
if (z->c - 1 <= z->lb || z->p[z->c - 1] != 116) { z->lb = v_2; return 0; }
if (!find_among_b(z, a_2, 2, 0)) { z->lb = v_2; return 0; }
z->bra = z->c;
z->lb = mlimit2;
z->lb = v_2;
}
z->c = z->l - m_test1;
z->c = z->l - v_1;
}
{ int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
{
int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
if (ret < 0) return 0;
z->c = ret;
}
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
static int r_other_suffix(struct SN_env * z) {
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((4718720 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
if (!find_among_b(z, a_2, 11)) { z->lb = mlimit1; return 0; }
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((4718720 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
if (!find_among_b(z, a_3, 11, 0)) { z->lb = v_1; return 0; }
z->bra = z->c;
z->lb = mlimit1;
z->lb = v_1;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
}
extern int norwegian_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c;
{ int ret = r_mark_regions(z);
{
int v_1 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = c1;
z->c = v_1;
}
z->lb = z->c; z->c = z->l;
{ int m2 = z->l - z->c; (void)m2;
{ int ret = r_main_suffix(z);
{
int v_2 = z->l - z->c;
{
int ret = r_main_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_consonant_pair(z);
{
int v_3 = z->l - z->c;
{
int ret = r_consonant_pair(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_other_suffix(z);
{
int v_4 = z->l - z->c;
{
int ret = r_other_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * norwegian_UTF_8_create_env(void) { return SN_create_env(0, 2); }
extern struct SN_env * norwegian_UTF_8_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p1 = 0;
}
return z;
}
extern void norwegian_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void norwegian_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

View file

@ -0,0 +1,523 @@
/* Generated from polish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "stem_UTF_8_polish.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p1;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
#endif
extern int polish_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_R1(struct SN_env * z);
static int r_normalize_consonant(struct SN_env * z);
static int r_remove_endings(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
static const symbol s_0[] = { 's' };
static const symbol s_1[] = { 's' };
static const symbol s_2[] = { 0xC5, 0x82 };
static const symbol s_3[] = { 's' };
static const symbol s_4[] = { 'c' };
static const symbol s_5[] = { 'n' };
static const symbol s_6[] = { 's' };
static const symbol s_7[] = { 'z' };
static const symbol s_0_0[7] = { 'b', 'y', 0xC5, 0x9B, 'c', 'i', 'e' };
static const symbol s_0_1[3] = { 'b', 'y', 'm' };
static const symbol s_0_2[2] = { 'b', 'y' };
static const symbol s_0_3[6] = { 'b', 'y', 0xC5, 0x9B, 'm', 'y' };
static const symbol s_0_4[4] = { 'b', 'y', 0xC5, 0x9B };
static const struct among a_0[5] = {
{ 7, s_0_0, 0, 1, 0},
{ 3, s_0_1, 0, 1, 0},
{ 2, s_0_2, 0, 1, 0},
{ 6, s_0_3, 0, 1, 0},
{ 4, s_0_4, 0, 1, 0}
};
static const symbol s_1_0[3] = { 0xC4, 0x85, 'c' };
static const symbol s_1_1[5] = { 'a', 'j', 0xC4, 0x85, 'c' };
static const symbol s_1_2[5] = { 's', 'z', 0xC4, 0x85, 'c' };
static const symbol s_1_3[2] = { 's', 'z' };
static const symbol s_1_4[5] = { 'i', 'e', 'j', 's', 'z' };
static const struct among a_1[5] = {
{ 3, s_1_0, 0, 1, 0},
{ 5, s_1_1, -1, 1, 0},
{ 5, s_1_2, -2, 2, 0},
{ 2, s_1_3, 0, 1, 0},
{ 5, s_1_4, -1, 1, 0}
};
static const symbol s_2_0[1] = { 'a' };
static const symbol s_2_1[4] = { 0xC4, 0x85, 'c', 'a' };
static const symbol s_2_2[6] = { 'a', 'j', 0xC4, 0x85, 'c', 'a' };
static const symbol s_2_3[6] = { 's', 'z', 0xC4, 0x85, 'c', 'a' };
static const symbol s_2_4[2] = { 'i', 'a' };
static const symbol s_2_5[3] = { 's', 'z', 'a' };
static const symbol s_2_6[6] = { 'i', 'e', 'j', 's', 'z', 'a' };
static const symbol s_2_7[4] = { 'a', 0xC5, 0x82, 'a' };
static const symbol s_2_8[5] = { 'i', 'a', 0xC5, 0x82, 'a' };
static const symbol s_2_9[4] = { 'i', 0xC5, 0x82, 'a' };
static const symbol s_2_10[3] = { 0xC4, 0x85, 'c' };
static const symbol s_2_11[5] = { 'a', 'j', 0xC4, 0x85, 'c' };
static const symbol s_2_12[1] = { 'e' };
static const symbol s_2_13[4] = { 0xC4, 0x85, 'c', 'e' };
static const symbol s_2_14[6] = { 'a', 'j', 0xC4, 0x85, 'c', 'e' };
static const symbol s_2_15[6] = { 's', 'z', 0xC4, 0x85, 'c', 'e' };
static const symbol s_2_16[2] = { 'i', 'e' };
static const symbol s_2_17[3] = { 'c', 'i', 'e' };
static const symbol s_2_18[4] = { 'a', 'c', 'i', 'e' };
static const symbol s_2_19[4] = { 'e', 'c', 'i', 'e' };
static const symbol s_2_20[4] = { 'i', 'c', 'i', 'e' };
static const symbol s_2_21[5] = { 'a', 'j', 'c', 'i', 'e' };
static const symbol s_2_22[7] = { 'l', 'i', 0xC5, 0x9B, 'c', 'i', 'e' };
static const symbol s_2_23[8] = { 'a', 'l', 'i', 0xC5, 0x9B, 'c', 'i', 'e' };
static const symbol s_2_24[9] = { 'i', 'e', 'l', 'i', 0xC5, 0x9B, 'c', 'i', 'e' };
static const symbol s_2_25[8] = { 'i', 'l', 'i', 0xC5, 0x9B, 'c', 'i', 'e' };
static const symbol s_2_26[8] = { 0xC5, 0x82, 'y', 0xC5, 0x9B, 'c', 'i', 'e' };
static const symbol s_2_27[9] = { 'a', 0xC5, 0x82, 'y', 0xC5, 0x9B, 'c', 'i', 'e' };
static const symbol s_2_28[10] = { 'i', 'a', 0xC5, 0x82, 'y', 0xC5, 0x9B, 'c', 'i', 'e' };
static const symbol s_2_29[9] = { 'i', 0xC5, 0x82, 'y', 0xC5, 0x9B, 'c', 'i', 'e' };
static const symbol s_2_30[3] = { 's', 'z', 'e' };
static const symbol s_2_31[6] = { 'i', 'e', 'j', 's', 'z', 'e' };
static const symbol s_2_32[3] = { 'a', 'c', 'h' };
static const symbol s_2_33[4] = { 'i', 'a', 'c', 'h' };
static const symbol s_2_34[3] = { 'i', 'c', 'h' };
static const symbol s_2_35[3] = { 'y', 'c', 'h' };
static const symbol s_2_36[1] = { 'i' };
static const symbol s_2_37[3] = { 'a', 'l', 'i' };
static const symbol s_2_38[4] = { 'i', 'e', 'l', 'i' };
static const symbol s_2_39[3] = { 'i', 'l', 'i' };
static const symbol s_2_40[3] = { 'a', 'm', 'i' };
static const symbol s_2_41[4] = { 'i', 'a', 'm', 'i' };
static const symbol s_2_42[3] = { 'i', 'm', 'i' };
static const symbol s_2_43[3] = { 'y', 'm', 'i' };
static const symbol s_2_44[3] = { 'o', 'w', 'i' };
static const symbol s_2_45[4] = { 'i', 'o', 'w', 'i' };
static const symbol s_2_46[2] = { 'a', 'j' };
static const symbol s_2_47[2] = { 'e', 'j' };
static const symbol s_2_48[3] = { 'i', 'e', 'j' };
static const symbol s_2_49[2] = { 'a', 'm' };
static const symbol s_2_50[5] = { 'a', 0xC5, 0x82, 'a', 'm' };
static const symbol s_2_51[6] = { 'i', 'a', 0xC5, 0x82, 'a', 'm' };
static const symbol s_2_52[5] = { 'i', 0xC5, 0x82, 'a', 'm' };
static const symbol s_2_53[2] = { 'e', 'm' };
static const symbol s_2_54[3] = { 'i', 'e', 'm' };
static const symbol s_2_55[5] = { 'a', 0xC5, 0x82, 'e', 'm' };
static const symbol s_2_56[6] = { 'i', 'a', 0xC5, 0x82, 'e', 'm' };
static const symbol s_2_57[5] = { 'i', 0xC5, 0x82, 'e', 'm' };
static const symbol s_2_58[2] = { 'i', 'm' };
static const symbol s_2_59[2] = { 'o', 'm' };
static const symbol s_2_60[3] = { 'i', 'o', 'm' };
static const symbol s_2_61[2] = { 'y', 'm' };
static const symbol s_2_62[1] = { 'o' };
static const symbol s_2_63[3] = { 'e', 'g', 'o' };
static const symbol s_2_64[4] = { 'i', 'e', 'g', 'o' };
static const symbol s_2_65[4] = { 'a', 0xC5, 0x82, 'o' };
static const symbol s_2_66[5] = { 'i', 'a', 0xC5, 0x82, 'o' };
static const symbol s_2_67[4] = { 'i', 0xC5, 0x82, 'o' };
static const symbol s_2_68[1] = { 'u' };
static const symbol s_2_69[2] = { 'i', 'u' };
static const symbol s_2_70[3] = { 'e', 'm', 'u' };
static const symbol s_2_71[4] = { 'i', 'e', 'm', 'u' };
static const symbol s_2_72[3] = { 0xC3, 0xB3, 'w' };
static const symbol s_2_73[1] = { 'y' };
static const symbol s_2_74[3] = { 'a', 'm', 'y' };
static const symbol s_2_75[3] = { 'e', 'm', 'y' };
static const symbol s_2_76[3] = { 'i', 'm', 'y' };
static const symbol s_2_77[6] = { 'l', 'i', 0xC5, 0x9B, 'm', 'y' };
static const symbol s_2_78[7] = { 'a', 'l', 'i', 0xC5, 0x9B, 'm', 'y' };
static const symbol s_2_79[8] = { 'i', 'e', 'l', 'i', 0xC5, 0x9B, 'm', 'y' };
static const symbol s_2_80[7] = { 'i', 'l', 'i', 0xC5, 0x9B, 'm', 'y' };
static const symbol s_2_81[7] = { 0xC5, 0x82, 'y', 0xC5, 0x9B, 'm', 'y' };
static const symbol s_2_82[8] = { 'a', 0xC5, 0x82, 'y', 0xC5, 0x9B, 'm', 'y' };
static const symbol s_2_83[9] = { 'i', 'a', 0xC5, 0x82, 'y', 0xC5, 0x9B, 'm', 'y' };
static const symbol s_2_84[8] = { 'i', 0xC5, 0x82, 'y', 0xC5, 0x9B, 'm', 'y' };
static const symbol s_2_85[4] = { 'a', 0xC5, 0x82, 'y' };
static const symbol s_2_86[5] = { 'i', 'a', 0xC5, 0x82, 'y' };
static const symbol s_2_87[4] = { 'i', 0xC5, 0x82, 'y' };
static const symbol s_2_88[3] = { 'a', 's', 'z' };
static const symbol s_2_89[3] = { 'e', 's', 'z' };
static const symbol s_2_90[3] = { 'i', 's', 'z' };
static const symbol s_2_91[3] = { 'a', 0xC5, 0x82 };
static const symbol s_2_92[4] = { 'i', 'a', 0xC5, 0x82 };
static const symbol s_2_93[3] = { 'i', 0xC5, 0x82 };
static const symbol s_2_94[2] = { 0xC4, 0x85 };
static const symbol s_2_95[5] = { 0xC4, 0x85, 'c', 0xC4, 0x85 };
static const symbol s_2_96[7] = { 'a', 'j', 0xC4, 0x85, 'c', 0xC4, 0x85 };
static const symbol s_2_97[7] = { 's', 'z', 0xC4, 0x85, 'c', 0xC4, 0x85 };
static const symbol s_2_98[3] = { 'i', 0xC4, 0x85 };
static const symbol s_2_99[4] = { 'a', 'j', 0xC4, 0x85 };
static const symbol s_2_100[4] = { 's', 'z', 0xC4, 0x85 };
static const symbol s_2_101[7] = { 'i', 'e', 'j', 's', 'z', 0xC4, 0x85 };
static const symbol s_2_102[3] = { 'a', 0xC4, 0x87 };
static const symbol s_2_103[4] = { 'i', 'e', 0xC4, 0x87 };
static const symbol s_2_104[3] = { 'i', 0xC4, 0x87 };
static const symbol s_2_105[4] = { 0xC4, 0x85, 0xC4, 0x87 };
static const symbol s_2_106[5] = { 'a', 0xC5, 0x9B, 0xC4, 0x87 };
static const symbol s_2_107[5] = { 'e', 0xC5, 0x9B, 0xC4, 0x87 };
static const symbol s_2_108[2] = { 0xC4, 0x99 };
static const symbol s_2_109[4] = { 's', 'z', 0xC4, 0x99 };
static const symbol s_2_110[5] = { 0xC5, 0x82, 'a', 0xC5, 0x9B };
static const symbol s_2_111[6] = { 'a', 0xC5, 0x82, 'a', 0xC5, 0x9B };
static const symbol s_2_112[7] = { 'i', 'a', 0xC5, 0x82, 'a', 0xC5, 0x9B };
static const symbol s_2_113[6] = { 'i', 0xC5, 0x82, 'a', 0xC5, 0x9B };
static const symbol s_2_114[5] = { 0xC5, 0x82, 'e', 0xC5, 0x9B };
static const symbol s_2_115[6] = { 'a', 0xC5, 0x82, 'e', 0xC5, 0x9B };
static const symbol s_2_116[7] = { 'i', 'a', 0xC5, 0x82, 'e', 0xC5, 0x9B };
static const symbol s_2_117[6] = { 'i', 0xC5, 0x82, 'e', 0xC5, 0x9B };
static const struct among a_2[118] = {
{ 1, s_2_0, 0, 1, 1},
{ 4, s_2_1, -1, 1, 0},
{ 6, s_2_2, -1, 1, 0},
{ 6, s_2_3, -2, 2, 0},
{ 2, s_2_4, -4, 1, 1},
{ 3, s_2_5, -5, 1, 0},
{ 6, s_2_6, -1, 1, 0},
{ 4, s_2_7, -7, 1, 0},
{ 5, s_2_8, -1, 1, 0},
{ 4, s_2_9, -9, 1, 0},
{ 3, s_2_10, 0, 1, 0},
{ 5, s_2_11, -1, 1, 0},
{ 1, s_2_12, 0, 1, 1},
{ 4, s_2_13, -1, 1, 0},
{ 6, s_2_14, -1, 1, 0},
{ 6, s_2_15, -2, 2, 0},
{ 2, s_2_16, -4, 1, 1},
{ 3, s_2_17, -1, 1, 0},
{ 4, s_2_18, -1, 1, 0},
{ 4, s_2_19, -2, 1, 0},
{ 4, s_2_20, -3, 1, 0},
{ 5, s_2_21, -4, 1, 0},
{ 7, s_2_22, -5, 4, 0},
{ 8, s_2_23, -1, 1, 0},
{ 9, s_2_24, -2, 1, 0},
{ 8, s_2_25, -3, 1, 0},
{ 8, s_2_26, -9, 4, 0},
{ 9, s_2_27, -1, 1, 0},
{ 10, s_2_28, -1, 1, 0},
{ 9, s_2_29, -3, 1, 0},
{ 3, s_2_30, -18, 1, 0},
{ 6, s_2_31, -1, 1, 0},
{ 3, s_2_32, 0, 1, 1},
{ 4, s_2_33, -1, 1, 1},
{ 3, s_2_34, 0, 5, 0},
{ 3, s_2_35, 0, 5, 0},
{ 1, s_2_36, 0, 1, 1},
{ 3, s_2_37, -1, 1, 0},
{ 4, s_2_38, -2, 1, 0},
{ 3, s_2_39, -3, 1, 0},
{ 3, s_2_40, -4, 1, 1},
{ 4, s_2_41, -1, 1, 1},
{ 3, s_2_42, -6, 5, 0},
{ 3, s_2_43, -7, 5, 0},
{ 3, s_2_44, -8, 1, 1},
{ 4, s_2_45, -1, 1, 1},
{ 2, s_2_46, 0, 1, 0},
{ 2, s_2_47, 0, 5, 0},
{ 3, s_2_48, -1, 5, 0},
{ 2, s_2_49, 0, 1, 0},
{ 5, s_2_50, -1, 1, 0},
{ 6, s_2_51, -1, 1, 0},
{ 5, s_2_52, -3, 1, 0},
{ 2, s_2_53, 0, 1, 1},
{ 3, s_2_54, -1, 1, 1},
{ 5, s_2_55, -2, 1, 0},
{ 6, s_2_56, -1, 1, 0},
{ 5, s_2_57, -4, 1, 0},
{ 2, s_2_58, 0, 5, 0},
{ 2, s_2_59, 0, 1, 1},
{ 3, s_2_60, -1, 1, 1},
{ 2, s_2_61, 0, 5, 0},
{ 1, s_2_62, 0, 1, 1},
{ 3, s_2_63, -1, 5, 0},
{ 4, s_2_64, -1, 5, 0},
{ 4, s_2_65, -3, 1, 0},
{ 5, s_2_66, -1, 1, 0},
{ 4, s_2_67, -5, 1, 0},
{ 1, s_2_68, 0, 1, 1},
{ 2, s_2_69, -1, 1, 1},
{ 3, s_2_70, -2, 5, 0},
{ 4, s_2_71, -1, 5, 0},
{ 3, s_2_72, 0, 1, 1},
{ 1, s_2_73, 0, 5, 0},
{ 3, s_2_74, -1, 1, 0},
{ 3, s_2_75, -2, 1, 0},
{ 3, s_2_76, -3, 1, 0},
{ 6, s_2_77, -4, 4, 0},
{ 7, s_2_78, -1, 1, 0},
{ 8, s_2_79, -2, 1, 0},
{ 7, s_2_80, -3, 1, 0},
{ 7, s_2_81, -8, 4, 0},
{ 8, s_2_82, -1, 1, 0},
{ 9, s_2_83, -1, 1, 0},
{ 8, s_2_84, -3, 1, 0},
{ 4, s_2_85, -12, 1, 0},
{ 5, s_2_86, -1, 1, 0},
{ 4, s_2_87, -14, 1, 0},
{ 3, s_2_88, 0, 1, 0},
{ 3, s_2_89, 0, 1, 0},
{ 3, s_2_90, 0, 1, 0},
{ 3, s_2_91, 0, 1, 0},
{ 4, s_2_92, -1, 1, 0},
{ 3, s_2_93, 0, 1, 0},
{ 2, s_2_94, 0, 1, 1},
{ 5, s_2_95, -1, 1, 0},
{ 7, s_2_96, -1, 1, 0},
{ 7, s_2_97, -2, 2, 0},
{ 3, s_2_98, -4, 1, 1},
{ 4, s_2_99, -5, 1, 0},
{ 4, s_2_100, -6, 3, 0},
{ 7, s_2_101, -1, 1, 0},
{ 3, s_2_102, 0, 1, 0},
{ 4, s_2_103, 0, 1, 0},
{ 3, s_2_104, 0, 1, 0},
{ 4, s_2_105, 0, 1, 0},
{ 5, s_2_106, 0, 1, 0},
{ 5, s_2_107, 0, 1, 0},
{ 2, s_2_108, 0, 1, 0},
{ 4, s_2_109, -1, 2, 0},
{ 5, s_2_110, 0, 4, 0},
{ 6, s_2_111, -1, 1, 0},
{ 7, s_2_112, -1, 1, 0},
{ 6, s_2_113, -3, 1, 0},
{ 5, s_2_114, 0, 4, 0},
{ 6, s_2_115, -1, 1, 0},
{ 7, s_2_116, -1, 1, 0},
{ 6, s_2_117, -3, 1, 0}
};
static const symbol s_3_0[2] = { 0xC5, 0x84 };
static const symbol s_3_1[2] = { 0xC4, 0x87 };
static const symbol s_3_2[2] = { 0xC5, 0x9B };
static const symbol s_3_3[2] = { 0xC5, 0xBA };
static const struct among a_3[4] = {
{ 2, s_3_0, 0, 2, 0},
{ 2, s_3_1, 0, 1, 0},
{ 2, s_3_2, 0, 3, 0},
{ 2, s_3_3, 0, 4, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 16, 0, 0, 1 };
static int r_mark_regions(struct SN_env * z) {
((SN_local *)z)->i_p1 = z->l;
{
int ret = out_grouping_U(z, g_v, 97, 281, 1);
if (ret < 0) return 0;
z->c += ret;
}
{
int ret = in_grouping_U(z, g_v, 97, 281, 1);
if (ret < 0) return 0;
z->c += ret;
}
((SN_local *)z)->i_p1 = z->c;
return 1;
}
static int r_R1(struct SN_env * z) {
return ((SN_local *)z)->i_p1 <= z->c;
}
static int r_remove_endings(struct SN_env * z) {
int among_var;
{
int v_1 = z->l - z->c;
{
int v_2;
if (z->c < ((SN_local *)z)->i_p1) goto lab0;
v_2 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (!find_among_b(z, a_0, 5, 0)) { z->lb = v_2; goto lab0; }
z->bra = z->c;
z->lb = v_2;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab0:
z->c = z->l - v_1;
}
z->ket = z->c;
among_var = find_among_b(z, a_2, 118, r_R1);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 1, s_0);
if (ret < 0) return ret;
}
break;
case 3:
do {
int v_3 = z->l - z->c;
{
int v_4 = z->l - z->c;
{
int ret = r_R1(z);
if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
z->c = z->l - v_4;
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
}
break;
lab1:
z->c = z->l - v_3;
{
int ret = slice_from_s(z, 1, s_1);
if (ret < 0) return ret;
}
} while (0);
break;
case 4:
{
int ret = slice_from_s(z, 2, s_2);
if (ret < 0) return ret;
}
break;
case 5:
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
{
int v_5 = z->l - z->c;
z->ket = z->c;
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 99 && z->p[z->c - 1] != 122)) { z->c = z->l - v_5; goto lab2; }
among_var = find_among_b(z, a_1, 5, 0);
if (!among_var) { z->c = z->l - v_5; goto lab2; }
z->bra = z->c;
switch (among_var) {
case 1:
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 1, s_3);
if (ret < 0) return ret;
}
break;
}
lab2:
;
}
break;
}
return 1;
}
static int r_normalize_consonant(struct SN_env * z) {
int among_var;
z->ket = z->c;
among_var = find_among_b(z, a_3, 4, 0);
if (!among_var) return 0;
z->bra = z->c;
if (z->c > z->lb) goto lab0;
return 0;
lab0:
switch (among_var) {
case 1:
{
int ret = slice_from_s(z, 1, s_4);
if (ret < 0) return ret;
}
break;
case 2:
{
int ret = slice_from_s(z, 1, s_5);
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = slice_from_s(z, 1, s_6);
if (ret < 0) return ret;
}
break;
case 4:
{
int ret = slice_from_s(z, 1, s_7);
if (ret < 0) return ret;
}
break;
}
return 1;
}
extern int polish_UTF_8_stem(struct SN_env * z) {
{
int v_1 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = v_1;
}
do {
int v_2 = z->c;
{
int ret = skip_utf8(z->p, z->c, z->l, 2);
if (ret < 0) goto lab0;
z->c = ret;
}
z->lb = z->c; z->c = z->l;
{
int ret = r_remove_endings(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
z->c = z->lb;
break;
lab0:
z->c = v_2;
z->lb = z->c; z->c = z->l;
{
int ret = r_normalize_consonant(z);
if (ret <= 0) return ret;
}
z->c = z->lb;
} while (0);
return 1;
}
extern struct SN_env * polish_UTF_8_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p1 = 0;
}
return z;
}
extern void polish_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,18 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from russian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_UTF_8_russian.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p2;
int i_pV;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,6 +21,7 @@ extern int russian_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_tidy_up(struct SN_env * z);
static int r_derivational(struct SN_env * z);
static int r_noun(struct SN_env * z);
@ -19,18 +32,20 @@ static int r_adjective(struct SN_env * z);
static int r_perfective_gerund(struct SN_env * z);
static int r_R2(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static const symbol s_0[] = { 0xD0, 0xB0 };
static const symbol s_1[] = { 0xD1, 0x8F };
static const symbol s_2[] = { 0xD0, 0xB0 };
static const symbol s_3[] = { 0xD1, 0x8F };
static const symbol s_4[] = { 0xD0, 0xB0 };
static const symbol s_5[] = { 0xD1, 0x8F };
static const symbol s_6[] = { 0xD0, 0xBD };
static const symbol s_7[] = { 0xD0, 0xBD };
static const symbol s_8[] = { 0xD0, 0xBD };
static const symbol s_9[] = { 0xD1, 0x91 };
static const symbol s_10[] = { 0xD0, 0xB5 };
static const symbol s_11[] = { 0xD0, 0xB8 };
extern struct SN_env * russian_UTF_8_create_env(void);
extern void russian_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[10] = { 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
static const symbol s_0_1[12] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
static const symbol s_0_2[12] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
@ -40,18 +55,16 @@ static const symbol s_0_5[4] = { 0xD0, 0xB8, 0xD0, 0xB2 };
static const symbol s_0_6[6] = { 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
static const symbol s_0_7[8] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
static const symbol s_0_8[8] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
static const struct among a_0[9] =
{
{ 10, s_0_0, -1, 1, 0},
{ 12, s_0_1, 0, 2, 0},
{ 12, s_0_2, 0, 2, 0},
{ 2, s_0_3, -1, 1, 0},
{ 4, s_0_4, 3, 2, 0},
{ 4, s_0_5, 3, 2, 0},
{ 6, s_0_6, -1, 1, 0},
{ 8, s_0_7, 6, 2, 0},
{ 8, s_0_8, 6, 2, 0}
static const struct among a_0[9] = {
{ 10, s_0_0, 0, 1, 0},
{ 12, s_0_1, -1, 2, 0},
{ 12, s_0_2, -2, 2, 0},
{ 2, s_0_3, 0, 1, 0},
{ 4, s_0_4, -1, 2, 0},
{ 4, s_0_5, -2, 2, 0},
{ 6, s_0_6, 0, 1, 0},
{ 8, s_0_7, -1, 2, 0},
{ 8, s_0_8, -2, 2, 0}
};
static const symbol s_1_0[6] = { 0xD0, 0xB5, 0xD0, 0xBC, 0xD1, 0x83 };
@ -80,35 +93,33 @@ static const symbol s_1_22[4] = { 0xD0, 0xB8, 0xD0, 0xBC };
static const symbol s_1_23[4] = { 0xD0, 0xBE, 0xD0, 0xBC };
static const symbol s_1_24[6] = { 0xD0, 0xB5, 0xD0, 0xB3, 0xD0, 0xBE };
static const symbol s_1_25[6] = { 0xD0, 0xBE, 0xD0, 0xB3, 0xD0, 0xBE };
static const struct among a_1[26] =
{
{ 6, s_1_0, -1, 1, 0},
{ 6, s_1_1, -1, 1, 0},
{ 4, s_1_2, -1, 1, 0},
{ 4, s_1_3, -1, 1, 0},
{ 4, s_1_4, -1, 1, 0},
{ 4, s_1_5, -1, 1, 0},
{ 4, s_1_6, -1, 1, 0},
{ 4, s_1_7, -1, 1, 0},
{ 4, s_1_8, -1, 1, 0},
{ 4, s_1_9, -1, 1, 0},
{ 4, s_1_10, -1, 1, 0},
{ 4, s_1_11, -1, 1, 0},
{ 4, s_1_12, -1, 1, 0},
{ 4, s_1_13, -1, 1, 0},
{ 6, s_1_14, -1, 1, 0},
{ 6, s_1_15, -1, 1, 0},
{ 4, s_1_16, -1, 1, 0},
{ 4, s_1_17, -1, 1, 0},
{ 4, s_1_18, -1, 1, 0},
{ 4, s_1_19, -1, 1, 0},
{ 4, s_1_20, -1, 1, 0},
{ 4, s_1_21, -1, 1, 0},
{ 4, s_1_22, -1, 1, 0},
{ 4, s_1_23, -1, 1, 0},
{ 6, s_1_24, -1, 1, 0},
{ 6, s_1_25, -1, 1, 0}
static const struct among a_1[26] = {
{ 6, s_1_0, 0, 1, 0},
{ 6, s_1_1, 0, 1, 0},
{ 4, s_1_2, 0, 1, 0},
{ 4, s_1_3, 0, 1, 0},
{ 4, s_1_4, 0, 1, 0},
{ 4, s_1_5, 0, 1, 0},
{ 4, s_1_6, 0, 1, 0},
{ 4, s_1_7, 0, 1, 0},
{ 4, s_1_8, 0, 1, 0},
{ 4, s_1_9, 0, 1, 0},
{ 4, s_1_10, 0, 1, 0},
{ 4, s_1_11, 0, 1, 0},
{ 4, s_1_12, 0, 1, 0},
{ 4, s_1_13, 0, 1, 0},
{ 6, s_1_14, 0, 1, 0},
{ 6, s_1_15, 0, 1, 0},
{ 4, s_1_16, 0, 1, 0},
{ 4, s_1_17, 0, 1, 0},
{ 4, s_1_18, 0, 1, 0},
{ 4, s_1_19, 0, 1, 0},
{ 4, s_1_20, 0, 1, 0},
{ 4, s_1_21, 0, 1, 0},
{ 4, s_1_22, 0, 1, 0},
{ 4, s_1_23, 0, 1, 0},
{ 6, s_1_24, 0, 1, 0},
{ 6, s_1_25, 0, 1, 0}
};
static const symbol s_2_0[4] = { 0xD0, 0xB2, 0xD1, 0x88 };
@ -119,26 +130,22 @@ static const symbol s_2_4[4] = { 0xD1, 0x8E, 0xD1, 0x89 };
static const symbol s_2_5[6] = { 0xD1, 0x83, 0xD1, 0x8E, 0xD1, 0x89 };
static const symbol s_2_6[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
static const symbol s_2_7[4] = { 0xD0, 0xBD, 0xD0, 0xBD };
static const struct among a_2[8] =
{
{ 4, s_2_0, -1, 1, 0},
{ 6, s_2_1, 0, 2, 0},
{ 6, s_2_2, 0, 2, 0},
{ 2, s_2_3, -1, 1, 0},
{ 4, s_2_4, 3, 1, 0},
{ 6, s_2_5, 4, 2, 0},
{ 4, s_2_6, -1, 1, 0},
{ 4, s_2_7, -1, 1, 0}
static const struct among a_2[8] = {
{ 4, s_2_0, 0, 1, 0},
{ 6, s_2_1, -1, 2, 0},
{ 6, s_2_2, -2, 2, 0},
{ 2, s_2_3, 0, 1, 0},
{ 4, s_2_4, -1, 1, 0},
{ 6, s_2_5, -1, 2, 0},
{ 4, s_2_6, 0, 1, 0},
{ 4, s_2_7, 0, 1, 0}
};
static const symbol s_3_0[4] = { 0xD1, 0x81, 0xD1, 0x8C };
static const symbol s_3_1[4] = { 0xD1, 0x81, 0xD1, 0x8F };
static const struct among a_3[2] =
{
{ 4, s_3_0, -1, 1, 0},
{ 4, s_3_1, -1, 1, 0}
static const struct among a_3[2] = {
{ 4, s_3_0, 0, 1, 0},
{ 4, s_3_1, 0, 1, 0}
};
static const symbol s_4_0[4] = { 0xD1, 0x8B, 0xD1, 0x82 };
@ -187,55 +194,53 @@ static const symbol s_4_42[6] = { 0xD0, 0xB8, 0xD0, 0xBB, 0xD0, 0xBE };
static const symbol s_4_43[4] = { 0xD0, 0xBD, 0xD0, 0xBE };
static const symbol s_4_44[6] = { 0xD0, 0xB5, 0xD0, 0xBD, 0xD0, 0xBE };
static const symbol s_4_45[6] = { 0xD0, 0xBD, 0xD0, 0xBD, 0xD0, 0xBE };
static const struct among a_4[46] =
{
{ 4, s_4_0, -1, 2, 0},
{ 4, s_4_1, -1, 1, 0},
{ 6, s_4_2, 1, 2, 0},
{ 4, s_4_3, -1, 2, 0},
{ 4, s_4_4, -1, 1, 0},
{ 6, s_4_5, 4, 2, 0},
{ 4, s_4_6, -1, 2, 0},
{ 4, s_4_7, -1, 1, 0},
{ 6, s_4_8, 7, 2, 0},
{ 4, s_4_9, -1, 1, 0},
{ 6, s_4_10, 9, 2, 0},
{ 6, s_4_11, 9, 2, 0},
{ 6, s_4_12, -1, 1, 0},
{ 6, s_4_13, -1, 2, 0},
{ 2, s_4_14, -1, 2, 0},
{ 4, s_4_15, 14, 2, 0},
{ 4, s_4_16, -1, 1, 0},
{ 6, s_4_17, 16, 2, 0},
{ 6, s_4_18, 16, 2, 0},
{ 4, s_4_19, -1, 1, 0},
{ 6, s_4_20, 19, 2, 0},
{ 6, s_4_21, -1, 1, 0},
{ 6, s_4_22, -1, 2, 0},
{ 6, s_4_23, -1, 1, 0},
{ 8, s_4_24, 23, 2, 0},
{ 8, s_4_25, 23, 2, 0},
{ 4, s_4_26, -1, 1, 0},
{ 6, s_4_27, 26, 2, 0},
{ 6, s_4_28, 26, 2, 0},
{ 2, s_4_29, -1, 1, 0},
{ 4, s_4_30, 29, 2, 0},
{ 4, s_4_31, 29, 2, 0},
{ 2, s_4_32, -1, 1, 0},
{ 4, s_4_33, 32, 2, 0},
{ 4, s_4_34, 32, 2, 0},
{ 4, s_4_35, -1, 2, 0},
{ 4, s_4_36, -1, 1, 0},
{ 4, s_4_37, -1, 2, 0},
{ 2, s_4_38, -1, 1, 0},
{ 4, s_4_39, 38, 2, 0},
{ 4, s_4_40, -1, 1, 0},
{ 6, s_4_41, 40, 2, 0},
{ 6, s_4_42, 40, 2, 0},
{ 4, s_4_43, -1, 1, 0},
{ 6, s_4_44, 43, 2, 0},
{ 6, s_4_45, 43, 1, 0}
static const struct among a_4[46] = {
{ 4, s_4_0, 0, 2, 0},
{ 4, s_4_1, 0, 1, 0},
{ 6, s_4_2, -1, 2, 0},
{ 4, s_4_3, 0, 2, 0},
{ 4, s_4_4, 0, 1, 0},
{ 6, s_4_5, -1, 2, 0},
{ 4, s_4_6, 0, 2, 0},
{ 4, s_4_7, 0, 1, 0},
{ 6, s_4_8, -1, 2, 0},
{ 4, s_4_9, 0, 1, 0},
{ 6, s_4_10, -1, 2, 0},
{ 6, s_4_11, -2, 2, 0},
{ 6, s_4_12, 0, 1, 0},
{ 6, s_4_13, 0, 2, 0},
{ 2, s_4_14, 0, 2, 0},
{ 4, s_4_15, -1, 2, 0},
{ 4, s_4_16, 0, 1, 0},
{ 6, s_4_17, -1, 2, 0},
{ 6, s_4_18, -2, 2, 0},
{ 4, s_4_19, 0, 1, 0},
{ 6, s_4_20, -1, 2, 0},
{ 6, s_4_21, 0, 1, 0},
{ 6, s_4_22, 0, 2, 0},
{ 6, s_4_23, 0, 1, 0},
{ 8, s_4_24, -1, 2, 0},
{ 8, s_4_25, -2, 2, 0},
{ 4, s_4_26, 0, 1, 0},
{ 6, s_4_27, -1, 2, 0},
{ 6, s_4_28, -2, 2, 0},
{ 2, s_4_29, 0, 1, 0},
{ 4, s_4_30, -1, 2, 0},
{ 4, s_4_31, -2, 2, 0},
{ 2, s_4_32, 0, 1, 0},
{ 4, s_4_33, -1, 2, 0},
{ 4, s_4_34, -2, 2, 0},
{ 4, s_4_35, 0, 2, 0},
{ 4, s_4_36, 0, 1, 0},
{ 4, s_4_37, 0, 2, 0},
{ 2, s_4_38, 0, 1, 0},
{ 4, s_4_39, -1, 2, 0},
{ 4, s_4_40, 0, 1, 0},
{ 6, s_4_41, -1, 2, 0},
{ 6, s_4_42, -2, 2, 0},
{ 4, s_4_43, 0, 1, 0},
{ 6, s_4_44, -1, 2, 0},
{ 6, s_4_45, -2, 1, 0}
};
static const symbol s_5_0[2] = { 0xD1, 0x83 };
@ -274,146 +279,126 @@ static const symbol s_5_32[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
static const symbol s_5_33[6] = { 0xD0, 0xB8, 0xD0, 0xB5, 0xD0, 0xBC };
static const symbol s_5_34[4] = { 0xD0, 0xBE, 0xD0, 0xBC };
static const symbol s_5_35[2] = { 0xD0, 0xBE };
static const struct among a_5[36] =
{
{ 2, s_5_0, -1, 1, 0},
{ 4, s_5_1, -1, 1, 0},
{ 6, s_5_2, 1, 1, 0},
{ 4, s_5_3, -1, 1, 0},
{ 2, s_5_4, -1, 1, 0},
{ 2, s_5_5, -1, 1, 0},
{ 2, s_5_6, -1, 1, 0},
{ 4, s_5_7, 6, 1, 0},
{ 4, s_5_8, 6, 1, 0},
{ 2, s_5_9, -1, 1, 0},
{ 4, s_5_10, 9, 1, 0},
{ 4, s_5_11, 9, 1, 0},
{ 2, s_5_12, -1, 1, 0},
{ 4, s_5_13, -1, 1, 0},
{ 4, s_5_14, -1, 1, 0},
{ 2, s_5_15, -1, 1, 0},
{ 4, s_5_16, 15, 1, 0},
{ 4, s_5_17, 15, 1, 0},
{ 2, s_5_18, -1, 1, 0},
{ 4, s_5_19, 18, 1, 0},
{ 4, s_5_20, 18, 1, 0},
{ 6, s_5_21, 18, 1, 0},
{ 8, s_5_22, 21, 1, 0},
{ 6, s_5_23, 18, 1, 0},
{ 2, s_5_24, -1, 1, 0},
{ 4, s_5_25, 24, 1, 0},
{ 6, s_5_26, 25, 1, 0},
{ 4, s_5_27, 24, 1, 0},
{ 4, s_5_28, 24, 1, 0},
{ 4, s_5_29, -1, 1, 0},
{ 6, s_5_30, 29, 1, 0},
{ 4, s_5_31, -1, 1, 0},
{ 4, s_5_32, -1, 1, 0},
{ 6, s_5_33, 32, 1, 0},
{ 4, s_5_34, -1, 1, 0},
{ 2, s_5_35, -1, 1, 0}
static const struct among a_5[36] = {
{ 2, s_5_0, 0, 1, 0},
{ 4, s_5_1, 0, 1, 0},
{ 6, s_5_2, -1, 1, 0},
{ 4, s_5_3, 0, 1, 0},
{ 2, s_5_4, 0, 1, 0},
{ 2, s_5_5, 0, 1, 0},
{ 2, s_5_6, 0, 1, 0},
{ 4, s_5_7, -1, 1, 0},
{ 4, s_5_8, -2, 1, 0},
{ 2, s_5_9, 0, 1, 0},
{ 4, s_5_10, -1, 1, 0},
{ 4, s_5_11, -2, 1, 0},
{ 2, s_5_12, 0, 1, 0},
{ 4, s_5_13, 0, 1, 0},
{ 4, s_5_14, 0, 1, 0},
{ 2, s_5_15, 0, 1, 0},
{ 4, s_5_16, -1, 1, 0},
{ 4, s_5_17, -2, 1, 0},
{ 2, s_5_18, 0, 1, 0},
{ 4, s_5_19, -1, 1, 0},
{ 4, s_5_20, -2, 1, 0},
{ 6, s_5_21, -3, 1, 0},
{ 8, s_5_22, -1, 1, 0},
{ 6, s_5_23, -5, 1, 0},
{ 2, s_5_24, 0, 1, 0},
{ 4, s_5_25, -1, 1, 0},
{ 6, s_5_26, -1, 1, 0},
{ 4, s_5_27, -3, 1, 0},
{ 4, s_5_28, -4, 1, 0},
{ 4, s_5_29, 0, 1, 0},
{ 6, s_5_30, -1, 1, 0},
{ 4, s_5_31, 0, 1, 0},
{ 4, s_5_32, 0, 1, 0},
{ 6, s_5_33, -1, 1, 0},
{ 4, s_5_34, 0, 1, 0},
{ 2, s_5_35, 0, 1, 0}
};
static const symbol s_6_0[6] = { 0xD0, 0xBE, 0xD1, 0x81, 0xD1, 0x82 };
static const symbol s_6_1[8] = { 0xD0, 0xBE, 0xD1, 0x81, 0xD1, 0x82, 0xD1, 0x8C };
static const struct among a_6[2] =
{
{ 6, s_6_0, -1, 1, 0},
{ 8, s_6_1, -1, 1, 0}
static const struct among a_6[2] = {
{ 6, s_6_0, 0, 1, 0},
{ 8, s_6_1, 0, 1, 0}
};
static const symbol s_7_0[6] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x88 };
static const symbol s_7_1[2] = { 0xD1, 0x8C };
static const symbol s_7_2[8] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x88, 0xD0, 0xB5 };
static const symbol s_7_3[2] = { 0xD0, 0xBD };
static const struct among a_7[4] =
{
{ 6, s_7_0, -1, 1, 0},
{ 2, s_7_1, -1, 3, 0},
{ 8, s_7_2, -1, 1, 0},
{ 2, s_7_3, -1, 2, 0}
static const struct among a_7[4] = {
{ 6, s_7_0, 0, 1, 0},
{ 2, s_7_1, 0, 3, 0},
{ 8, s_7_2, 0, 1, 0},
{ 2, s_7_3, 0, 2, 0}
};
static const unsigned char g_v[] = { 33, 65, 8, 232 };
static const symbol s_0[] = { 0xD0, 0xB0 };
static const symbol s_1[] = { 0xD1, 0x8F };
static const symbol s_2[] = { 0xD0, 0xB0 };
static const symbol s_3[] = { 0xD1, 0x8F };
static const symbol s_4[] = { 0xD0, 0xB0 };
static const symbol s_5[] = { 0xD1, 0x8F };
static const symbol s_6[] = { 0xD0, 0xBD };
static const symbol s_7[] = { 0xD0, 0xBD };
static const symbol s_8[] = { 0xD0, 0xBD };
static const symbol s_9[] = { 0xD1, 0x91 };
static const symbol s_10[] = { 0xD0, 0xB5 };
static const symbol s_11[] = { 0xD0, 0xB8 };
static int r_mark_regions(struct SN_env * z) {
z->I[1] = z->l;
z->I[0] = z->l;
{ int c1 = z->c;
((SN_local *)z)->i_pV = z->l;
((SN_local *)z)->i_p2 = z->l;
{
int v_1 = z->c;
{
int ret = out_grouping_U(z, g_v, 1072, 1103, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[1] = z->c;
((SN_local *)z)->i_pV = z->c;
{
int ret = in_grouping_U(z, g_v, 1072, 1103, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{
int ret = out_grouping_U(z, g_v, 1072, 1103, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
{
int ret = in_grouping_U(z, g_v, 1072, 1103, 1);
if (ret < 0) goto lab0;
z->c += ret;
}
z->I[0] = z->c;
((SN_local *)z)->i_p2 = z->c;
lab0:
z->c = c1;
z->c = v_1;
}
return 1;
}
static int r_R2(struct SN_env * z) {
return z->I[0] <= z->c;
return ((SN_local *)z)->i_p2 <= z->c;
}
static int r_perfective_gerund(struct SN_env * z) {
int among_var;
z->ket = z->c;
among_var = find_among_b(z, a_0, 9);
among_var = find_among_b(z, a_0, 9, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int m1 = z->l - z->c; (void)m1;
if (!(eq_s_b(z, 2, s_0))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m1;
do {
int v_1 = z->l - z->c;
if (!(eq_s_b(z, 2, s_0))) goto lab0;
break;
lab0:
z->c = z->l - v_1;
if (!(eq_s_b(z, 2, s_1))) return 0;
}
lab0:
{ int ret = slice_del(z);
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -423,9 +408,10 @@ static int r_perfective_gerund(struct SN_env * z) {
static int r_adjective(struct SN_env * z) {
z->ket = z->c;
if (!find_among_b(z, a_1, 26)) return 0;
if (!find_among_b(z, a_1, 26, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -433,30 +419,34 @@ static int r_adjective(struct SN_env * z) {
static int r_adjectival(struct SN_env * z) {
int among_var;
{ int ret = r_adjective(z);
{
int ret = r_adjective(z);
if (ret <= 0) return ret;
}
{ int m1 = z->l - z->c; (void)m1;
{
int v_1 = z->l - z->c;
z->ket = z->c;
among_var = find_among_b(z, a_2, 8);
if (!among_var) { z->c = z->l - m1; goto lab0; }
among_var = find_among_b(z, a_2, 8, 0);
if (!among_var) { z->c = z->l - v_1; goto lab0; }
z->bra = z->c;
switch (among_var) {
case 1:
{ int m2 = z->l - z->c; (void)m2;
if (!(eq_s_b(z, 2, s_2))) goto lab2;
goto lab1;
lab2:
z->c = z->l - m2;
if (!(eq_s_b(z, 2, s_3))) { z->c = z->l - m1; goto lab0; }
}
lab1:
{ int ret = slice_del(z);
do {
int v_2 = z->l - z->c;
if (!(eq_s_b(z, 2, s_2))) goto lab1;
break;
lab1:
z->c = z->l - v_2;
if (!(eq_s_b(z, 2, s_3))) { z->c = z->l - v_1; goto lab0; }
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -470,9 +460,10 @@ static int r_adjectival(struct SN_env * z) {
static int r_reflexive(struct SN_env * z) {
z->ket = z->c;
if (z->c - 3 <= z->lb || (z->p[z->c - 1] != 140 && z->p[z->c - 1] != 143)) return 0;
if (!find_among_b(z, a_3, 2)) return 0;
if (!find_among_b(z, a_3, 2, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -481,25 +472,27 @@ static int r_reflexive(struct SN_env * z) {
static int r_verb(struct SN_env * z) {
int among_var;
z->ket = z->c;
among_var = find_among_b(z, a_4, 46);
among_var = find_among_b(z, a_4, 46, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int m1 = z->l - z->c; (void)m1;
if (!(eq_s_b(z, 2, s_4))) goto lab1;
goto lab0;
lab1:
z->c = z->l - m1;
do {
int v_1 = z->l - z->c;
if (!(eq_s_b(z, 2, s_4))) goto lab0;
break;
lab0:
z->c = z->l - v_1;
if (!(eq_s_b(z, 2, s_5))) return 0;
}
lab0:
{ int ret = slice_del(z);
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -509,9 +502,10 @@ static int r_verb(struct SN_env * z) {
static int r_noun(struct SN_env * z) {
z->ket = z->c;
if (!find_among_b(z, a_5, 36)) return 0;
if (!find_among_b(z, a_5, 36, 0)) return 0;
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -520,12 +514,14 @@ static int r_noun(struct SN_env * z) {
static int r_derivational(struct SN_env * z) {
z->ket = z->c;
if (z->c - 5 <= z->lb || (z->p[z->c - 1] != 130 && z->p[z->c - 1] != 140)) return 0;
if (!find_among_b(z, a_6, 2)) return 0;
if (!find_among_b(z, a_6, 2, 0)) return 0;
z->bra = z->c;
{ int ret = r_R2(z);
{
int ret = r_R2(z);
if (ret <= 0) return ret;
}
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
return 1;
@ -534,30 +530,34 @@ static int r_derivational(struct SN_env * z) {
static int r_tidy_up(struct SN_env * z) {
int among_var;
z->ket = z->c;
among_var = find_among_b(z, a_7, 4);
among_var = find_among_b(z, a_7, 4, 0);
if (!among_var) return 0;
z->bra = z->c;
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
z->ket = z->c;
if (!(eq_s_b(z, 2, s_6))) return 0;
z->bra = z->c;
if (!(eq_s_b(z, 2, s_7))) return 0;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (!(eq_s_b(z, 2, s_8))) return 0;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -566,116 +566,139 @@ static int r_tidy_up(struct SN_env * z) {
}
extern int russian_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c;
while(1) {
int c2 = z->c;
while(1) {
int c3 = z->c;
{
int v_1 = z->c;
while (1) {
int v_2 = z->c;
while (1) {
int v_3 = z->c;
z->bra = z->c;
if (!(eq_s(z, 2, s_9))) goto lab2;
z->ket = z->c;
z->c = c3;
z->c = v_3;
break;
lab2:
z->c = c3;
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
z->c = v_3;
{
int ret = skip_utf8(z->p, z->c, z->l, 1);
if (ret < 0) goto lab1;
z->c = ret;
}
}
{ int ret = slice_from_s(z, 2, s_10);
{
int ret = slice_from_s(z, 2, s_10);
if (ret < 0) return ret;
}
continue;
lab1:
z->c = c2;
z->c = v_2;
break;
}
z->c = c1;
z->c = v_1;
}
{ int ret = r_mark_regions(z);
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->lb = z->c; z->c = z->l;
{ int mlimit4;
if (z->c < z->I[1]) return 0;
mlimit4 = z->lb; z->lb = z->I[1];
{ int m5 = z->l - z->c; (void)m5;
{ int m6 = z->l - z->c; (void)m6;
{ int ret = r_perfective_gerund(z);
if (ret == 0) goto lab5;
{
int v_4;
if (z->c < ((SN_local *)z)->i_pV) return 0;
v_4 = z->lb; z->lb = ((SN_local *)z)->i_pV;
{
int v_5 = z->l - z->c;
do {
int v_6 = z->l - z->c;
{
int ret = r_perfective_gerund(z);
if (ret == 0) goto lab4;
if (ret < 0) return ret;
}
goto lab4;
lab5:
z->c = z->l - m6;
{ int m7 = z->l - z->c; (void)m7;
{ int ret = r_reflexive(z);
if (ret == 0) { z->c = z->l - m7; goto lab6; }
break;
lab4:
z->c = z->l - v_6;
{
int v_7 = z->l - z->c;
{
int ret = r_reflexive(z);
if (ret == 0) { z->c = z->l - v_7; goto lab5; }
if (ret < 0) return ret;
}
lab6:
lab5:
;
}
{ int m8 = z->l - z->c; (void)m8;
{ int ret = r_adjectival(z);
if (ret == 0) goto lab8;
do {
int v_8 = z->l - z->c;
{
int ret = r_adjectival(z);
if (ret == 0) goto lab6;
if (ret < 0) return ret;
}
goto lab7;
lab8:
z->c = z->l - m8;
{ int ret = r_verb(z);
if (ret == 0) goto lab9;
break;
lab6:
z->c = z->l - v_8;
{
int ret = r_verb(z);
if (ret == 0) goto lab7;
if (ret < 0) return ret;
}
goto lab7;
lab9:
z->c = z->l - m8;
{ int ret = r_noun(z);
break;
lab7:
z->c = z->l - v_8;
{
int ret = r_noun(z);
if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
}
lab7:
;
}
lab4:
} while (0);
} while (0);
lab3:
z->c = z->l - m5;
z->c = z->l - v_5;
}
{ int m9 = z->l - z->c; (void)m9;
{
int v_9 = z->l - z->c;
z->ket = z->c;
if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m9; goto lab10; }
if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - v_9; goto lab8; }
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
lab10:
lab8:
;
}
{ int m10 = z->l - z->c; (void)m10;
{ int ret = r_derivational(z);
{
int v_10 = z->l - z->c;
{
int ret = r_derivational(z);
if (ret < 0) return ret;
}
z->c = z->l - m10;
z->c = z->l - v_10;
}
{ int m11 = z->l - z->c; (void)m11;
{ int ret = r_tidy_up(z);
{
int v_11 = z->l - z->c;
{
int ret = r_tidy_up(z);
if (ret < 0) return ret;
}
z->c = z->l - m11;
z->c = z->l - v_11;
}
z->lb = mlimit4;
z->lb = v_4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * russian_UTF_8_create_env(void) { return SN_create_env(0, 2); }
extern struct SN_env * russian_UTF_8_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p2 = 0;
((SN_local *)z)->i_pV = 0;
}
return z;
}
extern void russian_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void russian_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,17 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from swedish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#include "header.h"
#include "stem_UTF_8_swedish.h"
#include <stddef.h>
#include "snowball_runtime.h"
struct SN_local {
struct SN_env z;
int i_p1;
};
typedef struct SN_local SN_local;
#ifdef __cplusplus
extern "C" {
@ -9,133 +20,169 @@ extern int swedish_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static int r_other_suffix(struct SN_env * z);
static int r_consonant_pair(struct SN_env * z);
static int r_main_suffix(struct SN_env * z);
static int r_mark_regions(struct SN_env * z);
#ifdef __cplusplus
extern "C" {
#endif
static int r_et_condition(struct SN_env * z);
static const symbol s_0[] = { 'e', 't' };
static const symbol s_1[] = { 0xC3, 0xB6, 's' };
static const symbol s_2[] = { 'f', 'u', 'l', 'l' };
extern struct SN_env * swedish_UTF_8_create_env(void);
extern void swedish_UTF_8_close_env(struct SN_env * z);
#ifdef __cplusplus
}
#endif
static const symbol s_0_0[1] = { 'a' };
static const symbol s_0_1[4] = { 'a', 'r', 'n', 'a' };
static const symbol s_0_2[4] = { 'e', 'r', 'n', 'a' };
static const symbol s_0_3[7] = { 'h', 'e', 't', 'e', 'r', 'n', 'a' };
static const symbol s_0_4[4] = { 'o', 'r', 'n', 'a' };
static const symbol s_0_5[2] = { 'a', 'd' };
static const symbol s_0_6[1] = { 'e' };
static const symbol s_0_7[3] = { 'a', 'd', 'e' };
static const symbol s_0_8[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_0_9[4] = { 'a', 'r', 'n', 'e' };
static const symbol s_0_10[3] = { 'a', 'r', 'e' };
static const symbol s_0_11[4] = { 'a', 's', 't', 'e' };
static const symbol s_0_12[2] = { 'e', 'n' };
static const symbol s_0_13[5] = { 'a', 'n', 'd', 'e', 'n' };
static const symbol s_0_14[4] = { 'a', 'r', 'e', 'n' };
static const symbol s_0_15[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_0_16[3] = { 'e', 'r', 'n' };
static const symbol s_0_17[2] = { 'a', 'r' };
static const symbol s_0_18[2] = { 'e', 'r' };
static const symbol s_0_19[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_0_20[2] = { 'o', 'r' };
static const symbol s_0_21[1] = { 's' };
static const symbol s_0_22[2] = { 'a', 's' };
static const symbol s_0_23[5] = { 'a', 'r', 'n', 'a', 's' };
static const symbol s_0_24[5] = { 'e', 'r', 'n', 'a', 's' };
static const symbol s_0_25[5] = { 'o', 'r', 'n', 'a', 's' };
static const symbol s_0_26[2] = { 'e', 's' };
static const symbol s_0_27[4] = { 'a', 'd', 'e', 's' };
static const symbol s_0_28[5] = { 'a', 'n', 'd', 'e', 's' };
static const symbol s_0_29[3] = { 'e', 'n', 's' };
static const symbol s_0_30[5] = { 'a', 'r', 'e', 'n', 's' };
static const symbol s_0_31[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_0_32[4] = { 'e', 'r', 'n', 's' };
static const symbol s_0_33[2] = { 'a', 't' };
static const symbol s_0_34[5] = { 'a', 'n', 'd', 'e', 't' };
static const symbol s_0_35[3] = { 'h', 'e', 't' };
static const symbol s_0_36[3] = { 'a', 's', 't' };
static const struct among a_0[37] =
{
{ 1, s_0_0, -1, 1, 0},
{ 4, s_0_1, 0, 1, 0},
{ 4, s_0_2, 0, 1, 0},
{ 7, s_0_3, 2, 1, 0},
{ 4, s_0_4, 0, 1, 0},
{ 2, s_0_5, -1, 1, 0},
{ 1, s_0_6, -1, 1, 0},
{ 3, s_0_7, 6, 1, 0},
{ 4, s_0_8, 6, 1, 0},
{ 4, s_0_9, 6, 1, 0},
{ 3, s_0_10, 6, 1, 0},
{ 4, s_0_11, 6, 1, 0},
{ 2, s_0_12, -1, 1, 0},
{ 5, s_0_13, 12, 1, 0},
{ 4, s_0_14, 12, 1, 0},
{ 5, s_0_15, 12, 1, 0},
{ 3, s_0_16, -1, 1, 0},
{ 2, s_0_17, -1, 1, 0},
{ 2, s_0_18, -1, 1, 0},
{ 5, s_0_19, 18, 1, 0},
{ 2, s_0_20, -1, 1, 0},
{ 1, s_0_21, -1, 2, 0},
{ 2, s_0_22, 21, 1, 0},
{ 5, s_0_23, 22, 1, 0},
{ 5, s_0_24, 22, 1, 0},
{ 5, s_0_25, 22, 1, 0},
{ 2, s_0_26, 21, 1, 0},
{ 4, s_0_27, 26, 1, 0},
{ 5, s_0_28, 26, 1, 0},
{ 3, s_0_29, 21, 1, 0},
{ 5, s_0_30, 29, 1, 0},
{ 6, s_0_31, 29, 1, 0},
{ 4, s_0_32, 21, 1, 0},
{ 2, s_0_33, -1, 1, 0},
{ 5, s_0_34, -1, 1, 0},
{ 3, s_0_35, -1, 1, 0},
{ 3, s_0_36, -1, 1, 0}
static const symbol s_0_0[3] = { 'f', 'a', 'b' };
static const symbol s_0_1[1] = { 'h' };
static const symbol s_0_2[3] = { 'p', 'a', 'k' };
static const symbol s_0_3[3] = { 'r', 'a', 'k' };
static const symbol s_0_4[4] = { 's', 't', 'a', 'k' };
static const symbol s_0_5[3] = { 'k', 'o', 'm' };
static const symbol s_0_6[3] = { 'i', 'e', 't' };
static const symbol s_0_7[3] = { 'c', 'i', 't' };
static const symbol s_0_8[3] = { 'd', 'i', 't' };
static const symbol s_0_9[4] = { 'a', 'l', 'i', 't' };
static const symbol s_0_10[4] = { 'i', 'l', 'i', 't' };
static const symbol s_0_11[3] = { 'm', 'i', 't' };
static const symbol s_0_12[3] = { 'n', 'i', 't' };
static const symbol s_0_13[3] = { 'p', 'i', 't' };
static const symbol s_0_14[3] = { 'r', 'i', 't' };
static const symbol s_0_15[3] = { 's', 'i', 't' };
static const symbol s_0_16[3] = { 't', 'i', 't' };
static const symbol s_0_17[3] = { 'u', 'i', 't' };
static const symbol s_0_18[4] = { 'i', 'v', 'i', 't' };
static const symbol s_0_19[4] = { 'k', 'v', 'i', 't' };
static const symbol s_0_20[3] = { 'x', 'i', 't' };
static const struct among a_0[21] = {
{ 3, s_0_0, 0, -1, 0},
{ 1, s_0_1, 0, -1, 0},
{ 3, s_0_2, 0, -1, 0},
{ 3, s_0_3, 0, -1, 0},
{ 4, s_0_4, 0, -1, 0},
{ 3, s_0_5, 0, -1, 0},
{ 3, s_0_6, 0, -1, 0},
{ 3, s_0_7, 0, -1, 0},
{ 3, s_0_8, 0, -1, 0},
{ 4, s_0_9, 0, -1, 0},
{ 4, s_0_10, 0, -1, 0},
{ 3, s_0_11, 0, -1, 0},
{ 3, s_0_12, 0, -1, 0},
{ 3, s_0_13, 0, -1, 0},
{ 3, s_0_14, 0, -1, 0},
{ 3, s_0_15, 0, -1, 0},
{ 3, s_0_16, 0, -1, 0},
{ 3, s_0_17, 0, -1, 0},
{ 4, s_0_18, 0, -1, 0},
{ 4, s_0_19, 0, -1, 0},
{ 3, s_0_20, 0, -1, 0}
};
static const symbol s_1_0[2] = { 'd', 'd' };
static const symbol s_1_1[2] = { 'g', 'd' };
static const symbol s_1_2[2] = { 'n', 'n' };
static const symbol s_1_3[2] = { 'd', 't' };
static const symbol s_1_4[2] = { 'g', 't' };
static const symbol s_1_5[2] = { 'k', 't' };
static const symbol s_1_6[2] = { 't', 't' };
static const struct among a_1[7] =
{
{ 2, s_1_0, -1, -1, 0},
{ 2, s_1_1, -1, -1, 0},
{ 2, s_1_2, -1, -1, 0},
{ 2, s_1_3, -1, -1, 0},
{ 2, s_1_4, -1, -1, 0},
{ 2, s_1_5, -1, -1, 0},
{ 2, s_1_6, -1, -1, 0}
static const symbol s_1_0[1] = { 'a' };
static const symbol s_1_1[4] = { 'a', 'r', 'n', 'a' };
static const symbol s_1_2[4] = { 'e', 'r', 'n', 'a' };
static const symbol s_1_3[7] = { 'h', 'e', 't', 'e', 'r', 'n', 'a' };
static const symbol s_1_4[4] = { 'o', 'r', 'n', 'a' };
static const symbol s_1_5[2] = { 'a', 'd' };
static const symbol s_1_6[1] = { 'e' };
static const symbol s_1_7[3] = { 'a', 'd', 'e' };
static const symbol s_1_8[4] = { 'a', 'n', 'd', 'e' };
static const symbol s_1_9[4] = { 'a', 'r', 'n', 'e' };
static const symbol s_1_10[3] = { 'a', 'r', 'e' };
static const symbol s_1_11[4] = { 'a', 's', 't', 'e' };
static const symbol s_1_12[2] = { 'e', 'n' };
static const symbol s_1_13[5] = { 'a', 'n', 'd', 'e', 'n' };
static const symbol s_1_14[4] = { 'a', 'r', 'e', 'n' };
static const symbol s_1_15[5] = { 'h', 'e', 't', 'e', 'n' };
static const symbol s_1_16[3] = { 'e', 'r', 'n' };
static const symbol s_1_17[2] = { 'a', 'r' };
static const symbol s_1_18[2] = { 'e', 'r' };
static const symbol s_1_19[5] = { 'h', 'e', 't', 'e', 'r' };
static const symbol s_1_20[2] = { 'o', 'r' };
static const symbol s_1_21[1] = { 's' };
static const symbol s_1_22[2] = { 'a', 's' };
static const symbol s_1_23[5] = { 'a', 'r', 'n', 'a', 's' };
static const symbol s_1_24[5] = { 'e', 'r', 'n', 'a', 's' };
static const symbol s_1_25[5] = { 'o', 'r', 'n', 'a', 's' };
static const symbol s_1_26[2] = { 'e', 's' };
static const symbol s_1_27[4] = { 'a', 'd', 'e', 's' };
static const symbol s_1_28[5] = { 'a', 'n', 'd', 'e', 's' };
static const symbol s_1_29[3] = { 'e', 'n', 's' };
static const symbol s_1_30[5] = { 'a', 'r', 'e', 'n', 's' };
static const symbol s_1_31[6] = { 'h', 'e', 't', 'e', 'n', 's' };
static const symbol s_1_32[4] = { 'e', 'r', 'n', 's' };
static const symbol s_1_33[2] = { 'a', 't' };
static const symbol s_1_34[2] = { 'e', 't' };
static const symbol s_1_35[5] = { 'a', 'n', 'd', 'e', 't' };
static const symbol s_1_36[3] = { 'h', 'e', 't' };
static const symbol s_1_37[3] = { 'a', 's', 't' };
static const struct among a_1[38] = {
{ 1, s_1_0, 0, 1, 0},
{ 4, s_1_1, -1, 1, 0},
{ 4, s_1_2, -2, 1, 0},
{ 7, s_1_3, -1, 1, 0},
{ 4, s_1_4, -4, 1, 0},
{ 2, s_1_5, 0, 1, 0},
{ 1, s_1_6, 0, 1, 0},
{ 3, s_1_7, -1, 1, 0},
{ 4, s_1_8, -2, 1, 0},
{ 4, s_1_9, -3, 1, 0},
{ 3, s_1_10, -4, 1, 0},
{ 4, s_1_11, -5, 1, 0},
{ 2, s_1_12, 0, 1, 0},
{ 5, s_1_13, -1, 1, 0},
{ 4, s_1_14, -2, 1, 0},
{ 5, s_1_15, -3, 1, 0},
{ 3, s_1_16, 0, 1, 0},
{ 2, s_1_17, 0, 1, 0},
{ 2, s_1_18, 0, 1, 0},
{ 5, s_1_19, -1, 1, 0},
{ 2, s_1_20, 0, 1, 0},
{ 1, s_1_21, 0, 2, 0},
{ 2, s_1_22, -1, 1, 0},
{ 5, s_1_23, -1, 1, 0},
{ 5, s_1_24, -2, 1, 0},
{ 5, s_1_25, -3, 1, 0},
{ 2, s_1_26, -5, 1, 0},
{ 4, s_1_27, -1, 1, 0},
{ 5, s_1_28, -2, 1, 0},
{ 3, s_1_29, -8, 1, 0},
{ 5, s_1_30, -1, 1, 0},
{ 6, s_1_31, -2, 1, 0},
{ 4, s_1_32, -11, 1, 0},
{ 2, s_1_33, 0, 1, 0},
{ 2, s_1_34, 0, 3, 0},
{ 5, s_1_35, -1, 1, 0},
{ 3, s_1_36, -2, 1, 0},
{ 3, s_1_37, 0, 1, 0}
};
static const symbol s_2_0[2] = { 'i', 'g' };
static const symbol s_2_1[3] = { 'l', 'i', 'g' };
static const symbol s_2_2[3] = { 'e', 'l', 's' };
static const symbol s_2_3[5] = { 'f', 'u', 'l', 'l', 't' };
static const symbol s_2_4[4] = { 0xC3, 0xB6, 's', 't' };
static const symbol s_2_0[2] = { 'd', 'd' };
static const symbol s_2_1[2] = { 'g', 'd' };
static const symbol s_2_2[2] = { 'n', 'n' };
static const symbol s_2_3[2] = { 'd', 't' };
static const symbol s_2_4[2] = { 'g', 't' };
static const symbol s_2_5[2] = { 'k', 't' };
static const symbol s_2_6[2] = { 't', 't' };
static const struct among a_2[7] = {
{ 2, s_2_0, 0, -1, 0},
{ 2, s_2_1, 0, -1, 0},
{ 2, s_2_2, 0, -1, 0},
{ 2, s_2_3, 0, -1, 0},
{ 2, s_2_4, 0, -1, 0},
{ 2, s_2_5, 0, -1, 0},
{ 2, s_2_6, 0, -1, 0}
};
static const struct among a_2[5] =
{
{ 2, s_2_0, -1, 1, 0},
{ 3, s_2_1, 0, 1, 0},
{ 3, s_2_2, -1, 1, 0},
{ 5, s_2_3, -1, 3, 0},
{ 4, s_2_4, -1, 2, 0}
static const symbol s_3_0[2] = { 'i', 'g' };
static const symbol s_3_1[3] = { 'l', 'i', 'g' };
static const symbol s_3_2[3] = { 'e', 'l', 's' };
static const symbol s_3_3[5] = { 'f', 'u', 'l', 'l', 't' };
static const symbol s_3_4[4] = { 0xC3, 0xB6, 's', 't' };
static const struct among a_3[5] = {
{ 2, s_3_0, 0, 1, 0},
{ 3, s_3_1, -1, 1, 0},
{ 3, s_3_2, 0, 1, 0},
{ 5, s_3_3, 0, 3, 0},
{ 4, s_3_4, 0, 2, 0}
};
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32 };
@ -144,57 +191,104 @@ static const unsigned char g_s_ending[] = { 119, 127, 149 };
static const unsigned char g_ost_ending[] = { 173, 58 };
static const symbol s_0[] = { 0xC3, 0xB6, 's' };
static const symbol s_1[] = { 'f', 'u', 'l', 'l' };
static int r_mark_regions(struct SN_env * z) {
z->I[1] = z->l;
{ int c_test1 = z->c;
{ int ret = skip_utf8(z->p, z->c, z->l, 3);
int i_x;
((SN_local *)z)->i_p1 = z->l;
{
int v_1 = z->c;
{
int ret = skip_utf8(z->p, z->c, z->l, 3);
if (ret < 0) return 0;
z->c = ret;
}
z->I[0] = z->c;
z->c = c_test1;
i_x = z->c;
z->c = v_1;
}
{
int ret = out_grouping_U(z, g_v, 97, 246, 1);
if (ret < 0) return 0;
z->c += ret;
}
if (out_grouping_U(z, g_v, 97, 246, 1) < 0) return 0;
{
int ret = in_grouping_U(z, g_v, 97, 246, 1);
if (ret < 0) return 0;
z->c += ret;
}
z->I[1] = z->c;
if (z->I[1] >= z->I[0]) goto lab0;
z->I[1] = z->I[0];
((SN_local *)z)->i_p1 = z->c;
if (((SN_local *)z)->i_p1 >= i_x) goto lab0;
((SN_local *)z)->i_p1 = i_x;
lab0:
return 1;
}
static int r_et_condition(struct SN_env * z) {
{
int v_1 = z->l - z->c;
if (out_grouping_b_U(z, g_v, 97, 246, 0)) return 0;
if (in_grouping_b_U(z, g_v, 97, 246, 0)) return 0;
if (z->c > z->lb) goto lab0;
return 0;
lab0:
z->c = z->l - v_1;
{
int v_2 = z->l - z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1059076 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
if (!find_among_b(z, a_0, 21, 0)) goto lab1;
return 0;
lab1:
z->c = z->l - v_2;
}
}
return 1;
}
static int r_main_suffix(struct SN_env * z) {
int among_var;
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851442 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
among_var = find_among_b(z, a_0, 37);
if (!among_var) { z->lb = mlimit1; return 0; }
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851442 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
among_var = find_among_b(z, a_1, 38, 0);
if (!among_var) { z->lb = v_1; return 0; }
z->bra = z->c;
z->lb = mlimit1;
z->lb = v_1;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b_U(z, g_s_ending, 98, 121, 0)) return 0;
{ int ret = slice_del(z);
do {
int v_2 = z->l - z->c;
if (!(eq_s_b(z, 2, s_0))) goto lab0;
{
int ret = r_et_condition(z);
if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
z->bra = z->c;
break;
lab0:
z->c = z->l - v_2;
if (in_grouping_b_U(z, g_s_ending, 98, 121, 0)) return 0;
} while (0);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 3:
{
int ret = r_et_condition(z);
if (ret <= 0) return ret;
}
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
@ -203,56 +297,62 @@ static int r_main_suffix(struct SN_env * z) {
}
static int r_consonant_pair(struct SN_env * z) {
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{ int m2 = z->l - z->c; (void)m2;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1064976 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
if (!find_among_b(z, a_1, 7)) { z->lb = mlimit1; return 0; }
z->c = z->l - m2;
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
{
int v_2 = z->l - z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1064976 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
if (!find_among_b(z, a_2, 7, 0)) { z->lb = v_1; return 0; }
z->c = z->l - v_2;
z->ket = z->c;
{ int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
if (ret < 0) { z->lb = mlimit1; return 0; }
{
int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
if (ret < 0) { z->lb = v_1; return 0; }
z->c = ret;
}
z->bra = z->c;
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
}
z->lb = mlimit1;
z->lb = v_1;
}
return 1;
}
static int r_other_suffix(struct SN_env * z) {
int among_var;
{ int mlimit1;
if (z->c < z->I[1]) return 0;
mlimit1 = z->lb; z->lb = z->I[1];
{
int v_1;
if (z->c < ((SN_local *)z)->i_p1) return 0;
v_1 = z->lb; z->lb = ((SN_local *)z)->i_p1;
z->ket = z->c;
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; }
among_var = find_among_b(z, a_2, 5);
if (!among_var) { z->lb = mlimit1; return 0; }
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = v_1; return 0; }
among_var = find_among_b(z, a_3, 5, 0);
if (!among_var) { z->lb = v_1; return 0; }
z->bra = z->c;
z->lb = mlimit1;
z->lb = v_1;
}
switch (among_var) {
case 1:
{ int ret = slice_del(z);
{
int ret = slice_del(z);
if (ret < 0) return ret;
}
break;
case 2:
if (in_grouping_b_U(z, g_ost_ending, 105, 118, 0)) return 0;
{ int ret = slice_from_s(z, 3, s_0);
{
int ret = slice_from_s(z, 3, s_1);
if (ret < 0) return ret;
}
break;
case 3:
{ int ret = slice_from_s(z, 4, s_1);
{
int ret = slice_from_s(z, 4, s_2);
if (ret < 0) return ret;
}
break;
@ -261,37 +361,52 @@ static int r_other_suffix(struct SN_env * z) {
}
extern int swedish_UTF_8_stem(struct SN_env * z) {
{ int c1 = z->c;
{ int ret = r_mark_regions(z);
{
int v_1 = z->c;
{
int ret = r_mark_regions(z);
if (ret < 0) return ret;
}
z->c = c1;
z->c = v_1;
}
z->lb = z->c; z->c = z->l;
{ int m2 = z->l - z->c; (void)m2;
{ int ret = r_main_suffix(z);
{
int v_2 = z->l - z->c;
{
int ret = r_main_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m2;
z->c = z->l - v_2;
}
{ int m3 = z->l - z->c; (void)m3;
{ int ret = r_consonant_pair(z);
{
int v_3 = z->l - z->c;
{
int ret = r_consonant_pair(z);
if (ret < 0) return ret;
}
z->c = z->l - m3;
z->c = z->l - v_3;
}
{ int m4 = z->l - z->c; (void)m4;
{ int ret = r_other_suffix(z);
{
int v_4 = z->l - z->c;
{
int ret = r_other_suffix(z);
if (ret < 0) return ret;
}
z->c = z->l - m4;
z->c = z->l - v_4;
}
z->c = z->lb;
return 1;
}
extern struct SN_env * swedish_UTF_8_create_env(void) { return SN_create_env(0, 2); }
extern struct SN_env * swedish_UTF_8_create_env(void) {
struct SN_env * z = SN_new_env(sizeof(SN_local));
if (z) {
((SN_local *)z)->i_p1 = 0;
}
return z;
}
extern void swedish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
extern void swedish_UTF_8_close_env(struct SN_env * z) {
SN_delete_env(z);
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,27 @@
#include "header.h"
#include "snowball_runtime.h"
#ifdef SNOWBALL_RUNTIME_THROW_EXCEPTIONS
# include <new>
# include <stdexcept>
# define SNOWBALL_RETURN_OK return
# define SNOWBALL_RETURN_OR_THROW(R, E) throw E
# define SNOWBALL_PROPAGATE_ERR(F) F
#else
# define SNOWBALL_RETURN_OK return 0
# define SNOWBALL_RETURN_OR_THROW(R, E) return R
# define SNOWBALL_PROPAGATE_ERR(F) do { \
int snowball_err = F; \
if (snowball_err < 0) return snowball_err; \
} while (0)
#endif
#define CREATE_SIZE 1
extern symbol * create_s(void) {
symbol * p;
void * mem = malloc(HEAD + (CREATE_SIZE + 1) * sizeof(symbol));
if (mem == NULL) return NULL;
if (mem == NULL)
SNOWBALL_RETURN_OR_THROW(NULL, std::bad_alloc());
p = (symbol *) (HEAD + (char *) mem);
CAPACITY(p) = CREATE_SIZE;
SET_SIZE(p, 0);
@ -230,7 +246,8 @@ extern int eq_v_b(struct SN_env * z, const symbol * p) {
return eq_s_b(z, SIZE(p), p);
}
extern int find_among(struct SN_env * z, const struct among * v, int v_size) {
extern int find_among(struct SN_env * z, const struct among * v, int v_size,
int (*call_among_func)(struct SN_env*)) {
int i = 0;
int j = v_size;
@ -277,25 +294,26 @@ extern int find_among(struct SN_env * z, const struct among * v, int v_size) {
first_key_inspected = 1;
}
}
w = v + i;
while (1) {
w = v + i;
if (common_i >= w->s_size) {
z->c = c + w->s_size;
if (w->function == NULL) return w->result;
{
int res = w->function(z);
if (!w->function) return w->result;
z->af = w->function;
if (call_among_func(z)) {
z->c = c + w->s_size;
if (res) return w->result;
return w->result;
}
}
i = w->substring_i;
if (i < 0) return 0;
if (!w->substring_i) return 0;
w += w->substring_i;
}
}
/* find_among_b is for backwards processing. Same comments apply */
extern int find_among_b(struct SN_env * z, const struct among * v, int v_size) {
extern int find_among_b(struct SN_env * z, const struct among * v, int v_size,
int (*call_among_func)(struct SN_env*)) {
int i = 0;
int j = v_size;
@ -332,59 +350,49 @@ extern int find_among_b(struct SN_env * z, const struct among * v, int v_size) {
first_key_inspected = 1;
}
}
w = v + i;
while (1) {
w = v + i;
if (common_i >= w->s_size) {
z->c = c - w->s_size;
if (w->function == NULL) return w->result;
{
int res = w->function(z);
if (!w->function) return w->result;
z->af = w->function;
if (call_among_func(z)) {
z->c = c - w->s_size;
if (res) return w->result;
return w->result;
}
}
i = w->substring_i;
if (i < 0) return 0;
if (!w->substring_i) return 0;
w += w->substring_i;
}
}
/* Increase the size of the buffer pointed to by p to at least n symbols.
* If insufficient memory, returns NULL and frees the old buffer.
* On success, returns 0. If insufficient memory, returns -1.
*/
static symbol * increase_size(symbol * p, int n) {
symbol * q;
static int increase_size(symbol ** p, int n) {
int new_size = n + 20;
void * mem = realloc((char *) p - HEAD,
void * mem = realloc((char *) *p - HEAD,
HEAD + (new_size + 1) * sizeof(symbol));
if (mem == NULL) {
lose_s(p);
return NULL;
}
symbol * q;
if (mem == NULL) return -1;
q = (symbol *) (HEAD + (char *)mem);
CAPACITY(q) = new_size;
return q;
*p = q;
return 0;
}
/* to replace symbols between c_bra and c_ket in z->p by the
s_size symbols at s.
Returns 0 on success, -1 on error.
Also, frees z->p (and sets it to NULL) on error.
*/
extern int replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s, int * adjptr)
extern SNOWBALL_ERR replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s)
{
int adjustment;
int len;
if (z->p == NULL) {
z->p = create_s();
if (z->p == NULL) return -1;
}
adjustment = s_size - (c_ket - c_bra);
len = SIZE(z->p);
int adjustment = s_size - (c_ket - c_bra);
if (adjustment != 0) {
int len = SIZE(z->p);
if (adjustment + len > CAPACITY(z->p)) {
z->p = increase_size(z->p, adjustment + len);
if (z->p == NULL) return -1;
SNOWBALL_PROPAGATE_ERR(increase_size(&z->p, adjustment + len));
}
memmove(z->p + c_ket + adjustment,
z->p + c_ket,
@ -397,82 +405,97 @@ extern int replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const
z->c = c_bra;
}
if (s_size) memmove(z->p + c_bra, s, s_size * sizeof(symbol));
if (adjptr != NULL)
*adjptr = adjustment;
return 0;
SNOWBALL_RETURN_OK;
}
static int slice_check(struct SN_env * z) {
# define REPLACE_S(Z, B, K, SIZE, S) \
SNOWBALL_PROPAGATE_ERR(replace_s(Z, B, K, SIZE, S))
static SNOWBALL_ERR slice_check(struct SN_env * z) {
if (z->bra < 0 ||
z->bra > z->ket ||
z->ket > z->l ||
z->p == NULL ||
z->l > SIZE(z->p)) /* this line could be removed */
{
#if 0
fprintf(stderr, "faulty slice operation:\n");
debug(z, -1, 0);
#endif
return -1;
SNOWBALL_RETURN_OR_THROW(-1, std::logic_error("Snowball slice invalid"));
}
return 0;
SNOWBALL_RETURN_OK;
}
extern int slice_from_s(struct SN_env * z, int s_size, const symbol * s) {
if (slice_check(z)) return -1;
return replace_s(z, z->bra, z->ket, s_size, s, NULL);
# define SLICE_CHECK(Z) SNOWBALL_PROPAGATE_ERR(slice_check(Z))
extern SNOWBALL_ERR slice_from_s(struct SN_env * z, int s_size, const symbol * s) {
SLICE_CHECK(z);
REPLACE_S(z, z->bra, z->ket, s_size, s);
z->ket = z->bra + s_size;
SNOWBALL_RETURN_OK;
}
extern int slice_from_v(struct SN_env * z, const symbol * p) {
extern SNOWBALL_ERR slice_from_v(struct SN_env * z, const symbol * p) {
return slice_from_s(z, SIZE(p), p);
}
extern int slice_del(struct SN_env * z) {
return slice_from_s(z, 0, NULL);
extern SNOWBALL_ERR slice_del(struct SN_env * z) {
SLICE_CHECK(z);
{
int slice_size = z->ket - z->bra;
if (slice_size != 0) {
int len = SIZE(z->p);
memmove(z->p + z->bra,
z->p + z->ket,
(len - z->ket) * sizeof(symbol));
SET_SIZE(z->p, len - slice_size);
z->l -= slice_size;
if (z->c >= z->ket)
z->c -= slice_size;
else if (z->c > z->bra)
z->c = z->bra;
}
}
z->ket = z->bra;
SNOWBALL_RETURN_OK;
}
extern int insert_s(struct SN_env * z, int bra, int ket, int s_size, const symbol * s) {
int adjustment;
if (replace_s(z, bra, ket, s_size, s, &adjustment))
return -1;
if (bra <= z->bra) z->bra += adjustment;
if (bra <= z->ket) z->ket += adjustment;
return 0;
extern SNOWBALL_ERR insert_s(struct SN_env * z, int bra, int ket, int s_size, const symbol * s) {
REPLACE_S(z, bra, ket, s_size, s);
if (bra <= z->ket) {
int adjustment = s_size - (ket - bra);
z->ket += adjustment;
if (bra <= z->bra) z->bra += adjustment;
}
SNOWBALL_RETURN_OK;
}
extern int insert_v(struct SN_env * z, int bra, int ket, const symbol * p) {
extern SNOWBALL_ERR insert_v(struct SN_env * z, int bra, int ket, const symbol * p) {
return insert_s(z, bra, ket, SIZE(p), p);
}
extern symbol * slice_to(struct SN_env * z, symbol * p) {
if (slice_check(z)) {
lose_s(p);
return NULL;
}
extern SNOWBALL_ERR slice_to(struct SN_env * z, symbol ** p) {
SLICE_CHECK(z);
{
int len = z->ket - z->bra;
if (CAPACITY(p) < len) {
p = increase_size(p, len);
if (p == NULL)
return NULL;
if (CAPACITY(*p) < len) {
SNOWBALL_PROPAGATE_ERR(increase_size(p, len));
}
memmove(p, z->p + z->bra, len * sizeof(symbol));
SET_SIZE(p, len);
memmove(*p, z->p + z->bra, len * sizeof(symbol));
SET_SIZE(*p, len);
}
return p;
SNOWBALL_RETURN_OK;
}
extern symbol * assign_to(struct SN_env * z, symbol * p) {
extern SNOWBALL_ERR assign_to(struct SN_env * z, symbol ** p) {
int len = z->l;
if (CAPACITY(p) < len) {
p = increase_size(p, len);
if (p == NULL)
return NULL;
if (CAPACITY(*p) < len) {
SNOWBALL_PROPAGATE_ERR(increase_size(p, len));
}
memmove(p, z->p, len * sizeof(symbol));
SET_SIZE(p, len);
return p;
memmove(*p, z->p, len * sizeof(symbol));
SET_SIZE(*p, len);
SNOWBALL_RETURN_OK;
}
extern int len_utf8(const symbol * p) {
@ -484,25 +507,3 @@ extern int len_utf8(const symbol * p) {
}
return len;
}
#if 0
extern void debug(struct SN_env * z, int number, int line_count) {
int i;
int limit = SIZE(z->p);
/*if (number >= 0) printf("%3d (line %4d): '", number, line_count);*/
if (number >= 0) printf("%3d (line %4d): [%d]'", number, line_count,limit);
for (i = 0; i <= limit; i++) {
if (z->lb == i) printf("{");
if (z->bra == i) printf("[");
if (z->c == i) printf("|");
if (z->ket == i) printf("]");
if (z->l == i) printf("}");
if (i < limit)
{ int ch = z->p[i];
if (ch == 0) ch = '#';
printf("%c", ch);
}
}
printf("'\n");
}
#endif

View file

@ -11,6 +11,7 @@ dict_snowball_sources += files(
'libstemmer/stem_ISO_8859_1_catalan.c',
'libstemmer/stem_ISO_8859_1_danish.c',
'libstemmer/stem_ISO_8859_1_dutch.c',
'libstemmer/stem_ISO_8859_1_dutch_porter.c',
'libstemmer/stem_ISO_8859_1_english.c',
'libstemmer/stem_ISO_8859_1_finnish.c',
'libstemmer/stem_ISO_8859_1_french.c',
@ -24,6 +25,7 @@ dict_snowball_sources += files(
'libstemmer/stem_ISO_8859_1_spanish.c',
'libstemmer/stem_ISO_8859_1_swedish.c',
'libstemmer/stem_ISO_8859_2_hungarian.c',
'libstemmer/stem_ISO_8859_2_polish.c',
'libstemmer/stem_KOI8_R_russian.c',
'libstemmer/stem_UTF_8_arabic.c',
'libstemmer/stem_UTF_8_armenian.c',
@ -31,7 +33,9 @@ dict_snowball_sources += files(
'libstemmer/stem_UTF_8_catalan.c',
'libstemmer/stem_UTF_8_danish.c',
'libstemmer/stem_UTF_8_dutch.c',
'libstemmer/stem_UTF_8_dutch_porter.c',
'libstemmer/stem_UTF_8_english.c',
'libstemmer/stem_UTF_8_esperanto.c',
'libstemmer/stem_UTF_8_estonian.c',
'libstemmer/stem_UTF_8_finnish.c',
'libstemmer/stem_UTF_8_french.c',
@ -45,6 +49,7 @@ dict_snowball_sources += files(
'libstemmer/stem_UTF_8_lithuanian.c',
'libstemmer/stem_UTF_8_nepali.c',
'libstemmer/stem_UTF_8_norwegian.c',
'libstemmer/stem_UTF_8_polish.c',
'libstemmer/stem_UTF_8_porter.c',
'libstemmer/stem_UTF_8_portuguese.c',
'libstemmer/stem_UTF_8_romanian.c',
@ -57,7 +62,7 @@ dict_snowball_sources += files(
'libstemmer/stem_UTF_8_yiddish.c',
)
# see comment in src/include/snowball/header.h
# see comment in src/include/snowball/snowball_runtime.h
stemmer_inc = include_directories('../../include/snowball')
if host_system == 'windows'

View file

@ -19,6 +19,7 @@ our @languages = qw(
danish
dutch
english
esperanto
estonian
finnish
french
@ -32,6 +33,7 @@ our @languages = qw(
lithuanian
nepali
norwegian
polish
portuguese
romanian
russian

View file

@ -910,6 +910,8 @@ static const struct tsearch_config_match tsearch_config_languages[] =
{"nepali", "Nepali"},
{"norwegian", "no"},
{"norwegian", "Norwegian"},
{"polish", "pl"},
{"polish", "Polish"},
{"portuguese", "pt"},
{"portuguese", "Portuguese"},
{"romanian", "ro"},

View file

@ -1,3 +1,5 @@
#ifndef SNOWBALL_API_H_INCLUDED
#define SNOWBALL_API_H_INCLUDED
typedef unsigned char symbol;
@ -5,28 +7,28 @@ typedef unsigned char symbol;
More precisely, replace 'char' with whatever type guarantees the
character width you need. Note however that sizeof(symbol) should divide
HEAD, defined in header.h as 2*sizeof(int), without remainder, otherwise
there is an alignment problem. In the unlikely event of a problem here,
consult Martin Porter.
HEAD, defined in snowball_runtime.h as 2*sizeof(int), without remainder,
otherwise there is an alignment problem. In the unlikely event of a problem
here, consult Martin Porter.
*/
struct SN_env {
symbol * p;
int c; int l; int lb; int bra; int ket;
symbol * * S;
int * I;
int af;
};
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * SN_create_env(int S_size, int I_size);
extern void SN_close_env(struct SN_env * z, int S_size);
extern struct SN_env * SN_new_env(int alloc_size);
extern void SN_delete_env(struct SN_env * z);
extern int SN_set_current(struct SN_env * z, int size, const symbol * s);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,61 +0,0 @@
#include <limits.h>
#include "api.h"
#define MAXINT INT_MAX
#define MININT INT_MIN
#define HEAD 2*sizeof(int)
#define SIZE(p) ((int *)(p))[-1]
#define SET_SIZE(p, n) ((int *)(p))[-1] = n
#define CAPACITY(p) ((int *)(p))[-2]
struct among
{ int s_size; /* number of chars in string */
const symbol * s; /* search string */
int substring_i;/* index to longest matching substring */
int result; /* result of the lookup */
int (* function)(struct SN_env *);
};
extern symbol * create_s(void);
extern void lose_s(symbol * p);
extern int skip_utf8(const symbol * p, int c, int limit, int n);
extern int skip_b_utf8(const symbol * p, int c, int limit, int n);
extern int in_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int in_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int out_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int out_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int in_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int in_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int out_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int out_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int eq_s(struct SN_env * z, int s_size, const symbol * s);
extern int eq_s_b(struct SN_env * z, int s_size, const symbol * s);
extern int eq_v(struct SN_env * z, const symbol * p);
extern int eq_v_b(struct SN_env * z, const symbol * p);
extern int find_among(struct SN_env * z, const struct among * v, int v_size);
extern int find_among_b(struct SN_env * z, const struct among * v, int v_size);
extern int replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s, int * adjustment);
extern int slice_from_s(struct SN_env * z, int s_size, const symbol * s);
extern int slice_from_v(struct SN_env * z, const symbol * p);
extern int slice_del(struct SN_env * z);
extern int insert_s(struct SN_env * z, int bra, int ket, int s_size, const symbol * s);
extern int insert_v(struct SN_env * z, int bra, int ket, const symbol * p);
extern symbol * slice_to(struct SN_env * z, symbol * p);
extern symbol * assign_to(struct SN_env * z, symbol * p);
extern int len_utf8(const symbol * p);
extern void debug(struct SN_env * z, int number, int line_count);

View file

@ -0,0 +1,109 @@
#ifndef SNOWBALL_INCLUDED_SNOWBALL_RUNTIME_H
#define SNOWBALL_INCLUDED_SNOWBALL_RUNTIME_H
#include "api.h"
#define HEAD 2*sizeof(int)
#ifdef __cplusplus
/* Use reinterpret_cast<> to avoid -Wcast-align warnings from clang++. */
# define SIZE(p) (reinterpret_cast<const int *>(p))[-1]
# define SET_SIZE(p, n) (reinterpret_cast<int *>(p))[-1] = n
# define CAPACITY(p) (reinterpret_cast<int *>(p))[-2]
#else
# define SIZE(p) ((const int *)(p))[-1]
# define SET_SIZE(p, n) ((int *)(p))[-1] = n
# define CAPACITY(p) ((int *)(p))[-2]
#endif
#ifdef SNOWBALL_RUNTIME_THROW_EXCEPTIONS
# define SNOWBALL_ERR void
#else
# define SNOWBALL_ERR int
#endif
#ifdef SNOWBALL_DEBUG_COMMAND_USED
# include <stdio.h>
static void debug(struct SN_env * z, int number, int line_count) {
int i;
int limit = SIZE(z->p);
if (number >= 0) printf("%3d (line %4d): [%d]'", number, line_count, limit);
for (i = 0; i <= limit; i++) {
if (z->lb == i) printf("{");
if (z->bra == i) printf("[");
if (z->c == i) printf("|");
if (z->ket == i) printf("]");
if (z->l == i) printf("}");
if (i < limit) {
int ch = z->p[i];
if (ch == 0) ch = '#';
printf("%c", ch);
}
}
printf("'\n");
}
#endif
struct among
{
/* Number of symbols in s. */
int s_size;
/* Search string. */
const symbol * s;
/* Delta of index to longest matching substring, or 0 if none. */
int substring_i;
/* Result of the lookup. */
int result;
/* Optional condition routine index, or 0 if none. */
int function;
};
#ifdef __cplusplus
extern "C" {
#endif
extern symbol * create_s(void);
extern void lose_s(symbol * p);
extern int skip_utf8(const symbol * p, int c, int limit, int n);
extern int skip_b_utf8(const symbol * p, int c, int limit, int n);
extern int in_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int in_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int out_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int out_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int in_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int in_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int out_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int out_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
extern int eq_s(struct SN_env * z, int s_size, const symbol * s);
extern int eq_s_b(struct SN_env * z, int s_size, const symbol * s);
extern int eq_v(struct SN_env * z, const symbol * p);
extern int eq_v_b(struct SN_env * z, const symbol * p);
extern int find_among(struct SN_env * z, const struct among * v, int v_size,
int (*)(struct SN_env *));
extern int find_among_b(struct SN_env * z, const struct among * v, int v_size,
int (*)(struct SN_env *));
extern SNOWBALL_ERR replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s);
extern SNOWBALL_ERR slice_from_s(struct SN_env * z, int s_size, const symbol * s);
extern SNOWBALL_ERR slice_from_v(struct SN_env * z, const symbol * p);
extern SNOWBALL_ERR slice_del(struct SN_env * z);
extern SNOWBALL_ERR insert_s(struct SN_env * z, int bra, int ket, int s_size, const symbol * s);
extern SNOWBALL_ERR insert_v(struct SN_env * z, int bra, int ket, const symbol * p);
extern SNOWBALL_ERR slice_to(struct SN_env * z, symbol ** p);
extern SNOWBALL_ERR assign_to(struct SN_env * z, symbol ** p);
extern int len_utf8(const symbol * p);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from basque.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int basque_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from catalan.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int catalan_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from danish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int danish_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from dutch.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int dutch_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,14 @@
/* Generated from dutch_porter.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * dutch_porter_ISO_8859_1_create_env(void);
extern void dutch_porter_ISO_8859_1_close_env(struct SN_env * z);
extern int dutch_porter_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from english.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int english_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from finnish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int finnish_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from french.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int french_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from german.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int german_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from indonesian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int indonesian_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from irish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int irish_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from italian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int italian_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from norwegian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int norwegian_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from porter.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int porter_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from portuguese.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int portuguese_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from spanish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int spanish_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from swedish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int swedish_ISO_8859_1_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from hungarian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int hungarian_ISO_8859_2_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,14 @@
/* Generated from polish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * polish_ISO_8859_2_create_env(void);
extern void polish_ISO_8859_2_close_env(struct SN_env * z);
extern int polish_ISO_8859_2_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from russian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int russian_KOI8_R_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from arabic.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int arabic_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from armenian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int armenian_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from basque.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int basque_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from catalan.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int catalan_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from danish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int danish_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from dutch.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int dutch_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,14 @@
/* Generated from dutch_porter.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * dutch_porter_UTF_8_create_env(void);
extern void dutch_porter_UTF_8_close_env(struct SN_env * z);
extern int dutch_porter_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from english.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int english_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,14 @@
/* Generated from esperanto.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
#endif
extern struct SN_env * esperanto_UTF_8_create_env(void);
extern void esperanto_UTF_8_close_env(struct SN_env * z);
extern int esperanto_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from estonian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int estonian_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from finnish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int finnish_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from french.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int french_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from german.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int german_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from greek.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int greek_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

View file

@ -1,4 +1,4 @@
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
/* Generated from hindi.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
#ifdef __cplusplus
extern "C" {
@ -12,4 +12,3 @@ extern int hindi_UTF_8_stem(struct SN_env * z);
#ifdef __cplusplus
}
#endif

Some files were not shown because too many files have changed in this diff Show more