How to use the snowballstemmer.english_stemmer.EnglishStemmer 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
from .german_stemmer import GermanStemmer
from .hungarian_stemmer import HungarianStemmer
from .italian_stemmer import ItalianStemmer
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:
github shibukawa / snowball_py / snowballstemmer / english_stemmer.py View on Github external
def r_Step_4(self):
        # (, line 140
        # [, line 141
        self.ket = self.cursor
        # substring, line 141
        among_var = self.find_among_b(EnglishStemmer.a_7, 18)
        if among_var == 0:
            return False
        # ], line 141
        self.bra = self.cursor
        # call R2, line 141
        if not self.r_R2():
            return False
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 144
            # delete, line 144
            if not self.slice_del():
                return False

        elif among_var == 2:
github shibukawa / snowball_py / snowballstemmer / english_stemmer.py View on Github external
def r_Step_3(self):
        # (, line 126
        # [, line 127
        self.ket = self.cursor
        # substring, line 127
        among_var = self.find_among_b(EnglishStemmer.a_6, 9)
        if among_var == 0:
            return False
        # ], line 127
        self.bra = self.cursor
        # call R1, line 127
        if not self.r_R1():
            return False
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 128
            # <-, line 128
            if not self.slice_from(u"tion"):
                return False
        elif among_var == 2:
            # (, line 129
github shibukawa / snowball_py / snowballstemmer / english_stemmer.py View on Github external
def equals(self, o):
        return isinstance(o, EnglishStemmer)
github shibukawa / snowball_py / snowballstemmer / english_stemmer.py View on Github external
# <-, line 119
            if not self.slice_from(u"og"):
                return False
        elif among_var == 14:
            # (, line 120
            # <-, line 120
            if not self.slice_from(u"ful"):
                return False
        elif among_var == 15:
            # (, line 121
            # <-, line 121
            if not self.slice_from(u"less"):
                return False
        elif among_var == 16:
            # (, line 122
            if not self.in_grouping_b(EnglishStemmer.g_valid_LI, 99, 116):
                return False
            # delete, line 122
            if not self.slice_del():
                return False

        return True
github shibukawa / snowball_py / snowballstemmer / english_stemmer.py View on Github external
def r_Step_1a(self):
        # (, line 58
        # try, line 59
        v_1 = self.limit - self.cursor
        try:
            # (, line 59
            # [, line 60
            self.ket = self.cursor
            # substring, line 60
            among_var = self.find_among_b(EnglishStemmer.a_1, 3)
            if among_var == 0:
                self.cursor = self.limit - v_1
                raise lab0()
            # ], line 60
            self.bra = self.cursor
            if among_var == 0:
                self.cursor = self.limit - v_1
                raise lab0()
            elif among_var == 1:
                # (, line 62
                # delete, line 62
                if not self.slice_del():
                    return False

        except lab0: pass
        # [, line 65
github shibukawa / snowball_py / snowballstemmer / english_stemmer.py View on Github external
# ], line 60
            self.bra = self.cursor
            if among_var == 0:
                self.cursor = self.limit - v_1
                raise lab0()
            elif among_var == 1:
                # (, line 62
                # delete, line 62
                if not self.slice_del():
                    return False

        except lab0: pass
        # [, line 65
        self.ket = self.cursor
        # substring, line 65
        among_var = self.find_among_b(EnglishStemmer.a_2, 6)
        if among_var == 0:
            return False
        # ], line 65
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 66
            # <-, line 66
            if not self.slice_from(u"ss"):
                return False
        elif among_var == 2:
            # (, line 68
            # or, line 68
            try:
                v_2 = self.limit - self.cursor
github shibukawa / snowball_py / snowballstemmer / english_stemmer.py View on Github external
def r_Step_5(self):
        # (, line 149
        # [, line 150
        self.ket = self.cursor
        # substring, line 150
        among_var = self.find_among_b(EnglishStemmer.a_8, 2)
        if among_var == 0:
            return False
        # ], line 150
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 151
            # or, line 151
            try:
                v_1 = self.limit - self.cursor
                try:
                    # call R2, line 151
                    if not self.r_R2():
                        raise lab1()
                    raise lab0()
github shibukawa / snowball_py / snowballstemmer / english_stemmer.py View on Github external
def r_shortv(self):
        # (, line 49
        # or, line 51
        try:
            v_1 = self.limit - self.cursor
            try:
                # (, line 50
                if not self.out_grouping_b(EnglishStemmer.g_v_WXY, 89, 121):
                    raise lab1()
                if not self.in_grouping_b(EnglishStemmer.g_v, 97, 121):
                    raise lab1()
                if not self.out_grouping_b(EnglishStemmer.g_v, 97, 121):
                    raise lab1()
                raise lab0()
            except lab1: pass
            self.cursor = self.limit - v_1
            # (, line 52
            if not self.out_grouping_b(EnglishStemmer.g_v, 97, 121):
                return False
            if not self.in_grouping_b(EnglishStemmer.g_v, 97, 121):
                return False
            # atlimit, line 52
            if self.cursor > self.limit_backward:
                return False
github shibukawa / snowball_py / snowballstemmer / english_stemmer.py View on Github external
def r_Step_1b(self):
        # (, line 74
        # [, line 75
        self.ket = self.cursor
        # substring, line 75
        among_var = self.find_among_b(EnglishStemmer.a_4, 6)
        if among_var == 0:
            return False
        # ], line 75
        self.bra = self.cursor
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 77
            # call R1, line 77
            if not self.r_R1():
                return False
            # <-, line 77
            if not self.slice_from(u"ee"):
                return False
        elif among_var == 2:
            # (, line 79