This project is an autocomplete system for a dictionary implemented using a Trie data structure.
It loads words from a .txt dictionary file and provides efficient search capabilities with multiple modes and sorting options.
-
Search Methods:
- Default: results sorted by occurrences of the word in the dictionary.
- Lexicographically: results sorted alphabetically.
- Shortest: results sorted by word length (ascending by default).
- Fuzzy Search: allows flexible matching with wildcards:
*→ matches 0 or more characters..→ matches exactly 1 character.- Example:
m.*→ matches words like make.
-
Sorting Order:
Ascending(default)Descending
-
Dictionary Management:
- Add words:
- Automatically, if a word is searched more than 3 times (using
unordered_map). - Manually, with the Add Word button.
- Automatically, if a word is searched more than 3 times (using
- Delete words completely from the dictionary.
- Add words:
-
Character Support:
- Handles ASCII characters from decimal range 32 to 64.
- Supports both uppercase and lowercase letters.
- Language: C++
- GUI: QT 6
- Data Structure: Trie
- Dictionary Storage: Text files (
.txt) - IDE: Visual Studio (MSVC)
Before running the project, make sure you have:
- Visual Studio with Desktop development with C++ workload installed.
- Open the solution file (
.sln) in Visual Studio. - Build the project (
Ctrl + Shift + B). - Run the program (
F5). - Make sure
dictionary.txtis in the data directory.
├── main.cpp # Main entry point
├── trie.cpp # Trie implementation
├── trie.h # Trie header file
├── trie_tools.cpp # Important Trie Tools
├── trie_tools.cpp # Important Trie Tools implementation
├── load_files.h # Loading files (dictionary, fonts, ...etc)
├── load_files.cpp # Loading files implementation
├── gui.h # Define important gui functions, objects
├── gui.cpp # Implentation of gui with QT
├── dictionary.txt # Dictionary words
└── README.md # Project documentation
- Optimize search performance.
- Support more characters.
Thanks to all team members for their efforts ❤️.
AhmedPlusPlus 💻 🤔 |
anas-ahmad7950 💻 🎨 |
Ismail Gamal 💻 🐛 |
Mahmoud Assaf 💻 🎨 |
Mazin Mohammed 👀 |