I am currently working with small application in python and my application has search functionality (currently using difflib) but I want to create Semantic Search which can give top 5 or 10 results from my database, based on user inputted text. It is same as google search engine works. I found some solutions Here.
But the problem is, below two statements from one of solution are semantically incorrect. And I don't care about this. because they are making things too hard which I don't want And also solution will be some pretrained neural network model or library from which I can implement easily.
- Pete and Rob have found a dog near the station.
- Pete and Rob have never found a dog near the station
And also I found some solutions which are showing using gensim
and Glove
embeddings and finding similarity between words and not sentences.
What I wanted ?
Suppose my db has statement display classes
and user inputs show
, showed
, displayed
, displayed class
, show types
etc are same. And if above 2 statements are given as same then also I don't care. displayed
and displayed class
already showing in difflib.
Points to be noted
- Find from fixed set of statements but user inputted statements can differ
- Must work for statements