can u pls help me in my project.. considering that u have a textfile then you try to search a word from the file, which i was able to implement, how can i show its synonyms? i got a list of synonyms from project gutenberg but im having a hard time on how to use it well for the word search.
thesaurus in c
Collapse
X
-
Tags: None
-
You could try using an array of linked lists. Each linked list will hold the original word (as the first element) and any synonyms (anything after the 1st element). The array, then, holds the address of each linked list. As you read your file, you can create a new word, add it to a linked list, then add the rest of the words to the list, and finally put the finished list in the first element of the array, then move on. -
The problem with link-lists would be that there would be an excessive amount of memory or storage used. Why, as previously stated:Each linked list will hold the original word (as the first element) and any synonyms (anything after the 1st element).Comment
-
yes but using maps for example, will result in less coding, easier implamentation through this massive container. it could even allow someone to be creative and only load certain ranges of words and leave the rest in a file. creating a link-list and iterating through memory addresses can be time consuming. that is all.Comment
Comment