How to use the snowballstemmer.german_stemmer.GermanStemmer function in snowballstemmer

To help you get started, we’ve selected a few snowballstemmer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shibukawa / snowball_py / snowballstemmer / german_stemmer.py View on Github external
def r_postlude(self):
        # repeat, line 60
        try:
            while True:
                try:
                    v_1 = self.cursor
                    try:
                        # (, line 60
                        # [, line 62
                        self.bra = self.cursor
                        # substring, line 62
                        among_var = self.find_among(GermanStemmer.a_0, 6)
                        if among_var == 0:
                            raise lab2()
                        # ], line 62
                        self.ket = self.cursor
                        if among_var == 0:
                            raise lab2()
                        elif among_var == 1:
                            # (, line 63
                            # <-, line 63
                            if not self.slice_from(u"y"):
                                return False
                        elif among_var == 2:
                            # (, line 64
                            # <-, line 64
                            if not self.slice_from(u"u"):
                                return False
github shibukawa / snowball_py / snowballstemmer / german_stemmer.py View on Github external
raise lab2()
                self.cursor = c
                # delete, line 99
                if not self.slice_del():
                    return False

        except lab2: pass
        self.cursor = self.limit - v_3
        # do, line 103
        v_4 = self.limit - self.cursor
        try:
            # (, line 103
            # [, line 104
            self.ket = self.cursor
            # substring, line 104
            among_var = self.find_among_b(GermanStemmer.a_4, 8)
            if among_var == 0:
                raise lab3()
            # ], line 104
            self.bra = self.cursor
            # call R2, line 104
            if not self.r_R2():
                raise lab3()
            if among_var == 0:
                raise lab3()
            elif among_var == 1:
                # (, line 106
                # delete, line 106
                if not self.slice_del():
                    return False

                # try, line 107
github shibukawa / snowball_py / snowballstemmer / german_stemmer.py View on Github external
def r_standard_suffix(self):
        # (, line 78
        # do, line 79
        v_1 = self.limit - self.cursor
        try:
            # (, line 79
            # [, line 80
            self.ket = self.cursor
            # substring, line 80
            among_var = self.find_among_b(GermanStemmer.a_1, 7)
            if among_var == 0:
                raise lab0()
            # ], line 80
            self.bra = self.cursor
            # call R1, line 80
            if not self.r_R1():
                raise lab0()
            if among_var == 0:
                raise lab0()
            elif among_var == 1:
                # (, line 82
                # delete, line 82
                if not self.slice_del():
                    return False

            elif among_var == 2:
github shibukawa / snowball_py / snowballstemmer / german_stemmer.py View on Github external
def equals(self, o):
        return isinstance(o, GermanStemmer)
github shibukawa / snowball_py / snowballstemmer / german_stemmer.py View on Github external
# ], line 94
            self.bra = self.cursor
            # call R1, line 94
            if not self.r_R1():
                raise lab2()
            if among_var == 0:
                raise lab2()
            elif among_var == 1:
                # (, line 96
                # delete, line 96
                if not self.slice_del():
                    return False

            elif among_var == 2:
                # (, line 99
                if not self.in_grouping_b(GermanStemmer.g_st_ending, 98, 116):
                    raise lab2()
                # hop, line 99
                c = self.cursor - 3
                if self.limit_backward > c or c > self.limit:
                    raise lab2()
                self.cursor = c
                # delete, line 99
                if not self.slice_del():
                    return False

        except lab2: pass
        self.cursor = self.limit - v_3
        # do, line 103
        v_4 = self.limit - self.cursor
        try:
            # (, line 103
github shibukawa / snowball_py / snowballstemmer / german_stemmer.py View on Github external
# test, line 52
        v_1 = self.cursor
        # (, line 52
        # hop, line 52
        c = self.cursor + 3
        if 0 > c or c > self.limit:
            return False
        self.cursor = c
        # setmark x, line 52
        self.I_x = self.cursor
        self.cursor = v_1
        # gopast, line 54
        try:
            while True:
                try:
                    if not self.in_grouping(GermanStemmer.g_v, 97, 252):
                        raise lab1()
                    raise lab0()
                except lab1: pass
                if self.cursor >= self.limit:
                    return False
                self.cursor += 1
        except lab0: pass
        # gopast, line 54
        try:
            while True:
                try:
                    if not self.out_grouping(GermanStemmer.g_v, 97, 252):
                        raise lab3()
                    raise lab2()
                except lab3: pass
                if self.cursor >= self.limit:
github shibukawa / snowball_py / snowballstemmer / german_stemmer.py View on Github external
except lab7: pass
            elif among_var == 4:
                # (, line 119
                # delete, line 119
                if not self.slice_del():
                    return False

                # try, line 120
                v_10 = self.limit - self.cursor
                try:
                    # (, line 120
                    # [, line 121
                    self.ket = self.cursor
                    # substring, line 121
                    among_var = self.find_among_b(GermanStemmer.a_3, 2)
                    if among_var == 0:
                        self.cursor = self.limit - v_10
                        raise lab10()
                    # ], line 121
                    self.bra = self.cursor
                    # call R2, line 121
                    if not self.r_R2():
                        self.cursor = self.limit - v_10
                        raise lab10()
                    if among_var == 0:
                        self.cursor = self.limit - v_10
                        raise lab10()
                    elif among_var == 1:
                        # (, line 123
                        # delete, line 123
                        if not self.slice_del():
github shibukawa / snowball_py / snowballstemmer / __init__.py View on Github external
from .norwegian_stemmer import NorwegianStemmer
from .porter_stemmer import PorterStemmer
from .portuguese_stemmer import PortugueseStemmer
from .romanian_stemmer import RomanianStemmer
from .russian_stemmer import RussianStemmer
from .spanish_stemmer import SpanishStemmer
from .swedish_stemmer import SwedishStemmer
from .turkish_stemmer import TurkishStemmer

_languages = {
    'danish': DanishStemmer,
    'dutch': DutchStemmer,
    'english': EnglishStemmer,
    'finnish': FinnishStemmer,
    'french': FrenchStemmer,
    'german': GermanStemmer,
    'hungarian': HungarianStemmer,
    'italian': ItalianStemmer,
    'norwegian': NorwegianStemmer,
    'porter': PorterStemmer,
    'portuguese': PortugueseStemmer,
    'romanian': RomanianStemmer,
    'russian': RussianStemmer,
    'spanish': SpanishStemmer,
    'swedish': SwedishStemmer,
    'turkish': TurkishStemmer,
}

try:
    import Stemmer
    cext_available = True
except ImportError:
github shibukawa / snowball_py / snowballstemmer / german_stemmer.py View on Github external
self.cursor = self.limit - v_2
                        raise lab1()
                    # ], line 86
                    self.bra = self.cursor
                    # literal, line 86
                    if not self.eq_s_b(3, u"nis"):
                        self.cursor = self.limit - v_2
                        raise lab1()
                    # delete, line 86
                    if not self.slice_del():
                        return False

                except lab1: pass
            elif among_var == 3:
                # (, line 89
                if not self.in_grouping_b(GermanStemmer.g_s_ending, 98, 116):
                    raise lab0()
                # delete, line 89
                if not self.slice_del():
                    return False

        except lab0: pass
        self.cursor = self.limit - v_1
        # do, line 93
        v_3 = self.limit - self.cursor
        try:
            # (, line 93
            # [, line 94
            self.ket = self.cursor
            # substring, line 94
            among_var = self.find_among_b(GermanStemmer.a_2, 4)
            if among_var == 0:
github shibukawa / snowball_py / snowballstemmer / german_stemmer.py View on Github external
if not self.in_grouping_b(GermanStemmer.g_s_ending, 98, 116):
                    raise lab0()
                # delete, line 89
                if not self.slice_del():
                    return False

        except lab0: pass
        self.cursor = self.limit - v_1
        # do, line 93
        v_3 = self.limit - self.cursor
        try:
            # (, line 93
            # [, line 94
            self.ket = self.cursor
            # substring, line 94
            among_var = self.find_among_b(GermanStemmer.a_2, 4)
            if among_var == 0:
                raise lab2()
            # ], line 94
            self.bra = self.cursor
            # call R1, line 94
            if not self.r_R1():
                raise lab2()
            if among_var == 0:
                raise lab2()
            elif among_var == 1:
                # (, line 96
                # delete, line 96
                if not self.slice_del():
                    return False

            elif among_var == 2: