![]() |
Anagrams!!!
2 Attachment(s)
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. :cool: |
Oh man. I could see this leading to a lot of bad attempts at future word filters. Ha.
|
Quote:
|
Not bad :)
|
Quote:
|
Very cool. :)
|
1 Attachment(s)
Okay, based on some helpful advice from Hell Raven (and the Programming Exercise #2 thread) and thanks to a USD bet Stephen and I had, I have rescripted the anagram solver.
Stephen and I had a bet that I could make a faster anagram solver with him using GS2 than he could with PHP. This anagram solver took the prize and put a little extra $ in my pocket. Okay, anyways. Extract the zip file below in to your graal folder. The run the script below: PHP Code:
Anagram: srenio Result: ireson,rosine,senior,serino,sonier,irones,noires,n osier,resino,soneri Solved in 0.00074571 secs. Anagram: fydlea Result: fadely,flayed,deafly Solved in 0.000312298 secs. Anagram: anestri Result: nastier,retains,anestri,asterin,eranist,ratines,re siant,restain,retina's,retinas,retsina,stainer,sta rnie,stearin Solved in 0.000671716 secs. It can also solve things like: Anagram: Eh! A Speakers. Result: shakespeare Solved in 0.000570735 secs. |
|
Quote:
|
It's funny because I needed to unscramble some words for my homework...
|
Quote:
|
Yea I know. Some of our teachers think we're retarded. It was advanced health homework and the teacher was asian who doesn't speak english very well.
|
| All times are GMT +2. The time now is 05:34 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.