allenai / allennlp

An open-source NLP research library, built on PyTorch.
http://www.allennlp.org
Apache License 2.0
11.76k stars 2.25k forks source link

compute span-f1 with label_encoding :"BIOUL" #3156

Open Maybewuss opened 5 years ago

Maybewuss commented 5 years ago

System (please complete the following information):

Question

DeNeutoy commented 5 years ago

Hi,

This is because this code here:

https://github.com/allenai/allennlp/blob/master/allennlp/data/dataset_readers/dataset_utils/span_utils.py#L254

doesn't handle the case of ill formed tag sequences. If you wanted to contribute a fix to allow it to handle ill formed sequences, that would be great!

Maybewuss commented 5 years ago

3169 @DeNeutoy I create a PR to ignore ill-formed spans, thanks !