How to use the snowballstemmer.spanish_stemmer.SpanishStemmer 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 / __init__.py View on Github external
_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:
    cext_available = False

def algorithms():
    if cext_available:
        return Stemmer.language()
    else:
        return list(_languages.keys())
github shibukawa / snowball_py / snowballstemmer / spanish_stemmer.py View on Github external
# (, line 134
            # call R2, line 135
            if not self.r_R2():
                return False
            # delete, line 135
            if not self.slice_del():
                return False

            # try, line 136
            v_3 = self.limit - self.cursor
            try:
                # (, line 136
                # [, line 137
                self.ket = self.cursor
                # substring, line 137
                among_var = self.find_among_b(SpanishStemmer.a_4, 3)
                if among_var == 0:
                    self.cursor = self.limit - v_3
                    raise lab2()
                # ], line 137
                self.bra = self.cursor
                if among_var == 0:
                    self.cursor = self.limit - v_3
                    raise lab2()
                elif among_var == 1:
                    # (, line 140
                    # call R2, line 140
                    if not self.r_R2():
                        self.cursor = self.limit - v_3
                        raise lab2()
                    # delete, line 140
                    if not self.slice_del():
github shibukawa / snowball_py / snowballstemmer / spanish_stemmer.py View on Github external
except lab6: pass
                                    if self.cursor >= self.limit:
                                        raise lab4()
                                    self.cursor += 1
                            except lab5: pass
                            raise lab3()
                        except lab4: pass
                        self.cursor = v_3
                        # (, line 38
                        if not self.in_grouping(SpanishStemmer.g_v, 97, 252):
                            raise lab2()
                        # gopast, line 38
                        try:
                            while True:
                                try:
                                    if not self.out_grouping(SpanishStemmer.g_v, 97, 252):
                                        raise lab8()
                                    raise lab7()
                                except lab8: pass
                                if self.cursor >= self.limit:
                                    raise lab2()
                                self.cursor += 1
                        except lab7: pass
                    except lab3: pass
                    raise lab1()
                except lab2: pass
                self.cursor = v_2
                # (, line 40
                if not self.out_grouping(SpanishStemmer.g_v, 97, 252):
                    raise lab0()
                # or, line 40
                try:
github shibukawa / snowball_py / snowballstemmer / spanish_stemmer.py View on Github external
def r_attached_pronoun(self):
        # (, line 67
        # [, line 68
        self.ket = self.cursor
        # substring, line 68
        if self.find_among_b(SpanishStemmer.a_1, 13) == 0:
            return False
        # ], line 68
        self.bra = self.cursor
        # substring, line 72
        among_var = self.find_among_b(SpanishStemmer.a_2, 11)
        if among_var == 0:
            return False
        # call RV, line 72
        if not self.r_RV():
            return False
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 73
            # ], line 73
            self.bra = self.cursor
github shibukawa / snowball_py / snowballstemmer / spanish_stemmer.py View on Github external
# (, line 122
            # call R1, line 123
            if not self.r_R1():
                return False
            # delete, line 123
            if not self.slice_del():
                return False

            # try, line 124
            v_2 = self.limit - self.cursor
            try:
                # (, line 124
                # [, line 125
                self.ket = self.cursor
                # substring, line 125
                among_var = self.find_among_b(SpanishStemmer.a_3, 4)
                if among_var == 0:
                    self.cursor = self.limit - v_2
                    raise lab1()
                # ], line 125
                self.bra = self.cursor
                # call R2, line 125
                if not self.r_R2():
                    self.cursor = self.limit - v_2
                    raise lab1()
                # delete, line 125
                if not self.slice_del():
                    return False

                if among_var == 0:
                    self.cursor = self.limit - v_2
                    raise lab1()
github shibukawa / snowball_py / snowballstemmer / spanish_stemmer.py View on Github external
def r_residual_suffix(self):
        # (, line 204
        # [, line 205
        self.ket = self.cursor
        # substring, line 205
        among_var = self.find_among_b(SpanishStemmer.a_9, 8)
        if among_var == 0:
            return False
        # ], line 205
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 208
            # call RV, line 208
            if not self.r_RV():
                return False
            # delete, line 208
            if not self.slice_del():
                return False

        elif among_var == 2:
github shibukawa / snowball_py / snowballstemmer / spanish_stemmer.py View on Github external
def equals(self, o):
        return isinstance(o, SpanishStemmer)
github shibukawa / snowball_py / snowballstemmer / spanish_stemmer.py View on Github external
def r_postlude(self):
        # repeat, line 49
        try:
            while True:
                try:
                    v_1 = self.cursor
                    try:
                        # (, line 49
                        # [, line 50
                        self.bra = self.cursor
                        # substring, line 50
                        among_var = self.find_among(SpanishStemmer.a_0, 6)
                        if among_var == 0:
                            raise lab2()
                        # ], line 50
                        self.ket = self.cursor
                        if among_var == 0:
                            raise lab2()
                        elif among_var == 1:
                            # (, line 51
                            # <-, line 51
                            if not self.slice_from(u"a"):
                                return False
                        elif among_var == 2:
                            # (, line 52
                            # <-, line 52
                            if not self.slice_from(u"e"):
                                return False
github shibukawa / snowball_py / snowballstemmer / spanish_stemmer.py View on Github external
def r_standard_suffix(self):
        # (, line 86
        # [, line 87
        self.ket = self.cursor
        # substring, line 87
        among_var = self.find_among_b(SpanishStemmer.a_6, 46)
        if among_var == 0:
            return False
        # ], line 87
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 98
            # call R2, line 99
            if not self.r_R2():
                return False
            # delete, line 99
            if not self.slice_del():
                return False

        elif among_var == 2:
github shibukawa / snowball_py / snowballstemmer / spanish_stemmer.py View on Github external
def r_verb_suffix(self):
        # (, line 175
        # setlimit, line 176
        v_1 = self.limit - self.cursor
        # tomark, line 176
        if self.cursor < self.I_pV:
            return False
        self.cursor = self.I_pV
        v_2 = self.limit_backward
        self.limit_backward = self.cursor
        self.cursor = self.limit - v_1
        # (, line 176
        # [, line 176
        self.ket = self.cursor
        # substring, line 176
        among_var = self.find_among_b(SpanishStemmer.a_8, 96)
        if among_var == 0:
            self.limit_backward = v_2
            return False
        # ], line 176
        self.bra = self.cursor
        self.limit_backward = v_2
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 179
            # try, line 179
            v_3 = self.limit - self.cursor
            try:
                # (, line 179
                # literal, line 179
                if not self.eq_s_b(1, u"u"):