This is a little project for data structure students
we want to make a straightforward English to Persian dictionary that uses the trie data structure for saving data and finding them.
First of all, you have to add words in the JSON file to a trie Data structure .then you should use a listener on your input text-box whenever somebody adds a letter you have to move on trie tree and print nearest nodes that their isEndOfWord flag is true.
🚨 Alert: using 3rd-party libraries is not allowed.
[
{
"english": "a few",
"farsi": "کمي"
},
{
"english": "a great deal of",
"farsi": "يک دنيا"
},
{
"english": "a handful",
"farsi": "يک مشت"
},
{
"english": "a la garconne",
"farsi": "آلاگارسن"
}
//...
]
All of them are exactly like a simple trie tree. You need to add a variable for saving the meaning of the word if its isEndOfWord flag is true.
https://en.wikipedia.org/wiki/Trie
https://www.geeksforgeeks.org/trie-insert-and-search/
add persian to english dictionary [ ]
the data you need to work on is accessible in two JSON and CSV format.