Anagram solver

Log in to Vote
102
102 Votes • 13 Comments
Given a word X try to find all possible valid English words using k characters of the word X like:

anagram: airplane 5
result: ['alien', 'aline', 'april', 'arena', 'ariel', 'lanai', 'learn', 'liner', 'nepal', 'paean', 'paine', 'paler', 'panel', 'pearl', 'penal', 'peril', 'plain', 'plane', 'praia', 'renal', 'ripen']
• posted 6 years and 8 months ago • type: Goodie (Perl functions) Live

anonymous
Is anyone working on this? I'll take a stab at it.
posted by [UserVoice unlisted] • 6 years and 6 months ago Link
anonymous
I'm indexing a dictionary file using sorted string as key and storing anagrams of key as array ref. Can I cache the hash to a file so I don't have to create it each request?

/usr/share/dict is the dictionary for testing purposes. I'm planning on using something from http://wordlist.sourceforge.net/

https://github.com/unlisted/zeroclickinf...
posted by [UserVoice unlisted] • 6 years and 6 months ago Link
anonymous
posted by [UserVoice Paul-Arthur Asselin] • 6 years and 6 months ago Link
anonymous
I've actually solved this using a Trie, code in Python is here https://github.com/maurizzzio/Udacity/tr..., I think that in July I'll start developing the plugin for DuckDuckGo
posted by [UserVoice Mauricio Poppe] • 6 years and 5 months ago Link
anonymous
Hey Maruricio,

Have you started working on the plugin? I got a little sidetracked. I was going to pick it up again, but saw that you already had a solution.
posted by [UserVoice unlisted] • 6 years and 5 months ago Link
anonymous
this is a great idea! wordnet might be worth looking at: http://wordnet.princeton.edu
posted by [UserVoice Sean Macdonald] • 5 years and 11 months ago Link
anonymous
posted by [UserVoice DuckDuckGo Team] • 5 years and 7 months ago Link
yegg
Sorry, Koosha! Misread the original suggestion. This IS already implemented :)

https://duckduckgo.com/?q=anagram+elnara...

https://duckduckgo.com/?q=anagram+airpla...

We'll close the idea.
posted by yegg Staff5 years and 7 months ago Link
yegg
Koosha, that doesn't solve anagrams--it just creates them based on the text you input. This idea is for a solver but could be baked into the current anagram goodie.
posted by yegg Staff5 years and 8 months ago Link
getty
Its ok if you want to read the file every time, cause the plugin isnt fired up often of course, and when its fired the reading procedure will not take forever. The bigger disadvantage here would be to store that information in memory. So just proceed with an always reading on this amount of data.
posted by getty 6 years and 6 months ago Link
anonymous
I don't understand. What is the difference?
posted by <hidden> • 5 years and 7 months ago Link
anonymous
This seems to be implemented: https://github.com/duckduckgo/zeroclicki...
posted by <hidden> • 5 years and 8 months ago Link
timothy1
Is it possible to do this also for other languages?
posted by timothy1 3 years and 6 months ago Link