diff --git a/apply_bpe.py b/apply_bpe.py index a847d9e..acd613d 100644 --- a/apply_bpe.py +++ b/apply_bpe.py @@ -237,7 +237,7 @@ def read_vocabulary(vocab_file, threshold): for line in vocab_file: word, freq = line.strip('\r\n ').split(' ') freq = int(freq) - if threshold == None or freq >= threshold: + if threshold is None or freq >= threshold: vocabulary.add(word) return vocabulary