Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Postgres/src/backend/snowball/libstemmer/   (Postgres Database Version 18.4©)  Datei vom 11.4.2026 mit Größe 13 kB image not shown  

Quelle  stem_UTF_8_irish.c

  Sprache: C
 

/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */

#include "header.h"

#ifdef __cplusplus
extern "C" {
#endif
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);
static int r_mark_regions(struct SN_env * z);
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


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' };
static const symbol s_0_3[2] = { 'b''p' };
static const symbol s_0_4[2] = { 'c''h' };
static const symbol s_0_5[2] = { 'd''\'' };
static const symbol s_0_6[4] = { 'd''\'', 'f', 'h' };
static const symbol s_0_7[2] = { 'd''h' };
static const symbol s_0_8[2] = { 'd''t' };
static const symbol s_0_9[2] = { 'f''h' };
static const symbol s_0_10[2] = { 'g''c' };
static const symbol s_0_11[2] = { 'g''h' };
static const symbol s_0_12[2] = { 'h''-' };
static const symbol s_0_13[2] = { 'm''\'' };
static const symbol s_0_14[2] = { 'm''b' };
static const symbol s_0_15[2] = { 'm''h' };
static const symbol s_0_16[2] = { 'n''-' };
static const symbol s_0_17[2] = { 'n''d' };
static const symbol s_0_18[2] = { 'n''g' };
static const symbol s_0_19[2] = { 'p''h' };
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, -110},
2, s_0_1, -140},
3, s_0_2, 120},
2, s_0_3, -180},
2, s_0_4, -150},
2, s_0_5, -110},
4, s_0_6, 520},
2, s_0_7, -160},
2, s_0_8, -190},
2, s_0_9, -120},
2, s_0_10, -150},
2, s_0_11, -170},
2, s_0_12, -110},
2, s_0_13, -110},
2, s_0_14, -140},
2, s_0_15, -1100},
2, s_0_16, -110},
2, s_0_17, -160},
2, s_0_18, -170},
2, s_0_19, -180},
2, s_0_20, -130},
2, s_0_21, -110},
2, s_0_22, -190},
2, s_0_23, -130}
};

static const symbol s_1_0[7] = { 0xC3, 0xAD, 'o''c''h''t''a' };
static const symbol s_1_1[8] = { 'a'0xC3, 0xAD, 'o''c''h''t''a' };
static const symbol s_1_2[3] = { 'i''r''e' };
static const symbol s_1_3[4] = { 'a''i''r''e' };
static const symbol s_1_4[3] = { 'a''b''h' };
static const symbol s_1_5[4] = { 'e''a''b''h' };
static const symbol s_1_6[3] = { 'i''b''h' };
static const symbol s_1_7[4] = { 'a''i''b''h' };
static const symbol s_1_8[3] = { 'a''m''h' };
static const symbol s_1_9[4] = { 'e''a''m''h' };
static const symbol s_1_10[3] = { 'i''m''h' };
static const symbol s_1_11[4] = { 'a''i''m''h' };
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, -110},
8, s_1_1, 010},
3, s_1_2, -120},
4, s_1_3, 220},
3, s_1_4, -110},
4, s_1_5, 410},
3, s_1_6, -110},
4, s_1_7, 610},
3, s_1_8, -110},
4, s_1_9, 810},
3, s_1_10, -110},
4, s_1_11, 1010},
6, s_1_12, -110},
7, s_1_13, 1210},
4, s_1_14, -120},
5, s_1_15, 1420}
};

static const symbol s_2_0[9] = { 0xC3, 0xB3, 'i''d''e''a''c''h''a' };
static const symbol s_2_1[7] = { 'p''a''t''a''c''h''a' };
static const symbol s_2_2[5] = { 'a''c''h''t''a' };
static const symbol s_2_3[8] = { 'a''r''c''a''c''h''t''a' };
static const symbol s_2_4[6] = { 'e''a''c''h''t''a' };
static const symbol s_2_5[12] = { 'g''r''a''f''a'0xC3, 0xAD, 'o''c''h''t''a' };
static const symbol s_2_6[5] = { 'p''a''i''t''e' };
static const symbol s_2_7[3] = { 'a''c''h' };
static const symbol s_2_8[4] = { 'e''a''c''h' };
static const symbol s_2_9[8] = { 0xC3, 0xB3, 'i''d''e''a''c''h' };
static const symbol s_2_10[7] = { 'g''i''n''e''a''c''h' };
static const symbol s_2_11[6] = { 'p''a''t''a''c''h' };
static const symbol s_2_12[10] = { 'g''r''a''f''a'0xC3, 0xAD, 'o''c''h' };
static const symbol s_2_13[7] = { 'p''a''t''a''i''g''h' };
static const symbol s_2_14[7] = { 0xC3, 0xB3, 'i''d''i''g''h' };
static const symbol s_2_15[8] = { 'a''c''h''t'0xC3, 0xBA, 'i''l' };
static const symbol s_2_16[9] = { 'e''a''c''h''t'0xC3, 0xBA, 'i''l' };
static const symbol s_2_17[6] = { 'g''i''n''e''a''s' };
static const symbol s_2_18[5] = { 'g''i''n''i''s' };
static const symbol s_2_19[4] = { 'a''c''h''t' };
static const symbol s_2_20[7] = { 'a''r''c''a''c''h''t' };
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, -160},
7, s_2_1, -150},
5, s_2_2, -110},
8, s_2_3, 220},
6, s_2_4, 210},
12, s_2_5, -140},
5, s_2_6, -150},
3, s_2_7, -110},
4, s_2_8, 710},
8, s_2_9, 860},
7, s_2_10, 830},
6, s_2_11, 750},
10, s_2_12, -140},
7, s_2_13, -150},
7, s_2_14, -160},
8, s_2_15, -110},
9, s_2_16, 1510},
6, s_2_17, -130},
5, s_2_18, -130},
4, s_2_19, -110},
7, s_2_20, 1920},
5, s_2_21, 1910},
11, s_2_22, -140},
10, s_2_23, -120},
14, s_2_24, -140}
};

static const symbol s_3_0[4] = { 'i''m''i''d' };
static const symbol s_3_1[5] = { 'a''i''m''i''d' };
static const symbol s_3_2[5] = { 0xC3, 0xAD, 'm''i''d' };
static const symbol s_3_3[6] = { 'a'0xC3, 0xAD, 'm''i''d' };
static const symbol s_3_4[3] = { 'a''d''h' };
static const symbol s_3_5[4] = { 'e''a''d''h' };
static const symbol s_3_6[5] = { 'f''a''i''d''h' };
static const symbol s_3_7[4] = { 'f''i''d''h' };
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, -110},
5, s_3_1, 010},
5, s_3_2, -110},
6, s_3_3, 210},
3, s_3_4, -120},
4, s_3_5, 420},
5, s_3_6, -110},
4, s_3_7, -110},
4, s_3_8, -120},
3, s_3_9, -120},
4, s_3_10, -120},
3, s_3_11, -120}
};

static const unsigned char g_v[] = { 176516000000000000011742 };

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;

        {
            int ret = out_grouping_U(z, g_v, 972501);
            if (ret < 0goto lab0;
            z->c += ret;
        }
        z->I[2] = z->c;

        {
            int ret = in_grouping_U(z, g_v, 972501);
            if (ret < 0goto lab0;
            z->c += ret;
        }
        z->I[1] = z->c;

        {
            int ret = out_grouping_U(z, g_v, 972501);
            if (ret < 0goto lab0;
            z->c += ret;
        }

        {
            int ret = in_grouping_U(z, g_v, 972501);
            if (ret < 0goto lab0;
            z->c += ret;
        }
        z->I[0] = z->c;
    lab0:
        z->c = c1;
    }
    return 1;
}

static int r_initial_morph(struct SN_env * z) {
    int among_var;
    z->bra = z->c;
    among_var = find_among(z, a_0, 24);
    if (!among_var) return 0;
    z->ket = z->c;
    switch (among_var) {
        case 1:
            {   int ret = slice_del(z);
                if (ret < 0return ret;
            }
            break;
        case 2:
            {   int ret = slice_from_s(z, 1, s_0);
                if (ret < 0return ret;
            }
            break;
        case 3:
            {   int ret = slice_from_s(z, 1, s_1);
                if (ret < 0return ret;
            }
            break;
        case 4:
            {   int ret = slice_from_s(z, 1, s_2);
                if (ret < 0return ret;
            }
            break;
        case 5:
            {   int ret = slice_from_s(z, 1, s_3);
                if (ret < 0return ret;
            }
            break;
        case 6:
            {   int ret = slice_from_s(z, 1, s_4);
                if (ret < 0return ret;
            }
            break;
        case 7:
            {   int ret = slice_from_s(z, 1, s_5);
                if (ret < 0return ret;
            }
            break;
        case 8:
            {   int ret = slice_from_s(z, 1, s_6);
                if (ret < 0return ret;
            }
            break;
        case 9:
            {   int ret = slice_from_s(z, 1, s_7);
                if (ret < 0return ret;
            }
            break;
        case 10:
            {   int ret = slice_from_s(z, 1, s_8);
                if (ret < 0return ret;
            }
            break;
    }
    return 1;
}

static int r_RV(struct SN_env * z) {
    return z->I[2] <= z->c;
}

static int r_R1(struct SN_env * z) {
    return z->I[1] <= z->c;
}

static int r_R2(struct SN_env * z) {
    return z->I[0] <= 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);
    if (!among_var) return 0;
    z->bra = z->c;
    switch (among_var) {
        case 1:
            {   int ret = r_R1(z);
                if (ret <= 0return ret;
            }
            {   int ret = slice_del(z);
                if (ret < 0return ret;
            }
            break;
        case 2:
            {   int ret = r_R2(z);
                if (ret <= 0return ret;
            }
            {   int ret = slice_del(z);
                if (ret < 0return ret;
            }
            break;
    }
    return 1;
}

static int r_deriv(struct SN_env * z) {
    int among_var;
    z->ket = z->c;
    among_var = find_among_b(z, a_2, 25);
    if (!among_var) return 0;
    z->bra = z->c;
    switch (among_var) {
        case 1:
            {   int ret = r_R2(z);
                if (ret <= 0return ret;
            }
            {   int ret = slice_del(z);
                if (ret < 0return ret;
            }
            break;
        case 2:
            {   int ret = slice_from_s(z, 3, s_9);
                if (ret < 0return ret;
            }
            break;
        case 3:
            {   int ret = slice_from_s(z, 3, s_10);
                if (ret < 0return ret;
            }
            break;
        case 4:
            {   int ret = slice_from_s(z, 4, s_11);
                if (ret < 0return ret;
            }
            break;
        case 5:
            {   int ret = slice_from_s(z, 5, s_12);
                if (ret < 0return ret;
            }
            break;
        case 6:
            {   int ret = slice_from_s(z, 4, s_13);
                if (ret < 0return ret;
            }
            break;
    }
    return 1;
}

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);
    if (!among_var) return 0;
    z->bra = z->c;
    switch (among_var) {
        case 1:
            {   int ret = r_RV(z);
                if (ret <= 0return ret;
            }
            {   int ret = slice_del(z);
                if (ret < 0return ret;
            }
            break;
        case 2:
            {   int ret = r_R1(z);
                if (ret <= 0return ret;
            }
            {   int ret = slice_del(z);
                if (ret < 0return ret;
            }
            break;
    }
    return 1;
}

extern int irish_UTF_8_stem(struct SN_env * z) {
    {   int c1 = z->c;
        {   int ret = r_initial_morph(z);
            if (ret < 0return ret;
        }
        z->c = c1;
    }

    {   int ret = r_mark_regions(z);
        if (ret < 0return ret;
    }
    z->lb = z->c; z->c = z->l;

    {   int m2 = z->l - z->c; (void)m2;
        {   int ret = r_noun_sfx(z);
            if (ret < 0return ret;
        }
        z->c = z->l - m2;
    }
    {   int m3 = z->l - z->c; (void)m3;
        {   int ret = r_deriv(z);
            if (ret < 0return ret;
        }
        z->c = z->l - m3;
    }
    {   int m4 = z->l - z->c; (void)m4;
        {   int ret = r_verb_sfx(z);
            if (ret < 0return ret;
        }
        z->c = z->l - m4;
    }
    z->c = z->lb;
    return 1;
}

extern struct SN_env * irish_UTF_8_create_env(void) { return SN_create_env(03); }

extern void irish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }


Messung V0.5 in Prozent
C=92 H=96 G=93

¤ Dauer der Verarbeitung: 0.18 Sekunden  (vorverarbeitet am  2026-08-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.