Removed unused code

This commit is contained in:
kdavis-mozilla
2018-02-22 10:44:07 +01:00
parent f73f67e310
commit f64c7c78c2

View File

@ -19,8 +19,6 @@ class Dictionary(object):
class Corpus(object):
def __init__(self, path='./data'):
self.dictionary = Dictionary()
self.train = os.path.join(path, 'train.txt')
self.test = os.path.join(path, 'test.txt')
def get_data(self, path, batch_size=20):
# Add words to the dictionary
@ -43,4 +41,4 @@ class Corpus(object):
token += 1
num_batches = ids.size(0) // batch_size
ids = ids[:num_batches*batch_size]
return ids.view(batch_size, -1)
return ids.view(batch_size, -1)