WordPlay Demonstration This software ONLY uses RapidQ (no FreeBasic dlls or in-built assembly code). Operations on strings, using QStringLists in RapidQ, are quite fast, and in an interactive mode, like this spell checker and crossword checker, are more than adequate. * The dictionary list used, in this demonstration, is a simple list of alphabetically sorted uppercase words (English character set) obtained from the internet at: http://dreamsteep.com/projects/98-software/53-the-english-open-word-list-eowl.html The zip file comprises 26 lists (A to Z) of words, lower case and LF separated, which have to be concatenated and filtered to conform with this software. There are ~280 words which contain non-English alphabetic letters that must be removed e.g. ÅNGSTRÖM & BÊTISE This software will automatically do this, when the dictionary list is first loaded, saving the original file as ".bak" (takes about 15 seconds). (There are also some other dubious "words" that I would not expect to be there!) * The final size of the dictionary list is 128,771 words. The author limited words to 10 characters or less, in his lists. The additional features of this software help in building a "default" dictionary list for your personal use, while removing this limit. * The integrity test, ensures that the dictionary list only contains English alphabetic characters and ensures that there are no "doubles" in the list. * Search Speed Test:- The speed test searches the dictionary list using its OWN list of dictionary words, in reverse order. This ensures that there are no bugs in the search algorithm. This test is inherently optimised and therefor more of a "seek" test. A more valid figure when spell-checking a standard text file, is much less. Desktop - AMD single core 1.6GHZ with 1GB RAM XP Home: The test takes about 15.3 seconds (~8,000 words per second) but a real test would be closer to 830 words per second. Still, quite fast! Laptop - Pentium Dual-core T4400 2.2GHZ 2 GB RAM Windows 7 32-bit: Same test, same data - takes 21.2 seconds(!!) - that's progress for you. * The software: "SpellCheck.inc" contains ~500 lines of code (with comment lines!) so is not a great deal to add to your program. The MAIN functions are declared at the top of the code for easy referral. Remove the "extra" functions and you can reduce this down to < 200 lines of code! The only other thing you need to do is add the dictionary list. Utilities: 1. Spell-check a text file, option of adding new words to current dictionary list. 2. Crossword puzzle "lookup". Set the length of the word, add the "known" letters then search for matches. 8-10 letter words currently have the most entries in the dictionary list, and obviously, the more "unknown" letters, the longer the time to search. e.g. 10 letters with 9 unknown -> 2.47 secs finding 1,769 out of 128,890 words searched (~52,000 words per second) NB The timings displayed are for finding matching words, and depend on what position the "known" letter(s) are in, and how many words are in the dictionary list. Displaying the words can take much longer due to the use of the QStringGrid in this demo, and of course the number of matches found. 3. Build a dictionary list from multiple lists of words. Load a text file into memory. For a new dictionary use the option "Create", or for an existing (loaded) dictionary, use the "Add" option. The words are filtered for non-alphabetic letters, and are checked to ensure they have at least one vowel (or "y") BUT they are not checked for validity (Funny, you need a dictionary for that!) After each list (file) is added, the dictionary must be re-loaded. * This is only a demo, and has some strange logic that really should be straightened up, but I am bored with it now. It (just) does a job "as is". Not sure how it would cope with French, German etc with non-English letters. Think it would need re-coding. If you're still interested, you've got the source code! Rgds to all Don