Motle is a library for finding words in wordle game
Project description
Motle
Work in progress
Motle is a library that allows you to search for words based on a dictionary by filtering various criteria.
For now I only have the French scrabble dictionary (OD_8)
How to install
pip install motle
How to use it
from motle import motle
mot = motle.Motle()
mot.count
>> 411430
mot = motle.Motle(length=5)
mot.count
>> 7980
mot.words
>> [{"word": "ABACA", "nb_letters": 5, "spelling": ["A", "B", "A", "C", "A"], "with": ["A", "B", "C"], "without": ["D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]}, ..., {"word": "CARRE", "nb_letters": 5, "spelling": ["C", "A", "R", "R", "E"], "with": ["A", "C", "E", "R"], "without": ["B", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "S", "T", "U", "V", "W", "X", "Y", "Z"]}]
# words with letter R
mot.filter(wth=['R'])
mot.words
>> [{"word": "CARRE", "nb_letters": 5, "spelling": ["C", "A", "R", "R", "E"], "with": ["A", "C", "E", "R"], "without": ["B", "D", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "S", "T", "U", "V", "W", "X", "Y", "Z"]}]
mot.count
>> 1
mot._reset()
mot.count
>> 7980
# words without letter A
mot.filter(wthot=['A'])
mot.words
>> []
# words containing following letters in the order
mot._reset()
mot.filter(contains=['A','B','','',''])
mot.words
>> [{"word": "ABACA", "nb_letters": 5, "spelling": ["A", "B", "A", "C", "A"], "with": ["A", "B", "C"], "without": ["D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]}]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
motle-0.2.tar.gz
(4.7 kB
view details)
Built Distribution
motle-0.2-py3-none-any.whl
(5.7 kB
view details)
File details
Details for the file motle-0.2.tar.gz
.
File metadata
- Download URL: motle-0.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0888f6b697d008dee8f4f060fc4fb4ec3f18f41aeaeecca377888f455e008b43 |
|
MD5 | bad6e81fd78916d74c079809d8d82eab |
|
BLAKE2b-256 | a41ef7d296ab6849dc2956994d7d1556d8ed0921b05c703f60106b86d0f5d960 |
File details
Details for the file motle-0.2-py3-none-any.whl
.
File metadata
- Download URL: motle-0.2-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62c8d482a243df41c4159f1445533a241b3698a17f14e642d465b49663f86073 |
|
MD5 | d33f6a61d5fcc9f23820b6b1f9aa622d |
|
BLAKE2b-256 | 0e316f82883640cda9e6514a38c975a5884efa63ee5097ed6a6b2f53000d4f62 |