Are there any good NLP APIs for comparing strings in terms of semantic similarity?
I want to create a chatbot which informs the user about traffic at the streets but not in real-time for the moment. I have created a small database with MySQL which has some data stored regarding traffic and I fetch them with a PHP script whenever this is appropriate depending on the interaction of the user with the chatbot.
I wonder how to deal with the case when the user asks variations of the same question which therefore can be answered with the same answer. For example:
- Why is there traffic at High Street?
- What is the cause of traffic at High Street?
- Why did I encounter traffic at High Street?
- I am stuck in traffic at High Street. Why is this?
Obviously, I can start by removing stopwords (e.g. did), by naming entities (e.g. road -> High Street), by defining synonyms and by applying a text similarity measure (e.g. Levenshtein distance etc).
However, I feel like reinventing the wheel if I do this. Therefore, my question is:
Are there any APIs which can compare strings in terms of semantic similarity (without even requiring training)?
I know that there software platforms such as Dialogflow which are suitable for these tasks but still you must explicitly state all the variations of the same question so that you will get the same answer. Therefore, I look for a API where you will explicitly state only one of these variations of the same question (e.g. Why is there traffic at High Street?) and then the API will figure out by itself which other variations are identical to it in terms of meaning or not.
Topic software-recommendation nlp python similarity machine-learning
Category Data Science