def find_lemma(self, verb):
v = verb.lower()<EOL>if not (v.startswith("<STR_LIT>") and v.endswith("<STR_LIT:t>")): <EOL><INDENT>for prefix in prefixes:<EOL><INDENT>if v.startswith(prefix) and v[len(prefix):] in self.inflections:<EOL><INDENT>return prefix + self.inflections[v[len(prefix):]]<EOL><DEDENT><DEDENT><DEDENT>b, suffix = "<STR_LIT:U+0020>" in v and v.split()[:<NUM_LIT:2>] or  (v, "<STR_LIT>")<EOL>if b.endswith(("<STR_LIT>", "<STR_LIT>")):<EOL><INDENT>return b<EOL><DEDENT>for x in ("<STR_LIT:test>", "<STR_LIT>", "<STR_LIT:end>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT:e>", "<STR_LIT:t>"):<EOL><INDENT>if b.endswith(x): b = b[:-len(x)]; break<EOL><DEDENT>for x, y in (<EOL>("<STR_LIT>",  "<STR_LIT>"), ( "<STR_LIT>", "<STR_LIT>"), ( "<STR_LIT>",  "<STR_LIT>" ), ( "<STR_LIT>", "<STR_LIT>" ), ("<STR_LIT>", "<STR_LIT>"), <EOL>("<STR_LIT>",  "<STR_LIT>"), ("<STR_LIT>", "<STR_LIT>"), (u"<STR_LIT>", u"<STR_LIT>"  ), ( "<STR_LIT>", "<STR_LIT>" ), ("<STR_LIT>", "<STR_LIT>"), <EOL>(u"<STR_LIT>", u"<STR_LIT>"), (  "<STR_LIT>", "<STR_LIT>"), ( "<STR_LIT>",  "<STR_LIT>"), (u"<STR_LIT>", "<STR_LIT>")):<EOL><INDENT>if b.endswith(x): b = b[:-len(x)] + y; break<EOL><DEDENT>b = b.replace("<STR_LIT>", "<STR_LIT>")<EOL>b = b.replace("<STR_LIT>", "<STR_LIT>")<EOL>if not b.endswith(("<STR_LIT:e>", "<STR_LIT:l>")) and not (b.endswith("<STR_LIT>") and len(b) >= <NUM_LIT:3> and not b[-<NUM_LIT:3>] in VOWELS):<EOL><INDENT>b = b + "<STR_LIT:e>"<EOL><DEDENT>if b.endswith(("<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>")):<EOL><INDENT>b = b + "<STR_LIT:e>"<EOL><DEDENT>if b.startswith("<STR_LIT>") and v.endswith("<STR_LIT:t>"):<EOL><INDENT>b = b[<NUM_LIT:2>:]<EOL><DEDENT>if b.endswith(("<STR_LIT>", "<STR_LIT>")):<EOL><INDENT>b = b[:-<NUM_LIT:3>]<EOL><DEDENT>if b.endswith(("<STR_LIT>", "<STR_LIT>", u"<STR_LIT>", u"<STR_LIT>")):<EOL><INDENT>b = b.rstrip("<STR_LIT:e>") + "<STR_LIT>"<EOL><DEDENT>if b.endswith(u"<STR_LIT>"):<EOL><INDENT>b = b + "<STR_LIT:e>"<EOL><DEDENT>return suffix + b + "<STR_LIT:n>"<EOL>
Returns the base form of the given inflected verb, using a rule-based approach.