Spelling Bee is a word puzzle, like the game in The New York Times.
- Words must contain at least 4 letters.
- Words must include the center letter.
- Our word list does not include words that are obscure, hyphenated, or proper nouns.
- No cussing either, sorry.
- Letters can be used more than once.
- 4-letter words are worth 1 point each.
- Longer words earn 1 point per letter.
- Each puzzle includes at least one “pangram” which uses every letter. These are worth 7 extra points!
Requirement:
- GNU
aspell
installed:brew install aspell
ruby
installed:brew install ruby
- ruby gem
ffi-aspell
installed:gem install ffi-aspell
To run this ruby in CLI:
rake
This solver works in 4 steps:
- get the center letter and other letters
- combine: choose n-1 letters from all letters(letters may be used more than once but each combination is unique)
- arrange: arrange the order of the center letter and the other n-1 combined letters(each arrangement is unique)
- spell check: check the spells of the each arranged word
Several solvers are provide:
- pangram solver: give the "pangram" words
- fixed length solver: give the fixed length words
- solver: give all the words
The default word count of "pangram solver" and "fixed length solver" is set by WORD_MAX_COUNT
. The "solver" will give all the words while word's length limited to be under WORD_MAX_LENGTH
and word count of each length is limited to be under WORD_MAX_COUNT
.
You can set these constants in configs.yml