from nltk.chat.util import Chat, reflections
pairs = [
['my name is (.*)', ['hi %1']],
['(hi|hello|hey|holla|hola)', ['hey there', 'hi there', 'haayyy']],
['(.*) created you ?', ['Suraj verma did using NLTK']],
['how (is|was) the weather in (.*)', ['the weather in %1 is amazing like always']]
]
chat = Chat(pairs,reflections)
s="my name is suraj"
print(chat.respond(string))