Shaltiel commited on
Commit
706324f
1 Parent(s): b3075e8

Upload BertForPrefixMarking.py

Browse files
Files changed (1) hide show
  1. BertForPrefixMarking.py +1 -0
BertForPrefixMarking.py CHANGED
@@ -144,6 +144,7 @@ class BertForPrefixMarking(BertPreTrainedModel):
144
  next_tok_idx = tok_idx + 1
145
  while next_tok_idx < len(tokens) and tokens[next_tok_idx].startswith('##'):
146
  token += tokens[next_tok_idx][2:]
 
147
 
148
  prefix_len = get_predicted_prefix_len_from_logits(token, logit_preds[sent_idx, tok_idx])
149
 
 
144
  next_tok_idx = tok_idx + 1
145
  while next_tok_idx < len(tokens) and tokens[next_tok_idx].startswith('##'):
146
  token += tokens[next_tok_idx][2:]
147
+ next_tok_idx += 1
148
 
149
  prefix_len = get_predicted_prefix_len_from_logits(token, logit_preds[sent_idx, tok_idx])
150