I'm trying to develope in Python a chatbot with nltk library

43 views Asked by At

I'm having problems with "I'm" since I would like that the bot will response to "I'm Sara" with a sentence different from the sentence replying "I'm happy". Does anyone know how to fix it please? Specifically:

    [r"(.*) my name is (.*)",
            ["Hello %2, How are you doing today ?" ]]

for the name sentence and

    [r"(.*) (great|fine|wonderful|ok|okay)", 
            ["Sounds great, lucky you!", "Good to you", ]]

for the feeling. If I type: "I'm great" the bot replies me "Hello great, how are you today?"

Can you please help me?

0

There are 0 answers