Name Modified Size Downloads / Week Status
Totals: 4 Items   1.9 MB 2
Version 0.0.9 2010-03-02 22 weekly downloads
Version 0.0.x (Really Old) 2010-02-26 11 weekly downloads
Readme.txt 2010-03-30 7.3 kB 11 weekly downloads
Dict.txt 2010-02-10 1.9 MB 11 weekly downloads
=========== =========== =========== READ ME: =========== =========== =========== BEFORE STARTING: ENSURE THAT Dict.txt IS IN THE SAME FOLDER AS THE SCRIPT YOU ARE RUNNING OR IT WILL NOT RUN CORRECTLY. Dict.txt is the word dictionary used as a master list of what is and isn't a word. To run this program, download the most recent version of the module (v0.0.9). There are two versions, one which is simply called 'Anagram.py' and one called 'Anagram with menu.py'. The second one is easier to use and you should probably download and use that one. Once you download that, download Dict.txt as well and place it in the same directory as the .py file you just downloaded. To run it, you will need Python version 3.x (this can be downloaded for almost any platform from www.python.org). Open the shell and use it to run the module. NOTE: If you use the "Python with Menu" form of this program, you can essentially ignore what's below. Just run the module in the python shell and everything from there should be straight forward. Alternatively, you can simply double click the module 'Anagram with menu.py' and provided that you have python installed, a command window will come up and the interactive menu will run from there. Recent Addition - You may now specify a minimum and maximum length for output words. This allows the user to have more control over what each function returns. Note that it is only allowed for some functions. It will likely be written into all of them some time in the future. To use 'Anagram.py', open the python shell and run the module. All of the things this program can do are written as specific functions which are outlined below. To invoke one of them, simply type everything between the quotes and hit enter. The function will prompt you for a string and then run: "wordexists()" - Tests to see if a word is in the dictionary. "lettersinword()" - This function finds words that contain all of the letters in the string that you you input at the beginning. "stringinword()" - This function finds words that contain all of the letters in your string back to back. For example, a search on the string "THE" will turn up "FIGHTER" but not "THREE" because in the word "THREE" the letters in "THE" aren't all back to back. However, the function "lettersinword()" will indeed turn up the word "THREE" because it doesn't take into account the locations of the letters within the word relative to each other. "wordinstring()" - This function finds words that can be made with some or all of the letters in your string. "fullstringmatch()" - This function will find all the words that can be made using all and only all of the letters in the string the user inputs. "lettersinword()" - This function returns any word that contains all the letters in the user specified string regardless of their position in the word. Unlike stringinword(), this function will return 'THREE' if the input string is "THE". "testthisspelling()" - This function will find all of the closest matches to the input of the user and display them. Words are scored using their Levenshtein distance from the input string. For every deletion, insertion, or changing of a letter within the string to make it like the other, the Levenshtein distances goes up by one. For example the distance between "THIS" and "TIPS" would be 2 (one to change the H to the I, and one to change the I to a P). "endsin()" - This function finds words that end in the user specified string. "startsin()" - Finds words that start in the user defined string. "containsstr()" - Finds words that contain an exact string. "crosswerd()" - A crossword fuctionality. Enter strings using '-' or '?' for unknown letters. For example entering 'he--o' will output words like 'hello'. The dictionary used to run this program was taken from Facebook's puzzles section. A link to that puzzle can be found here (a link to the text file can be found within the text here): http://www.facebook.com/careers/puzzles.php?puzzle_id=17 =========== =========== =========== CHANGE LOG: =========== =========== =========== PLEASE NOTE -- This change log is meant to serve as a reference only. It is by no means complete and many of the minor tweaks that were done while I sat bored in class were not included. v0.0.1 - Two major functions created (spell checker and string-in-word). UI relied on user to execute the functions within python shell after running the module. Program relied on only one python file which was unpackaged. All around not ready for release. v0.0.2 - Added a basic menu structure using "while" loops that allowed the user to actually navigate the functions. Added descriptions for the functions. [NOTE: THIS WAS LATER REMOVED]. v0.0.3 - Added two more functions (full-string-match and word-in-string). Removed the basic menu system for now. Planning on redoing it to include these two functions. v0.0.4 - Added "failer" to the functions to print an output if no matches are found. Also added code to list all of the best matches for spell-checker instead of simply the best match which appears first alphabetically. Plans for a GUI using Tkinter in the works. Nothing fancy, but probably won't be released until v0.1.x which won't be ready for a while. v0.0.5 - [FEB 08, 2010] -- Functions endsin() and containsstr() were added. Started adding comments to the code. Implemented similar code from spell-checker to allow wordinstring() to output a list of the longest possible words that can be created using only the letters in used input. Function names will now be referred to as they are in the module. v0.0.6 - [FEB 09, 2010] -- Realized there was a huge issue with the algorithms for some of the functions. For example, the stringinword() function would only return words with the letters in one grouping. A search on the string "THE" found the word "FIGHTER" but not the word "THREE" because in the word "THREE" the letters are not grouped together back to back. Fixed this by adding functions that solved for this while keeping the old ones. They still may retain some utility since they find words where the letters in the user defined string are all back to back to back. v0.0.7 - [over the course of a few days] -- added a menu interface within the python shell. Should make things easier so that users don't have to constantly refer to the readme. v0.0.8 - [FEB 25, 2010] -- Added crosswerd(). Added docstrings to various functions so that help can be more easily accessed. v0.0.9 - [MAR 01, 2010] -- Added functions that allow for defining the maximum and minimum length of the output words. Minor optimizations added to some functions. Plans for a GUI are scrapped for the time being.
Source: Readme.txt, updated 2010-03-30