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

Commit

Permalink
minor comment and print statement fixes (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry-E authored and alexholdenmiller committed Jul 17, 2017
1 parent 0c232b4 commit 9ceb2ae
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 9ceb2ae

Please sign in to comment.