Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

minor comment and print statement fixes #217

Merged
merged 1 commit into from
Jul 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions parlai/core/dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def __init__(self, opt, shared=None):
self.ind2tok[0] = self.null_token

if self.eos_token:
# set special unknown word token
# set special end of sentence token
index = len(self.tok2ind)
self.tok2ind[self.eos_token] = index
self.ind2tok[index] = self.eos_token
Expand Down Expand Up @@ -267,7 +267,7 @@ def load(self, filename):
"""Load pre-existing dictionary in 'token[<TAB>count]' format.
Initialize counts from other dictionary, or 0 if they aren't included.
"""
print('Dictionary: loading existing dictionary from {}.'.format(
print('Dictionary: loading existing dictionary from {}'.format(
filename))
with open(filename) as read:
for line in read:
Expand All @@ -292,7 +292,7 @@ def save(self, filename=None, append=False, sort=True):
If ``sort`` (default ``True``), then first sort the dictionary before saving.
"""
filename = self.opt['model_file'] if filename is None else filename
print('Dictionary: saving dictionary to {}.'.format(filename))
print('Dictionary: saving dictionary to {}'.format(filename))
if sort:
self.sort()

Expand Down