#This is a basic chatbot


from nltk.chat.util import Chat, reflections
pairs = [
    [
        r"hi|hey|hello",
        ["Hello! what is your name?", "Hey there! what is your name?",]
    ],
    [
        r"my name is (.*)",
        ["Hello I am your assistant How are you today ?",]
    ],
    [
        r"what is your name ?",
        ["My name is chatter and I'm a chatbot ?",]
    ],
    [
        r"how are you ?",
        ["I'm doing good\nHow about You ?",]
    ],
    [
        r"i'm(.*) doing good|same",
        ["Nice to hear that","Alright :)",]
    ],
    [
        r"(.*) age?",
        ["Age is just a number. Let's not talk about it.",]
        
    ],
    [
        r"(.*)color ?",
        ["I love all colours.",]
        
    ],
    [
        r"(.*)created|create",
        ["Vishal Naik created me",]
     
    ],


    [
        r"okay|ok|Hmm|Hmm",
        ["I am not interested",]
	],


	[
        r"quit",
        ["See you soon!",]
	],
]


def BOTB():
    print("Hi, I am chatter, I love to have conversations") #Chat Opener
    chat = Chat(pairs, reflections) # Create an object
    chat.converse() #to have a conversation

if __name__ == "__main__":
    BOTB() #call function to start the conversation

0f6f29e3253b8e06108e875212d7cb13a3656ef5
<mask token>

<mask token>


def BOTB():
    print('Hi, I am chatter, I love to have conversations')
    chat = Chat(pairs, reflections)
    chat.converse()


if __name__ == '__main__':
    BOTB()

<mask token>
pairs = [['hi|hey|hello', ['Hello! what is your name?',
    'Hey there! what is your name?']], ['my name is (.*)', [
    'Hello I am your assistant How are you today ?']], [
    'what is your name ?', ["My name is chatter and I'm a chatbot ?"]], [
    'how are you ?', ["""I'm doing good
How about You ?"""]], [
    "i'm(.*) doing good|same", ['Nice to hear that', 'Alright :)']], [
    '(.*) age?', ["Age is just a number. Let's not talk about it."]], [
    '(.*)color ?', ['I love all colours.']], ['(.*)created|create', [
    'Vishal Naik created me']], ['okay|ok|Hmm|Hmm', ['I am not interested']
    ], ['quit', ['See you soon!']]]


def BOTB():
    print('Hi, I am chatter, I love to have conversations')
    chat = Chat(pairs, reflections)
    chat.converse()


if __name__ == '__main__':
    BOTB()

from nltk.chat.util import Chat, reflections
pairs = [['hi|hey|hello', ['Hello! what is your name?',
    'Hey there! what is your name?']], ['my name is (.*)', [
    'Hello I am your assistant How are you today ?']], [
    'what is your name ?', ["My name is chatter and I'm a chatbot ?"]], [
    'how are you ?', ["""I'm doing good
How about You ?"""]], [
    "i'm(.*) doing good|same", ['Nice to hear that', 'Alright :)']], [
    '(.*) age?', ["Age is just a number. Let's not talk about it."]], [
    '(.*)color ?', ['I love all colours.']], ['(.*)created|create', [
    'Vishal Naik created me']], ['okay|ok|Hmm|Hmm', ['I am not interested']
    ], ['quit', ['See you soon!']]]


def BOTB():
    print('Hi, I am chatter, I love to have conversations')
    chat = Chat(pairs, reflections)
    chat.converse()


if __name__ == '__main__':
    BOTB()

#This is a basic chatbot


from nltk.chat.util import Chat, reflections
pairs = [
    [
        r"hi|hey|hello",
        ["Hello! what is your name?", "Hey there! what is your name?",]
    ],
    [
        r"my name is (.*)",
        ["Hello I am your assistant How are you today ?",]
    ],
    [
        r"what is your name ?",
        ["My name is chatter and I'm a chatbot ?",]
    ],
    [
        r"how are you ?",
        ["I'm doing good\nHow about You ?",]
    ],
    [
        r"i'm(.*) doing good|same",
        ["Nice to hear that","Alright :)",]
    ],
    [
        r"(.*) age?",
        ["Age is just a number. Let's not talk about it.",]
        
    ],
    [
        r"(.*)color ?",
        ["I love all colours.",]
        
    ],
    [
        r"(.*)created|create",
        ["Vishal Naik created me",]
     
    ],


    [
        r"okay|ok|Hmm|Hmm",
        ["I am not interested",]
	],


	[
        r"quit",
        ["See you soon!",]
	],
]


def BOTB():
    print("Hi, I am chatter, I love to have conversations") #Chat Opener
    chat = Chat(pairs, reflections) # Create an object
    chat.converse() #to have a conversation

if __name__ == "__main__":
    BOTB() #call function to start the conversation
