Posts

Showing posts from March, 2019

NLP for ChatBots : How to Train Simple Neural Networks for Sentiment Analysis

Image
Data File: D:/mystuff/comments.txt Data: i love you,pos i hate you,neg i kill you,neg i love to kill you,neg i admire you,pos import numpy as np from sklearn.feature_extraction.text import TfidfVectorizer def  tfidf(x):    vec = TfidfVectorizer()    vec.fit(x)    return vec.transform(x).toarray()  f = open('D:/mystuff/comments.txt') lines = f.readlines() text =[] y=[] for line in lines:   w = line.lower().strip().split(",")   text.append(w[0])   l=0   if w[1]=='pos':     l=1   y.append(l) X = tfidf(text) Y = np.c_[y] print(X) [[0. 0. 0. 0.861037 0. 0.50854232] [0. 0.90275015 0. 0. 0. 0.43016528] [0. 0. 0.861037 0. 0. 0.50854232] [0. 0. 0.50733821 0.50733821 0.62883263 0.29964212] [0.90275015 0. 0. 0. ...

Trainings of Machine Learning, Deep Learning, Artificial Intelligence

Youtube Channel :                                                Contact  6309613028 Sreeram Trainings --------------------------------------------------------------------------------------------------------------- 1. Machine Learning With Python scikit learn and TENSORFLOW See Content: https://docs.google.com/document/d/178a_aC4q1-oKRdxPhTIPshv_5bbfRpNeoRhNzUpX1S4/edit?usp=sharing 2. Natural Language Processing For ChatBots    <iframe width="560" height="315" src="https://www.youtube.com/embed/rJFFtA7xD3I" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> See Content: https://docs.google.com/document/d/1JEcUknAOQbzq05aIiOewDwTsLeaRQtGj0eRxjFlTFac/edit?usp=sharing   3. Artificial Intelligence With  Reinforcement Learning and Deep Reinforcemen...