How to use the snowballstemmer.russian_stemmer.RussianStemmer 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 / russian_stemmer.py View on Github external
def r_perfective_gerund(self):
        # (, line 71
        # [, line 72
        self.ket = self.cursor
        # substring, line 72
        among_var = self.find_among_b(RussianStemmer.a_0, 9)
        if among_var == 0:
            return False
        # ], line 72
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 76
            # or, line 76
            try:
                v_1 = self.limit - self.cursor
                try:
                    # literal, line 76
                    if not self.eq_s_b(1, u"\u0430"):
                        raise lab1()
                    raise lab0()
github shibukawa / snowball_py / snowballstemmer / russian_stemmer.py View on Github external
def r_derivational(self):
        # (, line 175
        # [, line 176
        self.ket = self.cursor
        # substring, line 176
        among_var = self.find_among_b(RussianStemmer.a_6, 2)
        if among_var == 0:
            return False
        # ], line 176
        self.bra = self.cursor
        # call R2, line 176
        if not self.r_R2():
            return False
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 179
            # delete, line 179
            if not self.slice_del():
                return False

        return True
github shibukawa / snowball_py / snowballstemmer / russian_stemmer.py View on Github external
try:
                while True:
                    try:
                        if not self.in_grouping(RussianStemmer.g_v, 1072, 1103):
                            raise lab6()
                        raise lab5()
                    except lab6: pass
                    if self.cursor >= self.limit:
                        raise lab0()
                    self.cursor += 1
            except lab5: pass
            # gopast, line 63
            try:
                while True:
                    try:
                        if not self.out_grouping(RussianStemmer.g_v, 1072, 1103):
                            raise lab8()
                        raise lab7()
                    except lab8: pass
                    if self.cursor >= self.limit:
                        raise lab0()
                    self.cursor += 1
            except lab7: pass
            # setmark p2, line 63
            self.I_p2 = self.cursor
        except lab0: pass
        self.cursor = v_1
        return True
github shibukawa / snowball_py / snowballstemmer / russian_stemmer.py View on Github external
def r_verb(self):
        # (, line 136
        # [, line 137
        self.ket = self.cursor
        # substring, line 137
        among_var = self.find_among_b(RussianStemmer.a_4, 46)
        if among_var == 0:
            return False
        # ], line 137
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 143
            # or, line 143
            try:
                v_1 = self.limit - self.cursor
                try:
                    # literal, line 143
                    if not self.eq_s_b(1, u"\u0430"):
                        raise lab1()
                    raise lab0()
github shibukawa / snowball_py / snowballstemmer / russian_stemmer.py View on Github external
def r_adjectival(self):
        # (, line 101
        # call adjective, line 102
        if not self.r_adjective():
            return False
        # try, line 109
        v_1 = self.limit - self.cursor
        try:
            # (, line 109
            # [, line 110
            self.ket = self.cursor
            # substring, line 110
            among_var = self.find_among_b(RussianStemmer.a_2, 8)
            if among_var == 0:
                self.cursor = self.limit - v_1
                raise lab0()
            # ], line 110
            self.bra = self.cursor
            if among_var == 0:
                self.cursor = self.limit - v_1
                raise lab0()
            elif among_var == 1:
                # (, line 115
                # or, line 115
                try:
                    v_2 = self.limit - self.cursor
                    try:
                        # literal, line 115
                        if not self.eq_s_b(1, u"\u0430"):
github shibukawa / snowball_py / snowballstemmer / russian_stemmer.py View on Github external
def r_reflexive(self):
        # (, line 128
        # [, line 129
        self.ket = self.cursor
        # substring, line 129
        among_var = self.find_among_b(RussianStemmer.a_3, 2)
        if among_var == 0:
            return False
        # ], line 129
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 132
            # delete, line 132
            if not self.slice_del():
                return False

        return True
github shibukawa / snowball_py / snowballstemmer / russian_stemmer.py View on Github external
def r_tidy_up(self):
        # (, line 183
        # [, line 184
        self.ket = self.cursor
        # substring, line 184
        among_var = self.find_among_b(RussianStemmer.a_7, 4)
        if among_var == 0:
            return False
        # ], line 184
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 188
            # delete, line 188
            if not self.slice_del():
                return False

            # [, line 189
            self.ket = self.cursor
            # literal, line 189
            if not self.eq_s_b(1, u"\u043D"):
github shibukawa / snowball_py / snowballstemmer / __init__.py View on Github external
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:
    cext_available = False

def algorithms():
    if cext_available:
        return Stemmer.language()
    else:
        return list(_languages.keys())
github shibukawa / snowball_py / snowballstemmer / russian_stemmer.py View on Github external
def r_noun(self):
        # (, line 159
        # [, line 160
        self.ket = self.cursor
        # substring, line 160
        among_var = self.find_among_b(RussianStemmer.a_5, 36)
        if among_var == 0:
            return False
        # ], line 160
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 167
            # delete, line 167
            if not self.slice_del():
                return False

        return True
github shibukawa / snowball_py / snowballstemmer / russian_stemmer.py View on Github external
def r_adjective(self):
        # (, line 87
        # [, line 88
        self.ket = self.cursor
        # substring, line 88
        among_var = self.find_among_b(RussianStemmer.a_1, 26)
        if among_var == 0:
            return False
        # ], line 88
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 97
            # delete, line 97
            if not self.slice_del():
                return False

        return True