Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/examples
/ __len__
Method
__len__
word_language_model/data.py:16–17 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
14
return
self.word2idx[word]
15
16
def
__len__(self):
17
return
len(self.idx2word)
18
19
20
class
Corpus(object):
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected