Skip to content

haolamnm/dictionary

Repository files navigation

The Dictionary

Terminal Demo

A terminal-based dictionary app that combines a Trie and a BK-Tree to support fast word lookups and typo suggestions.

Overview

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.

Words data

As for the words, I scraped some from this website and this repo, and I used dictionaryapi.dev to fetch some missing meanings.

How to Run

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

Notes

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!

About

[CSC10004] A simple console-based dictionary app using Trie and BK-Tree for fast lookups.

Topics

Resources

License

Stars

Watchers

Forks