Skip to content

Commit db92469

Browse files
bmccannsoumith
authored andcommitted
preprocess needs to use lower option
1 parent 60960c6 commit db92469

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

OpenNMT/onmt/Dict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def __init__(self, data=None, lower=False):
66
self.idxToLabel = {}
77
self.labelToIdx = {}
88
self.frequencies = {}
9-
self.lower = True
9+
self.lower = lower
1010

1111
# Special entries will not be pruned.
1212
self.special = []

OpenNMT/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
def makeVocabulary(filename, size):
5252
vocab = onmt.Dict([onmt.Constants.PAD_WORD, onmt.Constants.UNK_WORD,
53-
onmt.Constants.BOS_WORD, onmt.Constants.EOS_WORD], lower=True)
53+
onmt.Constants.BOS_WORD, onmt.Constants.EOS_WORD], lower=opt.lower)
5454

5555
with open(filename) as f:
5656
for sent in f.readlines():

0 commit comments

Comments
 (0)