wrong answer abou BIEOS。。。
Closed this issue · 4 comments
xuanzebi commented
zyxdSTU commented
老哥,你找到更好的方法了吗??
xuanzebi commented
我自己手写了。 可以定义规则来得到你想要的
Hironsan commented
This will be solved in the following:
https://github.com/chakki-works/seqeval/blob/enhancement/redesign/seqeval/scheme.py
Hironsan commented
As of v1.0.0:
>>> from seqeval.metrics import classification_report
>>> from seqeval.scheme import IOBES
>>> y_true = [['B-PER', 'E-PER', 'S-PER']]
>>> y_pred = [['B-PER', 'I-PER', 'S-PER']]
>>> print(classification_report(y_true, y_pred, mode='strict', scheme=IOBES))
precision recall f1-score support
PER 1.00 0.50 0.67 2
micro avg 1.00 0.50 0.67 2
macro avg 1.00 0.50 0.67 2
weighted avg 1.00 0.50 0.67 2