def decode(self, stream): if stream.type_ != 'string': return w = Words('american-english') chars = "".join(stream) for word in w.anagram(chars, depth=1): yield Result(chars, " ".join(word), 'Anagramed')
def test_word(): w = Words('american-english') for gram in w.anagram("topgears"): print gram