# Generated by Snowball 2.0.0 - https://snowballstem.org/

from .basestemmer import BaseStemmer
from .among import Among


class FrenchStemmer(BaseStemmer):
    '''
    This class implements the stemming algorithm defined by a snowball script.
    Generated by Snowball 2.0.0 - https://snowballstem.org/
    '''

    a_0 = [
        Among(u"col", -1, -1),
        Among(u"par", -1, -1),
        Among(u"tap", -1, -1)
    ]

    a_1 = [
        Among(u"", -1, 7),
        Among(u"H", 0, 6),
        Among(u"He", 1, 4),
        Among(u"Hi", 1, 5),
        Among(u"I", 0, 1),
        Among(u"U", 0, 2),
        Among(u"Y", 0, 3)
    ]

    a_2 = [
        Among(u"iqU", -1, 3),
        Among(u"abl", -1, 3),
        Among(u"I\u00E8r", -1, 4),
        Among(u"i\u00E8r", -1, 4),
        Among(u"eus", -1, 2),
        Among(u"iv", -1, 1)
    ]

    a_3 = [
        Among(u"ic", -1, 2),
        Among(u"abil", -1, 1),
        Among(u"iv", -1, 3)
    ]

    a_4 = [
        Among(u"iqUe", -1, 1),
        Among(u"atrice", -1, 2),
        Among(u"ance", -1, 1),
        Among(u"ence", -1, 5),
        Among(u"logie", -1, 3),
        Among(u"able", -1, 1),
        Among(u"isme", -1, 1),
        Among(u"euse", -1, 11),
        Among(u"iste", -1, 1),
        Among(u"ive", -1, 8),
        Among(u"if", -1, 8),
        Among(u"usion", -1, 4),
        Among(u"ation", -1, 2),
        Among(u"ution", -1, 4),
        Among(u"ateur", -1, 2),
        Among(u"iqUes", -1, 1),
        Among(u"atrices", -1, 2),
        Among(u"ances", -1, 1),
        Among(u"ences", -1, 5),
        Among(u"logies", -1, 3),
        Among(u"ables", -1, 1),
        Among(u"ismes", -1, 1),
        Among(u"euses", -1, 11),
        Among(u"istes", -1, 1),
        Among(u"ives", -1, 8),
        Among(u"ifs", -1, 8),
        Among(u"usions", -1, 4),
        Among(u"ations", -1, 2),
        Among(u"utions", -1, 4),
        Among(u"ateurs", -1, 2),
        Among(u"ments", -1, 15),
        Among(u"ements", 30, 6),
        Among(u"issements", 31, 12),
        Among(u"it\u00E9s", -1, 7),
        Among(u"ment", -1, 15),
        Among(u"ement", 34, 6),
        Among(u"issement", 35, 12),
        Among(u"amment", 34, 13),
        Among(u"emment", 34, 14),
        Among(u"aux", -1, 10),
        Among(u"eaux", 39, 9),
        Among(u"eux", -1, 1),
        Among(u"it\u00E9", -1, 7)
    ]

    a_5 = [
        Among(u"ira", -1, 1),
        Among(u"ie", -1, 1),
        Among(u"isse", -1, 1),
        Among(u"issante", -1, 1),
        Among(u"i", -1, 1),
        Among(u"irai", 4, 1),
        Among(u"ir", -1, 1),
        Among(u"iras", -1, 1),
        Among(u"ies", -1, 1),
        Among(u"\u00EEmes", -1, 1),
        Among(u"isses", -1, 1),
        Among(u"issantes", -1, 1),
        Among(u"\u00EEtes", -1, 1),
        Among(u"is", -1, 1),
        Among(u"irais", 13, 1),
        Among(u"issais", 13, 1),
        Among(u"irions", -1, 1),
        Among(u"issions", -1, 1),
        Among(u"irons", -1, 1),
        Among(u"issons", -1, 1),
        Among(u"issants", -1, 1),
        Among(u"it", -1, 1),
        Among(u"irait", 21, 1),
        Among(u"issait", 21, 1),
        Among(u"issant", -1, 1),
        Among(u"iraIent", -1, 1),
        Among(u"issaIent", -1, 1),
        Among(u"irent", -1, 1),
        Among(u"issent", -1, 1),
        Among(u"iront", -1, 1),
        Among(u"\u00EEt", -1, 1),
        Among(u"iriez", -1, 1),
        Among(u"issiez", -1, 1),
        Among(u"irez", -1, 1),
        Among(u"issez", -1, 1)
    ]

    a_6 = [
        Among(u"a", -1, 3),
        Among(u"era", 0, 2),
        Among(u"asse", -1, 3),
        Among(u"ante", -1, 3),
        Among(u"\u00E9e", -1, 2),
        Among(u"ai", -1, 3),
        Among(u"erai", 5, 2),
        Among(u"er", -1, 2),
        Among(u"as", -1, 3),
        Among(u"eras", 8, 2),
        Among(u"\u00E2mes", -1, 3),
        Among(u"asses", -1, 3),
        Among(u"antes", -1, 3),
        Among(u"\u00E2tes", -1, 3),
        Among(u"\u00E9es", -1, 2),
        Among(u"ais", -1, 3),
        Among(u"erais", 15, 2),
        Among(u"ions", -1, 1),
        Among(u"erions", 17, 2),
        Among(u"assions", 17, 3),
        Among(u"erons", -1, 2),
        Among(u"ants", -1, 3),
        Among(u"\u00E9s", -1, 2),
        Among(u"ait", -1, 3),
        Among(u"erait", 23, 2),
        Among(u"ant", -1, 3),
        Among(u"aIent", -1, 3),
        Among(u"eraIent", 26, 2),
        Among(u"\u00E8rent", -1, 2),
        Among(u"assent", -1, 3),
        Among(u"eront", -1, 2),
        Among(u"\u00E2t", -1, 3),
        Among(u"ez", -1, 2),
        Among(u"iez", 32, 2),
        Among(u"eriez", 33, 2),
        Among(u"assiez", 33, 3),
        Among(u"erez", 32, 2),
        Among(u"\u00E9", -1, 2)
    ]

    a_7 = [
        Among(u"e", -1, 3),
        Among(u"I\u00E8re", 0, 2),
        Among(u"i\u00E8re", 0, 2),
        Among(u"ion", -1, 1),
        Among(u"Ier", -1, 2),
        Among(u"ier", -1, 2)
    ]

    a_8 = [
        Among(u"ell", -1, -1),
        Among(u"eill", -1, -1),
        Among(u"enn", -1, -1),
        Among(u"onn", -1, -1),
        Among(u"ett", -1, -1)
    ]

    g_v = [17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 130, 103, 8, 5]

    g_keep_with_s = [1, 65, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128]

    I_p2 = 0
    I_p1 = 0
    I_pV = 0

    def __r_prelude(self):
        # repeat, line 38
        while True:
            v_1 = self.cursor
            try:
                # goto, line 38
                try:
                    while True:
                        v_2 = self.cursor
                        try:
                            # (, line 38
                            # or, line 44
                            try:
                                v_3 = self.cursor
                                try:
                                    # (, line 40
                                    if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
                                        raise lab4()
                                    # [, line 40
                                    self.bra = self.cursor
                                    # or, line 40
                                    try:
                                        v_4 = self.cursor
                                        try:
                                            # (, line 40
                                            # literal, line 40
                                            if not self.eq_s(u"u"):
                                                raise lab6()
                                            # ], line 40
                                            self.ket = self.cursor
                                            if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
                                                raise lab6()
                                            # <-, line 40
                                            if not self.slice_from(u"U"):
                                                return False
                                            raise lab5()
                                        except lab6: pass
                                        self.cursor = v_4
                                        try:
                                            # (, line 41
                                            # literal, line 41
                                            if not self.eq_s(u"i"):
                                                raise lab7()
                                            # ], line 41
                                            self.ket = self.cursor
                                            if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
                                                raise lab7()
                                            # <-, line 41
                                            if not self.slice_from(u"I"):
                                                return False
                                            raise lab5()
                                        except lab7: pass
                                        self.cursor = v_4
                                        # (, line 42
                                        # literal, line 42
                                        if not self.eq_s(u"y"):
                                            raise lab4()
                                        # ], line 42
                                        self.ket = self.cursor
                                        # <-, line 42
                                        if not self.slice_from(u"Y"):
                                            return False
                                    except lab5: pass
                                    raise lab3()
                                except lab4: pass
                                self.cursor = v_3
                                try:
                                    # (, line 45
                                    # [, line 45
                                    self.bra = self.cursor
                                    # literal, line 45
                                    if not self.eq_s(u"\u00EB"):
                                        raise lab8()
                                    # ], line 45
                                    self.ket = self.cursor
                                    # <-, line 45
                                    if not self.slice_from(u"He"):
                                        return False
                                    raise lab3()
                                except lab8: pass
                                self.cursor = v_3
                                try:
                                    # (, line 47
                                    # [, line 47
                                    self.bra = self.cursor
                                    # literal, line 47
                                    if not self.eq_s(u"\u00EF"):
                                        raise lab9()
                                    # ], line 47
                                    self.ket = self.cursor
                                    # <-, line 47
                                    if not self.slice_from(u"Hi"):
                                        return False
                                    raise lab3()
                                except lab9: pass
                                self.cursor = v_3
                                try:
                                    # (, line 49
                                    # [, line 49
                                    self.bra = self.cursor
                                    # literal, line 49
                                    if not self.eq_s(u"y"):
                                        raise lab10()
                                    # ], line 49
                                    self.ket = self.cursor
                                    if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
                                        raise lab10()
                                    # <-, line 49
                                    if not self.slice_from(u"Y"):
                                        return False
                                    raise lab3()
                                except lab10: pass
                                self.cursor = v_3
                                # (, line 51
                                # literal, line 51
                                if not self.eq_s(u"q"):
                                    raise lab2()
                                # [, line 51
                                self.bra = self.cursor
                                # literal, line 51
                                if not self.eq_s(u"u"):
                                    raise lab2()
                                # ], line 51
                                self.ket = self.cursor
                                # <-, line 51
                                if not self.slice_from(u"U"):
                                    return False
                            except lab3: pass
                            self.cursor = v_2
                            raise lab1()
                        except lab2: pass
                        self.cursor = v_2
                        if self.cursor >= self.limit:
                            raise lab0()
                        self.cursor += 1
                except lab1: pass
                continue
            except lab0: pass
            self.cursor = v_1
            break
        return True

    def __r_mark_regions(self):
        # (, line 54
        self.I_pV = self.limit
        self.I_p1 = self.limit
        self.I_p2 = self.limit
        # do, line 60
        v_1 = self.cursor
        try:
            # (, line 60
            # or, line 62
            try:
                v_2 = self.cursor
                try:
                    # (, line 61
                    if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
                        raise lab2()
                    if not self.in_grouping(FrenchStemmer.g_v, 97, 251):
                        raise lab2()
                    # next, line 61
                    if self.cursor >= self.limit:
                        raise lab2()
                    self.cursor += 1
                    raise lab1()
                except lab2: pass
                self.cursor = v_2
                try:
                    # among, line 63
                    if self.find_among(FrenchStemmer.a_0) == 0:
                        raise lab3()
                    raise lab1()
                except lab3: pass
                self.cursor = v_2
                # (, line 70
                # next, line 70
                if self.cursor >= self.limit:
                    raise lab0()
                self.cursor += 1
                # gopast grouping v, line 70
                if not self.go_out_grouping(FrenchStemmer.g_v, 97, 251):
                    raise lab0()
                self.cursor += 1
            except lab1: pass
            # setmark pV, line 71
            self.I_pV = self.cursor
        except lab0: pass
        self.cursor = v_1
        # do, line 73
        v_3 = self.cursor
        try:
            # (, line 73
            # gopast grouping v, line 74
            if not self.go_out_grouping(FrenchStemmer.g_v, 97, 251):
                raise lab4()
            self.cursor += 1
            # gopast non v, line 74
            if not self.go_in_grouping(FrenchStemmer.g_v, 97, 251):
                raise lab4()
            self.cursor += 1
            # setmark p1, line 74
            self.I_p1 = self.cursor
            # gopast grouping v, line 75
            if not self.go_out_grouping(FrenchStemmer.g_v, 97, 251):
                raise lab4()
            self.cursor += 1
            # gopast non v, line 75
            if not self.go_in_grouping(FrenchStemmer.g_v, 97, 251):
                raise lab4()
            self.cursor += 1
            # setmark p2, line 75
            self.I_p2 = self.cursor
        except lab4: pass
        self.cursor = v_3
        return True

    def __r_postlude(self):
        # repeat, line 79
        while True:
            v_1 = self.cursor
            try:
                # (, line 79
                # [, line 81
                self.bra = self.cursor
                # substring, line 81
                among_var = self.find_among(FrenchStemmer.a_1)
                if among_var == 0:
                    raise lab0()
                # ], line 81
                self.ket = self.cursor
                if among_var == 1:
                    # (, line 82
                    # <-, line 82
                    if not self.slice_from(u"i"):
                        return False
                elif among_var == 2:
                    # (, line 83
                    # <-, line 83
                    if not self.slice_from(u"u"):
                        return False
                elif among_var == 3:
                    # (, line 84
                    # <-, line 84
                    if not self.slice_from(u"y"):
                        return False
                elif among_var == 4:
                    # (, line 85
                    # <-, line 85
                    if not self.slice_from(u"\u00EB"):
                        return False
                elif among_var == 5:
                    # (, line 86
                    # <-, line 86
                    if not self.slice_from(u"\u00EF"):
                        return False
                elif among_var == 6:
                    # (, line 87
                    # delete, line 87
                    if not self.slice_del():
                        return False

                elif among_var == 7:
                    # (, line 88
                    # next, line 88
                    if self.cursor >= self.limit:
                        raise lab0()
                    self.cursor += 1
                continue
            except lab0: pass
            self.cursor = v_1
            break
        return True

    def __r_RV(self):
        if not self.I_pV <= self.cursor:
            return False
        return True

    def __r_R1(self):
        if not self.I_p1 <= self.cursor:
            return False
        return True

    def __r_R2(self):
        if not self.I_p2 <= self.cursor:
            return False
        return True

    def __r_standard_suffix(self):
        # (, line 98
        # [, line 99
        self.ket = self.cursor
        # substring, line 99
        among_var = self.find_among_b(FrenchStemmer.a_4)
        if among_var == 0:
            return False
        # ], line 99
        self.bra = self.cursor
        if among_var == 1:
            # (, line 103
            # call R2, line 103
            if not self.__r_R2():
                return False
            # delete, line 103
            if not self.slice_del():
                return False

        elif among_var == 2:
            # (, line 106
            # call R2, line 106
            if not self.__r_R2():
                return False
            # delete, line 106
            if not self.slice_del():
                return False

            # try, line 107
            v_1 = self.limit - self.cursor
            try:
                # (, line 107
                # [, line 107
                self.ket = self.cursor
                # literal, line 107
                if not self.eq_s_b(u"ic"):
                    self.cursor = self.limit - v_1
                    raise lab0()
                # ], line 107
                self.bra = self.cursor
                # or, line 107
                try:
                    v_2 = self.limit - self.cursor
                    try:
                        # (, line 107
                        # call R2, line 107
                        if not self.__r_R2():
                            raise lab2()
                        # delete, line 107
                        if not self.slice_del():
                            return False

                        raise lab1()
                    except lab2: pass
                    self.cursor = self.limit - v_2
                    # <-, line 107
                    if not self.slice_from(u"iqU"):
                        return False
                except lab1: pass
            except lab0: pass
        elif among_var == 3:
            # (, line 111
            # call R2, line 111
            if not self.__r_R2():
                return False
            # <-, line 111
            if not self.slice_from(u"log"):
                return False
        elif among_var == 4:
            # (, line 114
            # call R2, line 114
            if not self.__r_R2():
                return False
            # <-, line 114
            if not self.slice_from(u"u"):
                return False
        elif among_var == 5:
            # (, line 117
            # call R2, line 117
            if not self.__r_R2():
                return False
            # <-, line 117
            if not self.slice_from(u"ent"):
                return False
        elif among_var == 6:
            # (, line 120
            # call RV, line 121
            if not self.__r_RV():
                return False
            # delete, line 121
            if not self.slice_del():
                return False

            # try, line 122
            v_3 = self.limit - self.cursor
            try:
                # (, line 122
                # [, line 123
                self.ket = self.cursor
                # substring, line 123
                among_var = self.find_among_b(FrenchStemmer.a_2)
                if among_var == 0:
                    self.cursor = self.limit - v_3
                    raise lab3()
                # ], line 123
                self.bra = self.cursor
                if among_var == 1:
                    # (, line 124
                    # call R2, line 124
                    if not self.__r_R2():
                        self.cursor = self.limit - v_3
                        raise lab3()
                    # delete, line 124
                    if not self.slice_del():
                        return False

                    # [, line 124
                    self.ket = self.cursor
                    # literal, line 124
                    if not self.eq_s_b(u"at"):
                        self.cursor = self.limit - v_3
                        raise lab3()
                    # ], line 124
                    self.bra = self.cursor
                    # call R2, line 124
                    if not self.__r_R2():
                        self.cursor = self.limit - v_3
                        raise lab3()
                    # delete, line 124
                    if not self.slice_del():
                        return False

                elif among_var == 2:
                    # (, line 125
                    # or, line 125
                    try:
                        v_4 = self.limit - self.cursor
                        try:
                            # (, line 125
                            # call R2, line 125
                            if not self.__r_R2():
                                raise lab5()
                            # delete, line 125
                            if not self.slice_del():
                                return False

                            raise lab4()
                        except lab5: pass
                        self.cursor = self.limit - v_4
                        # (, line 125
                        # call R1, line 125
                        if not self.__r_R1():
                            self.cursor = self.limit - v_3
                            raise lab3()
                        # <-, line 125
                        if not self.slice_from(u"eux"):
                            return False
                    except lab4: pass
                elif among_var == 3:
                    # (, line 127
                    # call R2, line 127
                    if not self.__r_R2():
                        self.cursor = self.limit - v_3
                        raise lab3()
                    # delete, line 127
                    if not self.slice_del():
                        return False

                elif among_var == 4:
                    # (, line 129
                    # call RV, line 129
                    if not self.__r_RV():
                        self.cursor = self.limit - v_3
                        raise lab3()
                    # <-, line 129
                    if not self.slice_from(u"i"):
                        return False
            except lab3: pass
        elif among_var == 7:
            # (, line 135
            # call R2, line 136
            if not self.__r_R2():
                return False
            # delete, line 136
            if not self.slice_del():
                return False

            # try, line 137
            v_5 = self.limit - self.cursor
            try:
                # (, line 137
                # [, line 138
                self.ket = self.cursor
                # substring, line 138
                among_var = self.find_among_b(FrenchStemmer.a_3)
                if among_var == 0:
                    self.cursor = self.limit - v_5
                    raise lab6()
                # ], line 138
                self.bra = self.cursor
                if among_var == 1:
                    # (, line 139
                    # or, line 139
                    try:
                        v_6 = self.limit - self.cursor
                        try:
                            # (, line 139
                            # call R2, line 139
                            if not self.__r_R2():
                                raise lab8()
                            # delete, line 139
                            if not self.slice_del():
                                return False

                            raise lab7()
                        except lab8: pass
                        self.cursor = self.limit - v_6
                        # <-, line 139
                        if not self.slice_from(u"abl"):
                            return False
                    except lab7: pass
                elif among_var == 2:
                    # (, line 140
                    # or, line 140
                    try:
                        v_7 = self.limit - self.cursor
                        try:
                            # (, line 140
                            # call R2, line 140
                            if not self.__r_R2():
                                raise lab10()
                            # delete, line 140
                            if not self.slice_del():
                                return False

                            raise lab9()
                        except lab10: pass
                        self.cursor = self.limit - v_7
                        # <-, line 140
                        if not self.slice_from(u"iqU"):
                            return False
                    except lab9: pass
                elif among_var == 3:
                    # (, line 141
                    # call R2, line 141
                    if not self.__r_R2():
                        self.cursor = self.limit - v_5
                        raise lab6()
                    # delete, line 141
                    if not self.slice_del():
                        return False

            except lab6: pass
        elif among_var == 8:
            # (, line 147
            # call R2, line 148
            if not self.__r_R2():
                return False
            # delete, line 148
            if not self.slice_del():
                return False

            # try, line 149
            v_8 = self.limit - self.cursor
            try:
                # (, line 149
                # [, line 149
                self.ket = self.cursor
                # literal, line 149
                if not self.eq_s_b(u"at"):
                    self.cursor = self.limit - v_8
                    raise lab11()
                # ], line 149
                self.bra = self.cursor
                # call R2, line 149
                if not self.__r_R2():
                    self.cursor = self.limit - v_8
                    raise lab11()
                # delete, line 149
                if not self.slice_del():
                    return False

                # [, line 149
                self.ket = self.cursor
                # literal, line 149
                if not self.eq_s_b(u"ic"):
                    self.cursor = self.limit - v_8
                    raise lab11()
                # ], line 149
                self.bra = self.cursor
                # or, line 149
                try:
                    v_9 = self.limit - self.cursor
                    try:
                        # (, line 149
                        # call R2, line 149
                        if not self.__r_R2():
                            raise lab13()
                        # delete, line 149
                        if not self.slice_del():
                            return False

                        raise lab12()
                    except lab13: pass
                    self.cursor = self.limit - v_9
                    # <-, line 149
                    if not self.slice_from(u"iqU"):
                        return False
                except lab12: pass
            except lab11: pass
        elif among_var == 9:
            # (, line 151
            # <-, line 151
            if not self.slice_from(u"eau"):
                return False
        elif among_var == 10:
            # (, line 152
            # call R1, line 152
            if not self.__r_R1():
                return False
            # <-, line 152
            if not self.slice_from(u"al"):
                return False
        elif among_var == 11:
            # (, line 154
            # or, line 154
            try:
                v_10 = self.limit - self.cursor
                try:
                    # (, line 154
                    # call R2, line 154
                    if not self.__r_R2():
                        raise lab15()
                    # delete, line 154
                    if not self.slice_del():
                        return False

                    raise lab14()
                except lab15: pass
                self.cursor = self.limit - v_10
                # (, line 154
                # call R1, line 154
                if not self.__r_R1():
                    return False
                # <-, line 154
                if not self.slice_from(u"eux"):
                    return False
            except lab14: pass
        elif among_var == 12:
            # (, line 157
            # call R1, line 157
            if not self.__r_R1():
                return False
            if not self.out_grouping_b(FrenchStemmer.g_v, 97, 251):
                return False
            # delete, line 157
            if not self.slice_del():
                return False

        elif among_var == 13:
            # (, line 162
            # call RV, line 162
            if not self.__r_RV():
                return False
            # fail, line 162
            # (, line 162
            # <-, line 162
            if not self.slice_from(u"ant"):
                return False
            return False
        elif among_var == 14:
            # (, line 163
            # call RV, line 163
            if not self.__r_RV():
                return False
            # fail, line 163
            # (, line 163
            # <-, line 163
            if not self.slice_from(u"ent"):
                return False
            return False
        elif among_var == 15:
            # (, line 165
            # test, line 165
            v_11 = self.limit - self.cursor
            # (, line 165
            if not self.in_grouping_b(FrenchStemmer.g_v, 97, 251):
                return False
            # call RV, line 165
            if not self.__r_RV():
                return False
            self.cursor = self.limit - v_11
            # fail, line 165
            # (, line 165
            # delete, line 165
            if not self.slice_del():
                return False

            return False
        return True

    def __r_i_verb_suffix(self):
        # setlimit, line 170
        if self.cursor < self.I_pV:
            return False
        v_2 = self.limit_backward
        self.limit_backward = self.I_pV
        # (, line 170
        # [, line 171
        self.ket = self.cursor
        # substring, line 171
        if self.find_among_b(FrenchStemmer.a_5) == 0:
            self.limit_backward = v_2
            return False
        # ], line 171
        self.bra = self.cursor
        # (, line 177
        # not, line 177
        v_3 = self.limit - self.cursor
        try:
            # literal, line 177
            if not self.eq_s_b(u"H"):
                raise lab0()
            self.limit_backward = v_2
            return False
        except lab0: pass
        self.cursor = self.limit - v_3
        if not self.out_grouping_b(FrenchStemmer.g_v, 97, 251):
            self.limit_backward = v_2
            return False
        # delete, line 177
        if not self.slice_del():
            return False

        self.limit_backward = v_2
        return True

    def __r_verb_suffix(self):
        # setlimit, line 181
        if self.cursor < self.I_pV:
            return False
        v_2 = self.limit_backward
        self.limit_backward = self.I_pV
        # (, line 181
        # [, line 182
        self.ket = self.cursor
        # substring, line 182
        among_var = self.find_among_b(FrenchStemmer.a_6)
        if among_var == 0:
            self.limit_backward = v_2
            return False
        # ], line 182
        self.bra = self.cursor
        if among_var == 1:
            # (, line 184
            # call R2, line 184
            if not self.__r_R2():
                self.limit_backward = v_2
                return False
            # delete, line 184
            if not self.slice_del():
                return False

        elif among_var == 2:
            # (, line 192
            # delete, line 192
            if not self.slice_del():
                return False

        elif among_var == 3:
            # (, line 197
            # delete, line 197
            if not self.slice_del():
                return False

            # try, line 198
            v_3 = self.limit - self.cursor
            try:
                # (, line 198
                # [, line 198
                self.ket = self.cursor
                # literal, line 198
                if not self.eq_s_b(u"e"):
                    self.cursor = self.limit - v_3
                    raise lab0()
                # ], line 198
                self.bra = self.cursor
                # delete, line 198
                if not self.slice_del():
                    return False

            except lab0: pass
        self.limit_backward = v_2
        return True

    def __r_residual_suffix(self):
        # (, line 205
        # try, line 206
        v_1 = self.limit - self.cursor
        try:
            # (, line 206
            # [, line 206
            self.ket = self.cursor
            # literal, line 206
            if not self.eq_s_b(u"s"):
                self.cursor = self.limit - v_1
                raise lab0()
            # ], line 206
            self.bra = self.cursor
            # test, line 206
            v_2 = self.limit - self.cursor
            # (, line 206
            # or, line 206
            try:
                v_3 = self.limit - self.cursor
                try:
                    # literal, line 206
                    if not self.eq_s_b(u"Hi"):
                        raise lab2()
                    raise lab1()
                except lab2: pass
                self.cursor = self.limit - v_3
                if not self.out_grouping_b(FrenchStemmer.g_keep_with_s, 97, 232):
                    self.cursor = self.limit - v_1
                    raise lab0()
            except lab1: pass
            self.cursor = self.limit - v_2
            # delete, line 206
            if not self.slice_del():
                return False

        except lab0: pass
        # setlimit, line 207
        if self.cursor < self.I_pV:
            return False
        v_5 = self.limit_backward
        self.limit_backward = self.I_pV
        # (, line 207
        # [, line 208
        self.ket = self.cursor
        # substring, line 208
        among_var = self.find_among_b(FrenchStemmer.a_7)
        if among_var == 0:
            self.limit_backward = v_5
            return False
        # ], line 208
        self.bra = self.cursor
        if among_var == 1:
            # (, line 209
            # call R2, line 209
            if not self.__r_R2():
                self.limit_backward = v_5
                return False
            # or, line 209
            try:
                v_6 = self.limit - self.cursor
                try:
                    # literal, line 209
                    if not self.eq_s_b(u"s"):
                        raise lab4()
                    raise lab3()
                except lab4: pass
                self.cursor = self.limit - v_6
                # literal, line 209
                if not self.eq_s_b(u"t"):
                    self.limit_backward = v_5
                    return False
            except lab3: pass
            # delete, line 209
            if not self.slice_del():
                return False

        elif among_var == 2:
            # (, line 211
            # <-, line 211
            if not self.slice_from(u"i"):
                return False
        elif among_var == 3:
            # (, line 212
            # delete, line 212
            if not self.slice_del():
                return False

        self.limit_backward = v_5
        return True

    def __r_un_double(self):
        # (, line 217
        # test, line 218
        v_1 = self.limit - self.cursor
        # among, line 218
        if self.find_among_b(FrenchStemmer.a_8) == 0:
            return False
        self.cursor = self.limit - v_1
        # [, line 218
        self.ket = self.cursor
        # next, line 218
        if self.cursor <= self.limit_backward:
            return False
        self.cursor -= 1
        # ], line 218
        self.bra = self.cursor
        # delete, line 218
        if not self.slice_del():
            return False

        return True

    def __r_un_accent(self):
        # (, line 221
        # atleast, line 222
        v_1 = 1
        while True:
            try:
                if not self.out_grouping_b(FrenchStemmer.g_v, 97, 251):
                    raise lab0()
                v_1 -= 1
                continue
            except lab0: pass
            break
        if v_1 > 0:
            return False
        # [, line 223
        self.ket = self.cursor
        # or, line 223
        try:
            v_3 = self.limit - self.cursor
            try:
                # literal, line 223
                if not self.eq_s_b(u"\u00E9"):
                    raise lab2()
                raise lab1()
            except lab2: pass
            self.cursor = self.limit - v_3
            # literal, line 223
            if not self.eq_s_b(u"\u00E8"):
                return False
        except lab1: pass
        # ], line 223
        self.bra = self.cursor
        # <-, line 223
        if not self.slice_from(u"e"):
            return False
        return True

    def _stem(self):
        # (, line 227
        # do, line 229
        v_1 = self.cursor
        # call prelude, line 229
        self.__r_prelude()
        self.cursor = v_1
        # do, line 230
        # call mark_regions, line 230
        self.__r_mark_regions()
        # backwards, line 231
        self.limit_backward = self.cursor
        self.cursor = self.limit
        # (, line 231
        # do, line 233
        v_3 = self.limit - self.cursor
        try:
            # (, line 233
            # or, line 243
            try:
                v_4 = self.limit - self.cursor
                try:
                    # (, line 234
                    # and, line 239
                    v_5 = self.limit - self.cursor
                    # (, line 235
                    # or, line 235
                    try:
                        v_6 = self.limit - self.cursor
                        try:
                            # call standard_suffix, line 235
                            if not self.__r_standard_suffix():
                                raise lab4()
                            raise lab3()
                        except lab4: pass
                        self.cursor = self.limit - v_6
                        try:
                            # call i_verb_suffix, line 236
                            if not self.__r_i_verb_suffix():
                                raise lab5()
                            raise lab3()
                        except lab5: pass
                        self.cursor = self.limit - v_6
                        # call verb_suffix, line 237
                        if not self.__r_verb_suffix():
                            raise lab2()
                    except lab3: pass
                    self.cursor = self.limit - v_5
                    # try, line 240
                    v_7 = self.limit - self.cursor
                    try:
                        # (, line 240
                        # [, line 240
                        self.ket = self.cursor
                        # or, line 240
                        try:
                            v_8 = self.limit - self.cursor
                            try:
                                # (, line 240
                                # literal, line 240
                                if not self.eq_s_b(u"Y"):
                                    raise lab8()
                                # ], line 240
                                self.bra = self.cursor
                                # <-, line 240
                                if not self.slice_from(u"i"):
                                    return False
                                raise lab7()
                            except lab8: pass
                            self.cursor = self.limit - v_8
                            # (, line 241
                            # literal, line 241
                            if not self.eq_s_b(u"\u00E7"):
                                self.cursor = self.limit - v_7
                                raise lab6()
                            # ], line 241
                            self.bra = self.cursor
                            # <-, line 241
                            if not self.slice_from(u"c"):
                                return False
                        except lab7: pass
                    except lab6: pass
                    raise lab1()
                except lab2: pass
                self.cursor = self.limit - v_4
                # call residual_suffix, line 244
                if not self.__r_residual_suffix():
                    raise lab0()
            except lab1: pass
        except lab0: pass
        self.cursor = self.limit - v_3
        # do, line 249
        v_9 = self.limit - self.cursor
        # call un_double, line 249
        self.__r_un_double()
        self.cursor = self.limit - v_9
        # do, line 250
        v_10 = self.limit - self.cursor
        # call un_accent, line 250
        self.__r_un_accent()
        self.cursor = self.limit - v_10
        self.cursor = self.limit_backward
        # do, line 252
        v_11 = self.cursor
        # call postlude, line 252
        self.__r_postlude()
        self.cursor = v_11
        return True


class lab0(BaseException): pass


class lab1(BaseException): pass


class lab2(BaseException): pass


class lab3(BaseException): pass


class lab4(BaseException): pass


class lab5(BaseException): pass


class lab6(BaseException): pass


class lab7(BaseException): pass


class lab8(BaseException): pass


class lab9(BaseException): pass


class lab10(BaseException): pass


class lab11(BaseException): pass


class lab12(BaseException): pass


class lab13(BaseException): pass


class lab14(BaseException): pass


class lab15(BaseException): pass
