I was going through this plagiarism detector and trying to write a program in Haskell which will read a file and replace some of its words with synonyms. Is there any dictionary available for this purpose in Haskell?
Also, if you have any input regarding algorithm or any other input relevant for this problem, like how to avoid changing the context of a statement by replacing a word by its synonyms, then please post it.
is there any dictionary available for this purpose in Haskell?
I would imagine that what you are looking for is a plain text file, something like this:
word1: word1synonym1, word1synonym2, ...
word2: word2synonym1, ...
...
In which case it wouldn't really be Haskell-specific. I'm unaware of any free text-file thesauruses like this, though I imagine if you dig around LibreOffice you would probably find one.
how to avoid changing the context of a statement by replacing a word by its synonyms
This is very hard for a computer to do, afaik. I would suggest not expending much effort working on this aspect of it.
any input regarding algorithm
You may find the concept of edit distance useful for this problem. See Approximate string matching and Wagner-Fischer algorithm.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With