def results(self):
d = dict()<EOL>words = [word.strip() for word in self.haystack]<EOL>if not words:<EOL><INDENT>raise NoResultException('<STR_LIT>')<EOL><DEDENT>for w in words:<EOL><INDENT>d[w] = Levenshtein.ratio(self.needle, w)<EOL><DEDENT>return sorted(d.items(), key=operator.itemgetter(<NUM_LIT:1>), reverse=True)<EOL>
Returns a list of tuple, ordered by similarity.