Skip to content

Dictionary is a project written in C and Python that uses a text file as a knowledge base. Performs functions such as meaning, autocompletion of a word, spell-checking a word/file, compare time and memory statistics visually using gnuplot pipeline.

License

Notifications You must be signed in to change notification settings

AdeshChoudhar/Dictionary

Repository files navigation

Dictionary

DSA-II mini project

Dictionary is a project written in C and Python that uses a text file as a knowledge base, performs functions such as meaning/autocompletion of a word, spell-checking a word/file.

Prerequisites

  • GCC-11
  • CMake (>=3.17)

Install and build

Change the directory to the root directory of the project Dictionary, then follow the steps are given below to build the project for the first time.

mkdir <directory_name>
cd <directory_name>
cmake ..

Then to build each time, use make in the directory created in the previous step. Refer this demo, if needed.

Abbreviations used

  • HASH: Hash Table
  • TRIE: Trie
  • TERN: Ternary Search Tree

Commands

./Dictionary -h will provide you a help page as shown below to use various features.

+===========+
|   HELP    |
+===========+

<0> HELP        = Usage: ./Dictionary [-h/--help]
<1> MEANINGS    = Usage: ./Dictionary
<2> GUESS       = Usage: ./Dictionary -g [--TRIE/--TERN] <word>
<3> SPELL-CHECK = Usage: ./Dictionary -s [--HASH/--TRIE/--TERN] [<word>/<file>]
<4> COMPARE     = Usage: ./Dictionary -c [<word>/<file>]

Flowchart

Flowchart

Features

MEANING

Exhibits the basic functionality of providing the meaning of a word.
meaning.py is handling the API call part. The free external API used here is:

https://dictionaryapi.dev

Meaning

GUESS

Suggest words according to the longest valid prefix in the input argument. Uses option TRIE or TERN to select and use the respective data structure to perform this feature.
Guess

SPELL-CHECK

Takes option --HASH or --TRIE or --TERN to select and use the respective data structure. Then displays various parameters regarding time and memory required.

Word File
Checks validity/spelling of that word. Checks the spelling of all the words and list down all the misspelled words in misspelled.txt
Spell Check File Spell Check Word
COMPARE

Compares and helps to visualize time and memory required while performing spell-checking process by all three data structures. Gives a complete analysis and statistics in terminal and visualization with graphs using gnuplot pipeline. Compare

Mentor

Asst. Prof. Shrida Kalamkar

References

About

Dictionary is a project written in C and Python that uses a text file as a knowledge base. Performs functions such as meaning, autocompletion of a word, spell-checking a word/file, compare time and memory statistics visually using gnuplot pipeline.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published