gunthercox / chatterbot-corpus

A multilingual dialog corpus
http://chatterbot-corpus.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.36k stars 1.15k forks source link

Deep learning chatbot #161

Open patilomkar865 opened 4 years ago

patilomkar865 commented 4 years ago

TypeError Traceback (most recent call last)

in 21 pairs=[] 22 for input,target in zip(data['input'],data['target']): ---> 23 VOC.index_words(input) 24 VOC.index_words(target) 25 if len(input.split(' ')) in index_words(self, sentence) 8 def index_words(self, sentence): 9 for word in sentence.split(' '): ---> 10 self.index_word(word) 11 12 def index_word(self, word): in index_word(self, word) 12 def index_word(self, word): 13 if word not in self.word2index: ---> 14 self.word2index[word]=self.n_words 15 self.word2count[word]=1 16 self.index2word[self.n_words]=word TypeError: list indices must be integers or slices, not str