0

I have created one whatsApp chat bot using chat api ,It is working fine ,I am getting the messages and I can send messages also ,but I got one challenge here if user send message I should give auto reponse like if user send like Hello then I should give auto response likeHello ,how are you .

It is like Siri or google Assist how they are responding.

How can I do this challenge, kindly give any suggestion on it .

What I tried:

I have created one table in MYSQL called FAQ and columns are like id,question and Ans.,

**id**          **question**              **Ans**
1          hi                              hi,how are you?
2          hello                           hi, how are you?
3          what is price of shoe           52000/-
4          may I know the price of shoe    52000/-
5          Is 8 size show availabel?        Yes

Here if user send message like what is price of shoe then he will get response like 52000/- but if user send message like what is shoe price or hat is price of shoe? (added ? extra) I am unable send response beacuse I am Matching exatly words .

How can over come this challenge , for that can I use any librarie of php or javascript,please suggest .

I have gone through this page https://www.mysqltutorial.org/mysql-natural-language-search.aspx/ but it happening what I expected .

Thanks Sandeep

hi hi
  • 1
  • 1
  • Use words instead of whole sentences, i mean if the sentence of the user contains words like price then write a detailed response to that question. – DaniyalAhmadSE Dec 05 '20 at 07:15
  • 1
    @DaniyalAhmad I tried that 'natural language processing' from this link https://www.mysqltutorial.org/mysql-natural-language-search.aspx/, I followed all the instruction i did my query like ```SELECT `question` FROM `FAQ` WHERE MATCH(`question`) AGAINST('hello')``` I am getting emty record . – hi hi Dec 07 '20 at 07:49

0 Answers0