NhatTuyen commited on
Commit
6088b6d
1 Parent(s): 0a50beb

Update gec_model.py

Browse files

add attribute "incorr_index"

Files changed (1) hide show
  1. gec_model.py +1 -0
gec_model.py CHANGED
@@ -89,6 +89,7 @@ class GecBERTModel(torch.nn.Module):
89
  self.lowercase_tokens = lowercase_tokens
90
  self.min_error_probability = min_error_probability
91
  self.vocab = Vocabulary.from_files(vocab_path)
 
92
  self.log = log
93
  self.iterations = iterations
94
  self.confidence = confidence
 
89
  self.lowercase_tokens = lowercase_tokens
90
  self.min_error_probability = min_error_probability
91
  self.vocab = Vocabulary.from_files(vocab_path)
92
+ self.incorr_index = self.vocab.get_token_index("INCORRECT", "d_tags")
93
  self.log = log
94
  self.iterations = iterations
95
  self.confidence = confidence