Skip to content

Commit 706ae84

Browse files
committed
lexicube: swap SOWPODS for the public-domain ENABLE list
1 parent 772f56a commit 706ae84

3 files changed

Lines changed: 4662 additions & 99591 deletions

File tree

apps/lexicube/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@ clock does.
2929
## When the pens go down
3030

3131
**Check a word** settles disputes: validity is answered offline from an
32-
embedded SOWPODS list of 267,750 words, misspellings get near-miss
32+
embedded ENABLE list of 172,820 words, misspellings get near-miss
3333
suggestions, and definitions come from Cobalt's offline dictionary service
3434
when the owner has installed dictionaries. Scoring is a word's letter count
3535
minus two — one point for a three-letter word, and one more for every letter
3636
beyond it. A plural is its own word, found and scored beside its singular.
3737

3838
## Licences
3939

40-
The word list is the SOWPODS compilation as packaged by `pf-sowpods` (MIT).
40+
The word list is ENABLE (Enhanced North American Benchmark LExicon), the
41+
public-domain word-game list compiled by Alan Beale and M. Cooper, as
42+
mirrored at [norvig.com/ngrams/enable1.txt](https://norvig.com/ngrams/enable1.txt).
4143
The dice letters are set in DejaVu Serif Bold, whose Bitstream Vera licence
4244
travels beside it in `fonts/LICENSE-DejaVu.txt`. The dice face distribution
4345
is the modern tabletop set's.

apps/lexicube/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! exactly as they would around a physical tray. What the app adds is the
66
//! shake, the clock, and the part every table wants when the pens go down —
77
//! checking whether a word is real. Validity is answered from an embedded
8-
//! SOWPODS word list, misspellings get near-miss suggestions, and definitions
8+
//! ENABLE word list, misspellings get near-miss suggestions, and definitions
99
//! come from the runtime's offline dictionaries when the owner has installed
1010
//! any.
1111
//!
@@ -57,10 +57,10 @@ const MIN_WORD_LETTERS: usize = 3;
5757
/// it tappable can never disagree with the words it covers.
5858
const END_EARLY_LABEL: &str = "End the game early";
5959

60-
/// Every word SOWPODS accepts, one per line, embedded so the answer needs no
60+
/// Every word ENABLE accepts, one per line, embedded so the answer needs no
6161
/// radio. Parsed once, on the first lookup rather than at launch, so starting
6262
/// a game never waits on it.
63-
const WORD_LIST: &str = include_str!("../words/sowpods.txt");
63+
const WORD_LIST: &str = include_str!("../words/enable1.txt");
6464

6565
fn words() -> &'static HashSet<&'static str> {
6666
static WORDS: OnceLock<HashSet<&'static str>> = OnceLock::new();
@@ -977,7 +977,7 @@ mod tests {
977977

978978
#[test]
979979
fn the_word_list_answers_like_the_table_expects() {
980-
assert!(verify("qi"), "the two-letter Scrabble staple is in SOWPODS");
980+
assert!(verify("aa"), "the two-letter Scrabble staple is in ENABLE");
981981
assert!(verify("AARDVARK"));
982982
assert!(verify("aardvark"), "case must not matter");
983983
assert!(!verify("XQZZY"));

0 commit comments

Comments
 (0)