This is a solver for the New York Times Letter Boxed puzzle. Uses the NLTK word list as the default dictionary. Outputs all possible solutions.
Note: Not all NLTK solutions may work in the actual puzzle since the dictionary used by NYTimes is smaller.
pip install -r requirements.txt
lb.py -hfor helplb.py -t|--top <letters> -l|--left <letter> -b|--bottom <letters> -r|--right <letters>to solve the puzzle- Optional parameters:
-m|--min <int>to specify the minimum word length (default: 4)-x|--max <int>to specify the maximum word length (default: no limit)-d|--depth <int>to specify the search depth (default: 4)-D|--dict <file>to specify the dictionary file (default: NLTK word list)
lb.py -t ihy -l aws -b ern -r ftl -m 6 -x 6 -d 3
1. ['afaint', 'theist', 'twirly']
2. ['atwirl', 'lanseh', 'hafnyl']
3. ['faints', 'shewel', 'lyrate']
...
69. ['wriest', 'tarish', 'hafnyl']
70. ['wriest', 'teaish', 'hafnyl']
71. ['writhe', 'elysia', 'afaint']
❯ lb.py -t dki -l ero -b clv -r jta -m 4 -d 2 -D /usr/share/dict/words
1. ['adjective', 'earcockle']
2. ['adjective', 'earlock']
3. ['kokra', 'adjectival']
4. ['okra', 'adjectival']
Licensed under the Apache License Version 2.0.

