A terminal-based dictionary app that combines a Trie and a BK-Tree to support fast word lookups and typo suggestions.
In the prior course, I emailed my lab lecturer to ask what else I should learn outside of the syllabus. She advised me to build a dictionary app with a Trie. Following dicussions, I decided to add a BK-Tree with Levenshtein distance to handle typo recommendations.
While working on this, I learned about std::unique_ptr
and std::shared_ptr
, which helped me resolve many pointer-related issues. I also figured out how to write some unit tests with gtest.
As for the words, I scraped some from this website and this repo, and I used dictionaryapi.dev to fetch some missing meanings.
I use Ninja to build my project. Once it’s built, you can run the build/dictionary.exe
file.
cmake -G "Ninja" -B build -S .
cmake --build build
I wrote down some extra stuff in the docs folder. It's nothing fancy, just a few notes about the commands and patterns that the app supports.
Have a nice day!