Python Chat Bot Tutorial – Chatbot with Deep Learning (Part 2)




[ad_1]

Welcome to part 2 of creating a chatbot with deep learning and python. In this part of the series we continue to preprocess our data into whats known as a bag of words! This will allow us to feed numerical data to our model in the next part.

Text-Based Tutorial: https://techwithtim.net/tutorials/ai-chatbot/part-2/

Playlist: https://www.youtube.com/watch?v=wypVcNIH6D4&list=PLzMcBGfZo4-ndH9FoC4YWHGXG5RZekt-Q

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
https://tech-with-tim.teachable.com/p

📸 Instagram: https://www.instagram.com/tech_with_tim
🌎 Website https://techwithtim.net
📱 Twitter: https://twitter.com/TechWithTimm
⭐ Discord: https://discord.gg/pr2k55t
📝 LinkedIn: https://www.linkedin.com/in/tim-rusci
📂 GitHub: https://github.com/techwithtim
🔊 Podcast: https://anchor.fm/tech-with-tim

💵 One-Time Donations: https://www.paypal.com/donate/?token=
💰 Patreon: https://www.patreon.com/techwithtim
◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

Tags:
– Tech With Tim
– Python Chat bot
– Chat bot tutorial python
– Python chat bot tutorial
– Deeplearning chatbot python
– Python Tutorials

Source


[ad_2]

Comment List

  • Tech With Tim
    December 28, 2020
  • Tech With Tim
    December 28, 2020

    I like the how you act while looking your 2nd screen and pretending like you are not sure about the code lol. Well it's a year old tut. so I hope you are improved yourself.

  • Tech With Tim
    December 28, 2020

    This is helpful! With a response rate of 80-90%, a well optimised chatbot is a must-have for every business. Check out how you can engage with customers better while driving efficiency with a free demo with Engati – http://s.engati.com/2r5

  • Tech With Tim
    December 28, 2020

    Why should not we shuffle our data? I did not get that part. It would be great if you can explain that. Thanks

  • Tech With Tim
    December 28, 2020

    So it says cudart64_101.dll not found but I can't install cuda because I don't have nvidia

  • Tech With Tim
    December 28, 2020

    so is an encoded bag of words kind of like a hash in which different patterns will always output a different encoded bag of words

  • Tech With Tim
    December 28, 2020

    I have used Python3.7 and got this.. Please let me know what is going on..
    Start talking with the bot!
    You: hi
    [0.16667077 0.16666429 0.16666432 0.16666903 0.16666634 0.1666652 ]
    age
    I didn't get that, try again.y

  • Tech With Tim
    December 28, 2020

    Traceback (most recent call last):
    File "E:TECH_ERA PROJECTapp.py", line 13, in <module>
    data = json.load(file)
    File "C:UsersDELLAppDataLocalProgramsPythonPython37libjson__init__.py", line 296, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
    File "C:UsersDELLAppDataLocalProgramsPythonPython37libjson__init__.py", line 348, in loads
    return _default_decoder.decode(s)
    File "C:UsersDELLAppDataLocalProgramsPythonPython37libjsondecoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "C:UsersDELLAppDataLocalProgramsPythonPython37libjsondecoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 33 column 80 (char 1745)

    How to resolve this error !!?? Can someone pls send the code !

  • Tech With Tim
    December 28, 2020

    When i am running the code the is a ValueError: ['tag'] is not in list. Does anyone have any idea why is this happening??

  • Tech With Tim
    December 28, 2020

    stem() missing 1 required positional argument: 'word'

    did anyone had the same error?

  • Tech With Tim
    December 28, 2020

    How can we train our model to respond to the dynamic values

  • Tech With Tim
    December 28, 2020

    Resource punkt not found.
    Please use the NLTK Downloader to obtain the resource:
    what's this error?

  • Tech With Tim
    December 28, 2020

    What kind of algorithm are you using bro?

  • Tech With Tim
    December 28, 2020

    TypeError: _append_dispatcher() missing 1 required positional argument: 'values'
    please help with this

  • Tech With Tim
    December 28, 2020

    Can someone tell me how to embedd this in wabpage

  • Tech With Tim
    December 28, 2020

    Thank you, Tim for making these awesome videos! I have learned so much!

  • Tech With Tim
    December 28, 2020

    hi, amazing tutorial.i have one question, if i wanted my bot to be able to recognize synonyms using wordnet's sysnsets, how would i implement that?

  • Tech With Tim
    December 28, 2020

    Traceback (most recent call last):

    File "C:UsersadminPycharmProjectsmymain.py", line 31, in <module>

    words = [stemmer.stem(w.lower()) for w in words if w not in "?"]
    File "C:UsersadminPycharmProjectsmymain.py", line 31, in <listcomp>

    words = [stemmer.stem(w.lower()) for w in words if w not in "?"]
    TypeError: stem() missing 1 required positional argument: 'word'

    help pls

  • Tech With Tim
    December 28, 2020

    on line 37 what is classes where did he declare it?

  • Tech With Tim
    December 28, 2020

    Your word classifier is very similar to the Pandas.Get_Dummies function, except I'm not sure that it would take into account the labels part…

  • Tech With Tim
    December 28, 2020

    just a quick question..i still dont quite get the part when he did output_row[abels.index(doc_y[x])]=1. what is the doc_y[x] trying to accomplish? converting the tags to 1?

  • Tech With Tim
    December 28, 2020

    why not just import numpy as np? you know you want to… 😉

  • Tech With Tim
    December 28, 2020

    line 37: out_empty = [0 for _ in range(len(classes))] #should be: out_empty = [0 for _ in range(len(labels))]
    line 57: output = numpy.array(output)
    #or change import numpy as np
    line 56: trainig = np.array(trainig)
    line 57: output = np.array(output)

  • Tech With Tim
    December 28, 2020

    hey tim, it is asked by another user but you haven't answered it so i am asking again
    please reply asap
    for x, doc in enumerate(docs_x):

    bag = []

    wrds = [stemmer.stem(w.lower()) for w in doc]

    isn't that part wrong?

    We get a sentence for doc in each loop. Then we put doc in a loop. Problem occurs here.

    w gets letter in each loop and stem of letter is the same as letter. But we want w gets a word and wrds will be stem of words.

  • Tech With Tim
    December 28, 2020

    Why did you use the LancasterStemmer?

  • Tech With Tim
    December 28, 2020

    Hey Tim, great series. I had a question about the enumeration loop specifically. Does it matter that duplicates aren't being addressed? Within a pattern the same word might be seen more than once ie: "THE weather today is THE hottest it has been", and the conditional "if w in wrds" would evaluate twice and append twice. Also is the one hot encoding model for a bag of words appropriate for a more complex chatbot? How much data does it handle well?

    Edit: I think it might have implications in this line as well: "output_row[labels.index(docs_y[x])] = 1" since .index() will only return the index of the first occurrence.

  • Tech With Tim
    December 28, 2020

    It's showing me
    FileNotFoundError = tensorflow.contrib

  • Tech With Tim
    December 28, 2020

    Great. You make the things clear very well.

Write a comment