Update BertForSyntaxParsing.py
Browse files- BertForSyntaxParsing.py +2 -0
BertForSyntaxParsing.py
CHANGED
@@ -167,6 +167,8 @@ def parse_logits(input_ids: List[List[int]], sentences: List[str], tokenizer: Be
|
|
167 |
|
168 |
special_toks = tokenizer.all_special_tokens
|
169 |
special_toks.remove(tokenizer.unk_token)
|
|
|
|
|
170 |
for i in range(len(sentences)):
|
171 |
deps = logits.dependency_head_indices[i].tolist()
|
172 |
funcs = logits.function_logits.argmax(-1)[i].tolist()
|
|
|
167 |
|
168 |
special_toks = tokenizer.all_special_tokens
|
169 |
special_toks.remove(tokenizer.unk_token)
|
170 |
+
special_toks.remove(tokenizer.mask_token)
|
171 |
+
|
172 |
for i in range(len(sentences)):
|
173 |
deps = logits.dependency_head_indices[i].tolist()
|
174 |
funcs = logits.function_logits.argmax(-1)[i].tolist()
|