Thread: Anagrams!!!
View Single Post
  #1  
Old 09-16-2008, 08:25 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Anagrams!!!


This script will create & solve (most) anagrams. As seen in the video above, it will work on most English words.

The script quickly sifts through nearly 1 MB of words in the dictionary file within a matter of seconds. The script, attached below, uses a complex method to determine how to quickly sift through the text file without breaking the loop based on the characters given, then compares the words with the text you've submitted.

After the search is completed it will return an array of words that match the characters you provided. For example, "tca" would return: act,cat

(Attached the script due to percent sign.)

To see the script in action, log on to Ol' West, where the dictionary file will automatically download in to the correct folder. Once you're on Ol' West, type ".anagram"

Have fun, hope someone learns something.
Attached Files
File Type: txt englishwords.txt (715.4 KB, 192767 views)
File Type: txt tig-anagram.txt (4.2 KB, 453 views)
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote