def search(self, sentence):
if sentence.__class__.__name__ == "<STR_LIT>":<EOL><INDENT>pass<EOL><DEDENT>elif isinstance(sentence, list) or sentence.__class__.__name__ == "<STR_LIT>":<EOL><INDENT>a=[]; [a.extend(self.search(s)) for s in sentence]; return a<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>v = self._variations()<EOL>u = {}<EOL>m = self.match(sentence, _v=v)<EOL>while m:<EOL><INDENT>a.append(m)<EOL>m = self.match(sentence, start=m.words[-<NUM_LIT:1>].index+<NUM_LIT:1>, _v=v, _u=u)<EOL><DEDENT>return a<EOL>
Returns a list of all matches found in the given sentence.