def match(self, sentence, start=<NUM_LIT:0>, _v=None, _u=None):
if sentence.__class__.__name__ == "<STR_LIT>":<EOL><INDENT>pass<EOL><DEDENT>elif isinstance(sentence, list) or sentence.__class__.__name__ == "<STR_LIT>":<EOL><INDENT>return find(lambda m,s: m is not None, ((self.match(s, start, _v), s) for s in sentence))[<NUM_LIT:0>]<EOL><DEDENT>elif isinstance(sentence, basestring):<EOL><INDENT>sentence = Sentence(sentence)<EOL><DEDENT>elif isinstance(sentence, Match) and len(sentence) > <NUM_LIT:0>:<EOL><INDENT>sentence = sentence[<NUM_LIT:0>].sentence.slice(sentence[<NUM_LIT:0>].index, sentence[-<NUM_LIT:1>].index + <NUM_LIT:1>)<EOL><DEDENT>a = []<EOL>for sequence in (_v is not None and _v or self._variations()):<EOL><INDENT>if _u is not None and id(sequence) in _u:<EOL><INDENT>continue<EOL><DEDENT>m = self._match(sequence, sentence, start)<EOL>if m is not None:<EOL><INDENT>a.append((m.words[<NUM_LIT:0>].index, len(m.words), m))<EOL><DEDENT>if m is not None and m.words[<NUM_LIT:0>].index == start:<EOL><INDENT>return m<EOL><DEDENT>if m is None and _u is not None:<EOL><INDENT>_u[id(sequence)] = False<EOL><DEDENT><DEDENT>if len(a) > <NUM_LIT:0>:<EOL><INDENT>return sorted(a)[<NUM_LIT:0>][-<NUM_LIT:1>]<EOL><DEDENT>
Returns the first match found in the given sentence, or None.