chakki-works/seqeval

wrong answer abou BIEOS。。。

Closed this issue · 4 comments

老哥,你找到更好的方法了吗??

我自己手写了。 可以定义规则来得到你想要的

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