How to use the snowballstemmer.finnish_stemmer.FinnishStemmer 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 / finnish_stemmer.py View on Github external
def r_VI(self):
        # (, line 93
        # literal, line 93
        if not self.eq_s_b(1, u"i"):
            return False
        if not self.in_grouping_b(FinnishStemmer.g_V2, 97, 246):
            return False
        return True
github shibukawa / snowball_py / snowballstemmer / finnish_stemmer.py View on Github external
def r_case_ending(self):
        # (, line 95
        # setlimit, line 96
        v_1 = self.limit - self.cursor
        # tomark, line 96
        if self.cursor < self.I_p1:
            return False
        self.cursor = self.I_p1
        v_2 = self.limit_backward
        self.limit_backward = self.cursor
        self.cursor = self.limit - v_1
        # (, line 96
        # [, line 96
        self.ket = self.cursor
        # substring, line 96
        among_var = self.find_among_b(FinnishStemmer.a_6, 30)
        if among_var == 0:
            self.limit_backward = v_2
            return False
        # ], line 96
        self.bra = self.cursor
        self.limit_backward = v_2
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 98
            # literal, line 98
            if not self.eq_s_b(1, u"a"):
                return False
        elif among_var == 2:
            # (, line 99
            # literal, line 99
github shibukawa / snowball_py / snowballstemmer / finnish_stemmer.py View on Github external
def r_particle_etc(self):
        # (, line 54
        # setlimit, line 55
        v_1 = self.limit - self.cursor
        # tomark, line 55
        if self.cursor < self.I_p1:
            return False
        self.cursor = self.I_p1
        v_2 = self.limit_backward
        self.limit_backward = self.cursor
        self.cursor = self.limit - v_1
        # (, line 55
        # [, line 55
        self.ket = self.cursor
        # substring, line 55
        among_var = self.find_among_b(FinnishStemmer.a_0, 10)
        if among_var == 0:
            self.limit_backward = v_2
            return False
        # ], line 55
        self.bra = self.cursor
        self.limit_backward = v_2
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 62
            if not self.in_grouping_b(FinnishStemmer.g_particle_end, 97, 246):
                return False
        elif among_var == 2:
            # (, line 64
            # call R2, line 64
            if not self.r_R2():
github shibukawa / snowball_py / snowballstemmer / finnish_stemmer.py View on Github external
def r_LONG(self):
        # among, line 91
        if self.find_among_b(FinnishStemmer.a_5, 7) == 0:
            return False
        return True
github shibukawa / snowball_py / snowballstemmer / finnish_stemmer.py View on Github external
self.cursor -= 1
            # ], line 174
            self.bra = self.cursor
            # delete, line 174
            if not self.slice_del():
                return False

        except lab0: pass
        self.cursor = self.limit - v_3
        # do, line 175
        v_5 = self.limit - self.cursor
        try:
            # (, line 175
            # [, line 175
            self.ket = self.cursor
            if not self.in_grouping_b(FinnishStemmer.g_AEI, 97, 228):
                raise lab1()
            # ], line 175
            self.bra = self.cursor
            if not self.out_grouping_b(FinnishStemmer.g_V1, 97, 246):
                raise lab1()
            # delete, line 175
            if not self.slice_del():
                return False

        except lab1: pass
        self.cursor = self.limit - v_5
        # do, line 176
        v_6 = self.limit - self.cursor
        try:
            # (, line 176
            # [, line 176
github shibukawa / snowball_py / snowballstemmer / finnish_stemmer.py View on Github external
def equals(self, o):
        return isinstance(o, FinnishStemmer)
github shibukawa / snowball_py / snowballstemmer / finnish_stemmer.py View on Github external
if not self.slice_del():
                return False

        elif among_var == 5:
            # (, line 83
            # among, line 83
            if self.find_among_b(FinnishStemmer.a_2, 6) == 0:
                return False
            # delete, line 84
            if not self.slice_del():
                return False

        elif among_var == 6:
            # (, line 86
            # among, line 86
            if self.find_among_b(FinnishStemmer.a_3, 2) == 0:
                return False
            # delete, line 86
            if not self.slice_del():
                return False

        return True
github shibukawa / snowball_py / snowballstemmer / finnish_stemmer.py View on Github external
def r_possessive(self):
        # (, line 68
        # setlimit, line 69
        v_1 = self.limit - self.cursor
        # tomark, line 69
        if self.cursor < self.I_p1:
            return False
        self.cursor = self.I_p1
        v_2 = self.limit_backward
        self.limit_backward = self.cursor
        self.cursor = self.limit - v_1
        # (, line 69
        # [, line 69
        self.ket = self.cursor
        # substring, line 69
        among_var = self.find_among_b(FinnishStemmer.a_4, 9)
        if among_var == 0:
            self.limit_backward = v_2
            return False
        # ], line 69
        self.bra = self.cursor
        self.limit_backward = v_2
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 72
            # not, line 72
            v_3 = self.limit - self.cursor
            try:
                # literal, line 72
                if not self.eq_s_b(1, u"k"):
                    raise lab0()
github shibukawa / snowball_py / snowballstemmer / finnish_stemmer.py View on Github external
# (, line 55
        # [, line 55
        self.ket = self.cursor
        # substring, line 55
        among_var = self.find_among_b(FinnishStemmer.a_0, 10)
        if among_var == 0:
            self.limit_backward = v_2
            return False
        # ], line 55
        self.bra = self.cursor
        self.limit_backward = v_2
        if among_var == 0:
            return False
        elif among_var == 1:
            # (, line 62
            if not self.in_grouping_b(FinnishStemmer.g_particle_end, 97, 246):
                return False
        elif among_var == 2:
            # (, line 64
            # call R2, line 64
            if not self.r_R2():
                return False
        # delete, line 66
        if not self.slice_del():
            return False

        return True
github shibukawa / snowball_py / snowballstemmer / finnish_stemmer.py View on Github external
def r_i_plural(self):
        # (, line 153
        # setlimit, line 154
        v_1 = self.limit - self.cursor
        # tomark, line 154
        if self.cursor < self.I_p1:
            return False
        self.cursor = self.I_p1
        v_2 = self.limit_backward
        self.limit_backward = self.cursor
        self.cursor = self.limit - v_1
        # (, line 154
        # [, line 154
        self.ket = self.cursor
        # substring, line 154
        if self.find_among_b(FinnishStemmer.a_8, 2) == 0:
            self.limit_backward = v_2
            return False
        # ], line 154
        self.bra = self.cursor
        self.limit_backward = v_2
        # delete, line 158
        if not self.slice_del():
            return False

        return True