MCPcopy Create free account
hub / github.com/pytorch/tutorials / __init__

Method __init__

beginner_source/chatbot_tutorial.py:269–275  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

267
268class Voc:
269 def __init__(self, name):
270 self.name = name
271 self.trimmed = False
272 self.word2index = {}
273 self.word2count = {}
274 self.index2word = {PAD_token: "PAD", SOS_token: "SOS", EOS_token: "EOS"}
275 self.num_words = 3 # Count SOS, EOS, PAD
276
277 def addSentence(self, sentence):
278 for word in sentence.split(' '):

Callers 4

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected