A lexicon search tool for language teachers and students. Explore word patterns in any language.
Crack WORDLE in minutes using lexgo for hints. It's also great for cracking crossword puzzles. You can ask lexgo to find example words of specific lengths and with specific letters.
On Linux or Mac, things couldn't be simpler. Just open a terminal and follow these instructions.
Install this tool using pip
:
pip install lexgo
Python Package Index: https://pypi.org/project/lexgo/
If you aren't familiar with Python and have trouble with the install, you can read the python.org article Using Python on Mac OSX. The article recommends an installer distributed by python.org. Personally, I like to use Homebrew for installing applications on Mac, but Anaconda is also very popular.
You can use lexgo on Windows using the Windows Subsystem for Linux inside the Windows Terminal.
Here is a crash course:
Search "Terminal" in your programs. Once the terminal is open, type these commands and follow the instructions you see in the terminal.
wsl —install
sudo apt update
sudo apt upgrade
sudo apt install python3-pip
sudo apt install python3-venv
python3 -m venv ./venv
pip install lexgo
Now you are ready to use lexgo. Just type in your first command.
# show all three letter words with 'a'
lexgo -i "a" "..."
After installing, when you want to use lexgo again in the future. Just open the terminal and type the following to get started.
wsl
source ./venv/bin/activate
For help, run:
lexgo --help
You can also use:
python -m lexgo --help
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd lexgo
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
python -m pytest
The English lexicon used was taken from the english-words repo. Thanks to the esteemed programer @dwyl for his excelent work.
The Spanish lexicon used was taken from the diccionario-español.txt repo. Gracias al estimado programador @JorgeDuenasLerin por su trabajo excelente.
The French lexicon used was taken from the French-Dictionary repo. Merci au programmeur estimé @hbenbel pour son excellent travail.
The Portuguese lexicon used was taken from the words-pt repo. Obrigado ao estimado programador @jfoclpf por seu excelente trabalho.
The German lexicon used was taken from the wortliste repo. Vielen Dank an den geschätzten Programmierer @davidak für seine hervorragende Arbeit.
The Italian lexicon used was taken from the paroleitaliane repo. Grazie allo stimato programmatore @napolux per il suo eccellente lavoro. This lexicon is in ascii and doesn't include any diacritical marks on the words. I'm searching for a better option.
The python package chardet and the command line tool iconv were very helpful in detecting and converting encondings.