The JavaScript below should fill in the appropriate entries in the filter object. You also have access to the dictionary via lexicon.
This tab allows you to run a suite of unit tests. Press the button below to run the tests asynchronously.
Lexicon by Ian Taylor
Version 1.02
This HTML page allows you to search a great number of English words; particularly useful for solving word puzzles.
The "Crossword" tab accepts a template with unknown letters marked by a ?. So K???K will return many words, including KNOCK. To enforce repeated letters, use digits. For example, K1?1K will only return KAYAK
The "Anagram" tab in similar, but finds anagrams of the template. Repeat digits cannot be used. So WORDS will return all its anagrams, including SWORD.
The "Codeword" tab is also similar, but you can optionally specify letters that cannot be used in the matched words. So K???K excluding AC will suggest KIOSK.
The "Advanced" tab gives you full control over the JavaScript functionality. So the following will give you all the seven-letter palindromes:
filter.length = 7; filter.predicate = function (entry) { return entry.word === Lexicon.wordReverse(entry.word); }
Whilst the following will give you all words of at least eight letters that, when reversed, give you a different valid word (e.g. DESSERTS and STRESSED:
filter.length.minimum = 8; filter.predicate = function (entry) { var reversed = Lexicon.wordReverse(entry.word); return lexicon.lookup(reversed) && (reversed !== entry.word); }
The "Testing" tab allows you to run the built-in JavaScript unit tests.
There are a number of dictionary options:
TWL06 is the 2006 version of the Official Tournament and Club Word List used for Scrabble games in USA, Canada and Thailand.
SOWPODS is word list used for English language Scrabble games in countries, including the UK. It is a superset of TWL06.
SCOWL is large word list of almost half a million English words including frequency information. Some of the word entries are rather suspect.
Superset is a union of all three dictionaries.
For more information, see the relevant blog posts.