Open gautamig54 opened 4 years ago
One solution I would like to suggest is using Word2vec for vectorising the words in both the sentences and then calculating the score, for example cosine score. The output will be in between 0 and 1. Higher the value, more similar the sentences are.
Hello,
As per the requirement of a chatbot, I feel it is important to have an algorithm which calculates the semantic similarity between the two sentences. For example, In the existing code, similar sentences like, "how are you?" and "how are you doing" have been quoted separately, while the reply will be the same in both cases. Also, these sentences can be framed in many different ways which depends on the user and will not be possible to quote individually. Therefore, we can implement a system which can calculate the semantic similarity between the two sentences. Thus, the code will be more efficient and open to varied queries.