chatterbot-corpus icon indicating copy to clipboard operation
chatterbot-corpus copied to clipboard

Deep learning chatbot

Open patilomkar865 opened this issue 5 years ago • 0 comments

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(' '))<hp.max_length and len(target.split(' '))<hp.max_length:

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

patilomkar865 avatar Oct 24 '19 14:10 patilomkar865