chakki-works/seqeval

Mute warnings when computing metrics for non-NER labels?

kelseyball opened this issue · 2 comments

Is it possible to mute warnings when computing metrics for e.g. non-NER tasks, e.g. POS tagging? (Or optionally validate labels for NER?) I believe the implementations of precision_score, recall_score, etc. should still work fine for other sequence labeling tasks.

If not, it might be a nice feature to add. Since a warning is raised for each non-NER label, they can add up for larger label sets.

Exactly, it's misleading when used for NON-NER tags. I looked into the code and it seems mostly hardcoded and very difficult to contribute to use existing code for this purpose.

+1 for this. It seems quite odd that it is advertised as being customary to use this script for other tasks such as POS yet when you do so it gives you warnings. Unless it is intended to do IOB POS tagging? I did not know that that was a thing. In any case, it would be useful if these warnings could be disabled.