Search code examples
nlpdeep-learningrecommendation-engine

Calculating grammar similarity between two sentences


I'm making a program which provides some english sentences which user has to learn more.

For example:

First, I provide a sentence "I have to go school today" to user. Then if the user wants to learn more sentences like that, I find some sentences which have high grammar similarity with that sentence.

I think the only way for providing sentences is to calculate similarity.

Is there a way to calculate grammar similarity between two sentences?

or is there a better way to make that algorithm?

Any advice or suggestions would be appreciated. Thank you.


Solution

  • My approach for solving this problem would be to do a Part Of Speech Tagging of using a tool like NLTK and compare the trees structure of your phrase with your database.

    Other way, if you already have a training dataset, use the WEKA to use a machine learn approach to connect the phrases.