Browse Source

SpanFMetric增加对encoding_type和tag_vocab的检查

tags/v0.4.10
yh_cc 5 years ago
parent
commit
cbe5b347e5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      fastNLP/core/metrics.py

+ 1
- 1
fastNLP/core/metrics.py View File

@@ -505,7 +505,7 @@ def _check_tag_vocab_and_encoding_type(vocab:Vocabulary, encoding_type:str):
for tag, idx in vocab:
if idx in (vocab.unknown_idx, vocab.padding_idx):
continue
tag = tag[:1]
tag = tag[:1].lower()
tag_set.add(tag)
tags = encoding_type
for tag in tag_set:


Loading…
Cancel
Save