<jupyter_start><jupyter_text>Descrition: This is a raw Chat Bot :!<jupyter_code># importing the library
from nltk.chat.util import Chat,reflections
pairs=[['my name is (.*)',['hi %1,is there anything i can do for u']],
       ['can you answer my questions',['ya sure,why not']],
      ['(hi|hello|hey|hola|holla)',['hey there','hi there','haayyy']],
      ['(.*) in (.*) is fun',['%1 in %2 is indeed fun :P']],
      ['(.*) (location|city) ?',['Meerut,India']],
      ['(.*) created you(.*)',['UDT created me but he is not father to me lamao...']],
      ['how is the weather out there in (.*)',['the weather in %1 is as freaking as always']],
      ['(.*) help (.*)',['I can help you :)']],
      ['(.*) your name?',['my name is BOT ut~6.2.5']],
      ['can you make me smile',["you are already smiling,ain't you"]],
      ['do you have a crush,be honest',['yes,i like sophia']],
      ['cool',['hehe']],
      ['(.*) alexa|google assistant',['what is it,i was never told about that']],
      ['(.*) speak',['no i cant,but really willing to learn to speak :(']],
      ['oh great',['ya thank you']],
      ['(.*) nationality',['i am proud Indian bot']],
      ['(.*) projects',['who else will do,it could be done with my help easily']],
      ['you are intelligent',['ikr? :)']],
      ['do u abuse?',['no i am not programmed to abuse']],
      ['sorry for wasting your time',['no it was nice talking to u,meet soon :P']],
      ['bye then',['ba bye,have a nice day :)']]]
     
reflections
# creating  our own dummy reflections
#my_dummy_reflections={
#'go':'gone',
 #   'hello':'hey there'
#}
#chat=Chat(pairs,my_dummy_reflections)
#chat._substitute('go to hell')
chat=Chat(pairs,reflections)

# to check how reflection works
#chat._substitute('you were amazing')
chat.converse()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21026490066225165, 'fraction_numerical': 0.003863134657836645, 'mean_word_length': 3.8736559139784945, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '219786', 'license': 'MIT', 'n_tokens_mistral': 636, 'n_tokens_neox': 601, 'n_words': 198, 'path': 'Chat_bot-raw.ipynb', 'repo_name': 'divyanshityagi/ChatBot-raw', 'size': '1812'}