Skip to content

Commit 9ef025f

Browse files
author
Eric Ihli
authored
Bugfix: pass through vocab/encoding params (#60)
This appears to be a typo. I think the correct behavior is that GoodTuring should take into account a vocab and encoding if given.
1 parent 69b9c12 commit 9ef025f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy_ml/ngram/ngram.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def train(self, corpus_fp, vocab=None, encoding=None):
506506
Specifies the text encoding for corpus. Common entries are 'utf-8',
507507
'utf-8-sig', 'utf-16'. Default is None.
508508
"""
509-
self._train(corpus_fp, vocab=None, encoding=None)
509+
self._train(corpus_fp, vocab=vocab, encoding=encoding)
510510
self._calc_smoothed_counts()
511511

512512
def log_prob(self, words, N):

0 commit comments

Comments
 (0)