# NLP - paraphrase extraction in python

I am trying to develop a NLP model, which takes something like you have high levels of cholesterol(this will be a tag) as input and has to output something like you have high levels of cholesterol, you need to have a low-salt diet that emphasizes fruits, vegetables and whole grains; limit the amount of animal fats and use good fats in moderation(this will be the suggestion; and it is an example suggestion from doctor).

So, now when i was researching on how this could be accomplished i stumbled on this research paper and i learned about something called paraphrase extraction from it. and also that i need to build a parallel corpus with tag and suggestion.

I want to do this in python. I couldn't find much information from internet on how paraphrase extraction can be done in python, but there are many articles talking about paraphrase detection and things. So, do we have any libraries in python for this purpose? or any kind of help is appreciated. How do i build a corpus for this same pupose?

Paraphrase detection is still a very active and very challenging research area, so it's unlikely that there are full-fledged standard libraries for this task since there is still no clear "best solution" to this problem.

In order to build a corpus you might want to look at how shared tasks/competitions have done it before. I know at least of SemEval which often proposes tasks related to paraphrases (there might be others). I haven't checked but usually the overview paper of the task (e.g. here) explains how the corpus was built and presents the main approaches submitted by participants.