cahya commited on
Commit
d2617b7
1 Parent(s): ef9c04d

add run_evaluation.py

Browse files
Files changed (1) hide show
  1. run_evaluation.py +1 -1
run_evaluation.py CHANGED
@@ -21,7 +21,7 @@ class KenLM:
21
  self.beam_width = beam_width
22
  vocab_dict = tokenizer.get_vocab()
23
  self.vocabulary = [x[0] for x in sorted(vocab_dict.items(), key=lambda x: x[1], reverse=False)]
24
- self.vocabulary = self.vocabulary[:-2]
25
  with open(unigrams, "r") as f:
26
  unigrams_text = f.read()
27
  self.decoder = build_ctcdecoder(self.vocabulary, model_name, unigrams=unigrams_text)
 
21
  self.beam_width = beam_width
22
  vocab_dict = tokenizer.get_vocab()
23
  self.vocabulary = [x[0] for x in sorted(vocab_dict.items(), key=lambda x: x[1], reverse=False)]
24
+ self.vocabulary = self.vocabulary[:-1]
25
  with open(unigrams, "r") as f:
26
  unigrams_text = f.read()
27
  self.decoder = build_ctcdecoder(self.vocabulary, model_name, unigrams=unigrams_text)