MCPcopy Index your code
hub / github.com/pytorch/tutorials / addSentence

Method addSentence

beginner_source/chatbot_tutorial.py:277–279  ·  view source on GitHub ↗
(self, sentence)

Source from the content-addressed store, hash-verified

275 self.num_words = 3 # Count SOS, EOS, PAD
276
277 def addSentence(self, sentence):
278 for word in sentence.split(' '):
279 self.addWord(word)
280
281 def addWord(self, word):
282 if word not in self.word2index:

Callers 1

loadPrepareDataFunction · 0.45

Calls 1

addWordMethod · 0.95

Tested by

no test coverage detected