SlideShare a Scribd company logo
1 of 13
Data Structures & Algorithms
Project Title:
Dictionary Implementation Using TRIE
Problem Statement
 Through our project we intend to help our user to
find the meaning, synonyms, antonyms and examples
of an entered word and if the user enters invalid
word then we help them to explore more words
similar to the entered word.
 User can find translation of the entered word, also
view the search history and also know ‘word of the
day’ which enables the user to learn a new word
every day.
Algorithm Description
 getnode()
Description: This function returns the address of the newnode.
Method: Allocate space to temporary variable temp and set all its alphabet node
to NULL.Return temp.
 printHistory()
Description: This function prints the history of searched words.
Method: Open the history file in read mode and read all the words one by one and
display it
 addHistory(key)
Description: This function adds a word in the history file.
Method: Open the history file in write mode and write the contents of key to it.
 insert(root,key)
Description: This function inserts a word in TRIE.
Method: Access the TRIE from the root and set all the nodes (which come in the
key) to TRUE and when the end of the word is reached then store the key in the
fname field.
 search(root,key)
Description: This function searches for a key in TRIE.
Method: Search each character level by level and if a specific character at a
certain level does not exist then return false which means that the word does not
exist . If all the characters exist then return TRUE.
 insert_word(key)
Description: This function inserts a new word in the Dictionary.
Method: Store the word in TRIE.Store the meaning and description of the word in
a file whose name is the word stored in key.
 printData(key)
Description: This function prints data from file name stored in key variable.
Method: Open the file (whose name is stored in key field) and access all the
characters and print them.
 search_similar(root,key)
Description: This function prints word similar to the word stored in key variable.
Method: Access the TRIE from the root and if even if one of the letter in key
variable doesn’t exist then the corresponding existing variable is accessed and the
similar word is found.If none of the corresponding variable exist then print “The
word doesn’t exist.”
 wordRead(filename,choice)
Description: This function prints the French word or Spanish word of a given
word.
Method: Ask the user to enter a word.Open the file(filename contains the name
of the file) and search all the records one by one if the word entered by the user is
found then the corresponding French or Spanish word is printed based on the
choice of the user.
 wordOfTheDay(root)
Description: This function prints the word of the day.
Method: Randomly generate any number and fetch the word from that location of
the file(words.txt) and store it in file t_date and print the description of the word.
Why did we use TRIE?
 A Dictionary can also be implemented using other concepts
(e.g. HASH TABLES).
 Searching for data in a TRIE is faster.
 free from collision.
 no need to choose a hash function.
 predetermined alphabetical ordering.
 find words with common prefix.
 Time Complexity:
 We can search the key in O(M) time; M is length of the
string.
 Space Complexity:
 Memory requirements of TRIE is O(ALPHABET_SIZE *
key length * N) where N is number of keys in TRIE.
Features of Project
1. Find meaning, description, synonyms,
antonyms and examples of the entered word.
2. Insert new word in dictionary.
3. Find Similar words of the entered word.
4. Know ‘word of the day’.
5. Find translation of the entered word (English)
in French & Spanish.
6. View search history.
Input Output Screen Shots
 Searching for a word  Similar words
 Inserting a word & then searching for it
 Finding translation
 Word of the day
Advantages
 All in One!!
 We have made an application which not only a simple dictionary which
tells you the meaning of the entered word but also it tells you the whole
description, synonyms, antonyms and practical use of that word in a
sentence.
 Even this is not the only feature but we created another application of Word
Translation in this only which gives us the translation of entered word in
either French or in Spanish
 It provides Word of the Day which means every day our code will generate a
random word from its memory and will give all the data related to it. One
can learn at least a new word in a day and can increase his/her vocabulary
using our application.
 Our application can correct a wrong word as well. So in spite of displaying
“Word not Found” like in case of many other dictionaries ,ours gives you
Suggestions
 Currently we have just 50-55 words in our dictionary but at any point of
time one can Add a new Words in the Dictionary by first entering Password
for the Safety.
 We are also providing List of Frequently Searched Words. So to decrease the
time complexity if the searched word is one of the Frequently searched word
then our code will directly print the data of that file and if not than first
traverse the TRIE than print the data.
Disadvantages
 Add New Word: While we do provide the functionality to add new words
into the dictionary, though there is an inherent flaw in it - the person
might enter any arbitrary sequence of characters (which the 'Trie '
identifies as a word).
 For example - the person might enter 'asdfg' as a
word into the file. Our program cannot distinguish between an arbitrary
sequence of characters and a valid English word.
 This basically implies that the software can be easily
corrupted.
 Deletion of a word: It can only be done by explicitly opening the text file
containing the data and then deleting it.
 Memory Consumption: Due to our lack of knowledge and time as well we
have not implemented Word Scraping. So currently we are storing each
data in Text File which consumes more memory but if we had used word
scraping then our code might not be using any amount of memory.
 Less Words : Though at any point of time one can Add new Words in our
Dictionary but currently we have just 50-55 words in our dictionary
 Search Incorrectly Spelled Word: We do have implemented an algorithm in
which similar words to the incorrect word entered are shown to the user,
but have not implemented anything which corrects the words which are
spelled incorrectly.
Real World Application of TRIE
 Auto complete in web searching
 Spell checker (Auto correct)
 Word game
 Dictionary
 Longest prefix matching
 Translator
 Criminology
 Phone book search
Thank You…!! 

More Related Content

What's hot

Coding theory updated
Coding theory updatedCoding theory updated
Coding theory updated14cs40128
 
Data Structures - Lecture 8 [Sorting Algorithms]
Data Structures - Lecture 8 [Sorting Algorithms]Data Structures - Lecture 8 [Sorting Algorithms]
Data Structures - Lecture 8 [Sorting Algorithms]Muhammad Hammad Waseem
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First SearchKevin Jadiya
 
Searching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And AlgorithmSearching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And Algorithm03446940736
 
C Language (All Concept)
C Language (All Concept)C Language (All Concept)
C Language (All Concept)sachindane
 
Breadth first search and depth first search
Breadth first search and  depth first searchBreadth first search and  depth first search
Breadth first search and depth first searchHossain Md Shakhawat
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and LexemeA. S. M. Shafi
 
arrays and pointers
arrays and pointersarrays and pointers
arrays and pointersSamiksha Pun
 
Regular expressions in Python
Regular expressions in PythonRegular expressions in Python
Regular expressions in PythonSujith Kumar
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application Tech_MX
 
Unit 2 application of stack
Unit 2  application of stack Unit 2  application of stack
Unit 2 application of stack LavanyaJ28
 
Propositional logic
Propositional logicPropositional logic
Propositional logicRushdi Shams
 

What's hot (20)

Tries data structures
Tries data structuresTries data structures
Tries data structures
 
File handling in c++
File handling in c++File handling in c++
File handling in c++
 
Coding theory updated
Coding theory updatedCoding theory updated
Coding theory updated
 
Data Structures - Lecture 8 [Sorting Algorithms]
Data Structures - Lecture 8 [Sorting Algorithms]Data Structures - Lecture 8 [Sorting Algorithms]
Data Structures - Lecture 8 [Sorting Algorithms]
 
Parsing
ParsingParsing
Parsing
 
Time complexity
Time complexityTime complexity
Time complexity
 
Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First Search
 
Binary search
Binary searchBinary search
Binary search
 
Searching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And AlgorithmSearching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And Algorithm
 
C Language (All Concept)
C Language (All Concept)C Language (All Concept)
C Language (All Concept)
 
Strings
StringsStrings
Strings
 
Breadth first search and depth first search
Breadth first search and  depth first searchBreadth first search and  depth first search
Breadth first search and depth first search
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and Lexeme
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
 
arrays and pointers
arrays and pointersarrays and pointers
arrays and pointers
 
Depth-First Search
Depth-First SearchDepth-First Search
Depth-First Search
 
Regular expressions in Python
Regular expressions in PythonRegular expressions in Python
Regular expressions in Python
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
 
Unit 2 application of stack
Unit 2  application of stack Unit 2  application of stack
Unit 2 application of stack
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 

Similar to Dictionary implementation using TRIE

Full text search
Full text searchFull text search
Full text searchdeleteman
 
Souvenir's Booth - Algorithm Design and Analysis Project Project Report
Souvenir's Booth - Algorithm Design and Analysis Project Project ReportSouvenir's Booth - Algorithm Design and Analysis Project Project Report
Souvenir's Booth - Algorithm Design and Analysis Project Project ReportAkshit Arora
 
MACHINE-DRIVEN TEXT ANALYSIS
MACHINE-DRIVEN TEXT ANALYSISMACHINE-DRIVEN TEXT ANALYSIS
MACHINE-DRIVEN TEXT ANALYSISMassimo Schenone
 
An Extensible Multilingual Open Source Lemmatizer
An Extensible Multilingual Open Source LemmatizerAn Extensible Multilingual Open Source Lemmatizer
An Extensible Multilingual Open Source LemmatizerCOMRADES project
 
Stemming is one of several text normalization techniques that converts raw te...
Stemming is one of several text normalization techniques that converts raw te...Stemming is one of several text normalization techniques that converts raw te...
Stemming is one of several text normalization techniques that converts raw te...NALESVPMEngg
 
python full notes data types string and tuple
python full notes data types string and tuplepython full notes data types string and tuple
python full notes data types string and tupleSukhpreetSingh519414
 
The Ring programming language version 1.5.4 book - Part 178 of 185
The Ring programming language version 1.5.4 book - Part 178 of 185The Ring programming language version 1.5.4 book - Part 178 of 185
The Ring programming language version 1.5.4 book - Part 178 of 185Mahmoud Samir Fayed
 
This program here prints the number of words that occurs in the inpu.pdf
This program here prints the number of words that occurs in the inpu.pdfThis program here prints the number of words that occurs in the inpu.pdf
This program here prints the number of words that occurs in the inpu.pdfshanki7
 
"the Bund" language. A PEG grammar.
"the Bund" language. A PEG grammar."the Bund" language. A PEG grammar.
"the Bund" language. A PEG grammar.Vladimir Ulogov
 
The Ring programming language version 1.5.2 book - Part 174 of 181
The Ring programming language version 1.5.2 book - Part 174 of 181The Ring programming language version 1.5.2 book - Part 174 of 181
The Ring programming language version 1.5.2 book - Part 174 of 181Mahmoud Samir Fayed
 
Unsupervised Software-Specific Morphological Forms Inference from Informal Di...
Unsupervised Software-Specific Morphological Forms Inference from Informal Di...Unsupervised Software-Specific Morphological Forms Inference from Informal Di...
Unsupervised Software-Specific Morphological Forms Inference from Informal Di...Chunyang Chen
 
EasyChair-Preprint-7375.pdf
EasyChair-Preprint-7375.pdfEasyChair-Preprint-7375.pdf
EasyChair-Preprint-7375.pdfNohaGhoweil
 
Haystack 2018 - Algorithmic Extraction of Keywords Concepts and Vocabularies
Haystack 2018 - Algorithmic Extraction of Keywords Concepts and VocabulariesHaystack 2018 - Algorithmic Extraction of Keywords Concepts and Vocabularies
Haystack 2018 - Algorithmic Extraction of Keywords Concepts and VocabulariesMax Irwin
 
Sentence analysis
Sentence analysisSentence analysis
Sentence analysiskrukob9
 
GPT for polyglots and language learners.pptx
GPT for polyglots and language learners.pptxGPT for polyglots and language learners.pptx
GPT for polyglots and language learners.pptxAlexander Galkin
 
An Intuitive Natural Language Understanding System
An Intuitive Natural Language Understanding SystemAn Intuitive Natural Language Understanding System
An Intuitive Natural Language Understanding Systeminscit2006
 
Clean code lecture part I
Clean code lecture part IClean code lecture part I
Clean code lecture part IJun Shimizu
 

Similar to Dictionary implementation using TRIE (20)

Full text search
Full text searchFull text search
Full text search
 
Souvenir's Booth - Algorithm Design and Analysis Project Project Report
Souvenir's Booth - Algorithm Design and Analysis Project Project ReportSouvenir's Booth - Algorithm Design and Analysis Project Project Report
Souvenir's Booth - Algorithm Design and Analysis Project Project Report
 
MACHINE-DRIVEN TEXT ANALYSIS
MACHINE-DRIVEN TEXT ANALYSISMACHINE-DRIVEN TEXT ANALYSIS
MACHINE-DRIVEN TEXT ANALYSIS
 
An Extensible Multilingual Open Source Lemmatizer
An Extensible Multilingual Open Source LemmatizerAn Extensible Multilingual Open Source Lemmatizer
An Extensible Multilingual Open Source Lemmatizer
 
Stemming is one of several text normalization techniques that converts raw te...
Stemming is one of several text normalization techniques that converts raw te...Stemming is one of several text normalization techniques that converts raw te...
Stemming is one of several text normalization techniques that converts raw te...
 
python full notes data types string and tuple
python full notes data types string and tuplepython full notes data types string and tuple
python full notes data types string and tuple
 
Boolean operators
Boolean operatorsBoolean operators
Boolean operators
 
The Ring programming language version 1.5.4 book - Part 178 of 185
The Ring programming language version 1.5.4 book - Part 178 of 185The Ring programming language version 1.5.4 book - Part 178 of 185
The Ring programming language version 1.5.4 book - Part 178 of 185
 
This program here prints the number of words that occurs in the inpu.pdf
This program here prints the number of words that occurs in the inpu.pdfThis program here prints the number of words that occurs in the inpu.pdf
This program here prints the number of words that occurs in the inpu.pdf
 
Parser
ParserParser
Parser
 
"the Bund" language. A PEG grammar.
"the Bund" language. A PEG grammar."the Bund" language. A PEG grammar.
"the Bund" language. A PEG grammar.
 
The Ring programming language version 1.5.2 book - Part 174 of 181
The Ring programming language version 1.5.2 book - Part 174 of 181The Ring programming language version 1.5.2 book - Part 174 of 181
The Ring programming language version 1.5.2 book - Part 174 of 181
 
Unsupervised Software-Specific Morphological Forms Inference from Informal Di...
Unsupervised Software-Specific Morphological Forms Inference from Informal Di...Unsupervised Software-Specific Morphological Forms Inference from Informal Di...
Unsupervised Software-Specific Morphological Forms Inference from Informal Di...
 
EasyChair-Preprint-7375.pdf
EasyChair-Preprint-7375.pdfEasyChair-Preprint-7375.pdf
EasyChair-Preprint-7375.pdf
 
Haystack 2018 - Algorithmic Extraction of Keywords Concepts and Vocabularies
Haystack 2018 - Algorithmic Extraction of Keywords Concepts and VocabulariesHaystack 2018 - Algorithmic Extraction of Keywords Concepts and Vocabularies
Haystack 2018 - Algorithmic Extraction of Keywords Concepts and Vocabularies
 
Sentence analysis
Sentence analysisSentence analysis
Sentence analysis
 
GPT for polyglots and language learners.pptx
GPT for polyglots and language learners.pptxGPT for polyglots and language learners.pptx
GPT for polyglots and language learners.pptx
 
An Intuitive Natural Language Understanding System
An Intuitive Natural Language Understanding SystemAn Intuitive Natural Language Understanding System
An Intuitive Natural Language Understanding System
 
Clean code lecture part I
Clean code lecture part IClean code lecture part I
Clean code lecture part I
 
G0361034038
G0361034038G0361034038
G0361034038
 

More from Charmi Chokshi

Deep learning with tensorflow
Deep learning with tensorflowDeep learning with tensorflow
Deep learning with tensorflowCharmi Chokshi
 
From ELIZA to Alexa and Beyond
From ELIZA to Alexa and BeyondFrom ELIZA to Alexa and Beyond
From ELIZA to Alexa and BeyondCharmi Chokshi
 
Trade relations US & India; the changing faces
Trade relations US & India; the changing facesTrade relations US & India; the changing faces
Trade relations US & India; the changing facesCharmi Chokshi
 
Public vs private sector banks in india
Public vs private sector banks in indiaPublic vs private sector banks in india
Public vs private sector banks in indiaCharmi Chokshi
 
Market analysis of pencil
Market analysis of pencilMarket analysis of pencil
Market analysis of pencilCharmi Chokshi
 
Indian agriculture sector, Issues Related to Minimum Support Price, Subsidies...
Indian agriculture sector, Issues Related to Minimum Support Price, Subsidies...Indian agriculture sector, Issues Related to Minimum Support Price, Subsidies...
Indian agriculture sector, Issues Related to Minimum Support Price, Subsidies...Charmi Chokshi
 
Face recognition system using Hidden Markov Model
Face recognition system using Hidden Markov ModelFace recognition system using Hidden Markov Model
Face recognition system using Hidden Markov ModelCharmi Chokshi
 
Educational Resource Management System
Educational Resource Management SystemEducational Resource Management System
Educational Resource Management SystemCharmi Chokshi
 

More from Charmi Chokshi (14)

Deep learning with tensorflow
Deep learning with tensorflowDeep learning with tensorflow
Deep learning with tensorflow
 
Charmi chokshi ppt
Charmi chokshi pptCharmi chokshi ppt
Charmi chokshi ppt
 
From ELIZA to Alexa and Beyond
From ELIZA to Alexa and BeyondFrom ELIZA to Alexa and Beyond
From ELIZA to Alexa and Beyond
 
Report smart dustbin
Report smart dustbinReport smart dustbin
Report smart dustbin
 
Os prj ppt
Os prj pptOs prj ppt
Os prj ppt
 
magazine
magazinemagazine
magazine
 
Radio
RadioRadio
Radio
 
Trade relations US & India; the changing faces
Trade relations US & India; the changing facesTrade relations US & India; the changing faces
Trade relations US & India; the changing faces
 
Public vs private sector banks in india
Public vs private sector banks in indiaPublic vs private sector banks in india
Public vs private sector banks in india
 
Market analysis of pencil
Market analysis of pencilMarket analysis of pencil
Market analysis of pencil
 
Indian agriculture sector, Issues Related to Minimum Support Price, Subsidies...
Indian agriculture sector, Issues Related to Minimum Support Price, Subsidies...Indian agriculture sector, Issues Related to Minimum Support Price, Subsidies...
Indian agriculture sector, Issues Related to Minimum Support Price, Subsidies...
 
Face recognition system using Hidden Markov Model
Face recognition system using Hidden Markov ModelFace recognition system using Hidden Markov Model
Face recognition system using Hidden Markov Model
 
Educational Resource Management System
Educational Resource Management SystemEducational Resource Management System
Educational Resource Management System
 
8 bit mips-processor
8 bit mips-processor8 bit mips-processor
8 bit mips-processor
 

Recently uploaded

DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaOmar Fathy
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf203318pmpc
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 

Recently uploaded (20)

DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 

Dictionary implementation using TRIE

  • 1. Data Structures & Algorithms Project Title: Dictionary Implementation Using TRIE
  • 2. Problem Statement  Through our project we intend to help our user to find the meaning, synonyms, antonyms and examples of an entered word and if the user enters invalid word then we help them to explore more words similar to the entered word.  User can find translation of the entered word, also view the search history and also know ‘word of the day’ which enables the user to learn a new word every day.
  • 3. Algorithm Description  getnode() Description: This function returns the address of the newnode. Method: Allocate space to temporary variable temp and set all its alphabet node to NULL.Return temp.  printHistory() Description: This function prints the history of searched words. Method: Open the history file in read mode and read all the words one by one and display it  addHistory(key) Description: This function adds a word in the history file. Method: Open the history file in write mode and write the contents of key to it.  insert(root,key) Description: This function inserts a word in TRIE. Method: Access the TRIE from the root and set all the nodes (which come in the key) to TRUE and when the end of the word is reached then store the key in the fname field.  search(root,key) Description: This function searches for a key in TRIE. Method: Search each character level by level and if a specific character at a certain level does not exist then return false which means that the word does not exist . If all the characters exist then return TRUE.
  • 4.  insert_word(key) Description: This function inserts a new word in the Dictionary. Method: Store the word in TRIE.Store the meaning and description of the word in a file whose name is the word stored in key.  printData(key) Description: This function prints data from file name stored in key variable. Method: Open the file (whose name is stored in key field) and access all the characters and print them.  search_similar(root,key) Description: This function prints word similar to the word stored in key variable. Method: Access the TRIE from the root and if even if one of the letter in key variable doesn’t exist then the corresponding existing variable is accessed and the similar word is found.If none of the corresponding variable exist then print “The word doesn’t exist.”  wordRead(filename,choice) Description: This function prints the French word or Spanish word of a given word. Method: Ask the user to enter a word.Open the file(filename contains the name of the file) and search all the records one by one if the word entered by the user is found then the corresponding French or Spanish word is printed based on the choice of the user.  wordOfTheDay(root) Description: This function prints the word of the day. Method: Randomly generate any number and fetch the word from that location of the file(words.txt) and store it in file t_date and print the description of the word.
  • 5. Why did we use TRIE?  A Dictionary can also be implemented using other concepts (e.g. HASH TABLES).  Searching for data in a TRIE is faster.  free from collision.  no need to choose a hash function.  predetermined alphabetical ordering.  find words with common prefix.  Time Complexity:  We can search the key in O(M) time; M is length of the string.  Space Complexity:  Memory requirements of TRIE is O(ALPHABET_SIZE * key length * N) where N is number of keys in TRIE.
  • 6. Features of Project 1. Find meaning, description, synonyms, antonyms and examples of the entered word. 2. Insert new word in dictionary. 3. Find Similar words of the entered word. 4. Know ‘word of the day’. 5. Find translation of the entered word (English) in French & Spanish. 6. View search history.
  • 7. Input Output Screen Shots  Searching for a word  Similar words
  • 8.  Inserting a word & then searching for it
  • 9.  Finding translation  Word of the day
  • 10. Advantages  All in One!!  We have made an application which not only a simple dictionary which tells you the meaning of the entered word but also it tells you the whole description, synonyms, antonyms and practical use of that word in a sentence.  Even this is not the only feature but we created another application of Word Translation in this only which gives us the translation of entered word in either French or in Spanish  It provides Word of the Day which means every day our code will generate a random word from its memory and will give all the data related to it. One can learn at least a new word in a day and can increase his/her vocabulary using our application.  Our application can correct a wrong word as well. So in spite of displaying “Word not Found” like in case of many other dictionaries ,ours gives you Suggestions  Currently we have just 50-55 words in our dictionary but at any point of time one can Add a new Words in the Dictionary by first entering Password for the Safety.  We are also providing List of Frequently Searched Words. So to decrease the time complexity if the searched word is one of the Frequently searched word then our code will directly print the data of that file and if not than first traverse the TRIE than print the data.
  • 11. Disadvantages  Add New Word: While we do provide the functionality to add new words into the dictionary, though there is an inherent flaw in it - the person might enter any arbitrary sequence of characters (which the 'Trie ' identifies as a word).  For example - the person might enter 'asdfg' as a word into the file. Our program cannot distinguish between an arbitrary sequence of characters and a valid English word.  This basically implies that the software can be easily corrupted.  Deletion of a word: It can only be done by explicitly opening the text file containing the data and then deleting it.  Memory Consumption: Due to our lack of knowledge and time as well we have not implemented Word Scraping. So currently we are storing each data in Text File which consumes more memory but if we had used word scraping then our code might not be using any amount of memory.  Less Words : Though at any point of time one can Add new Words in our Dictionary but currently we have just 50-55 words in our dictionary  Search Incorrectly Spelled Word: We do have implemented an algorithm in which similar words to the incorrect word entered are shown to the user, but have not implemented anything which corrects the words which are spelled incorrectly.
  • 12. Real World Application of TRIE  Auto complete in web searching  Spell checker (Auto correct)  Word game  Dictionary  Longest prefix matching  Translator  Criminology  Phone book search