Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doubt in metric.py #23

Closed
udion opened this issue Jun 6, 2018 · 4 comments
Closed

doubt in metric.py #23

udion opened this issue Jun 6, 2018 · 4 comments

Comments

@udion
Copy link

udion commented Jun 6, 2018

I think get_ner_BIO() in metric.py is wrong.

consider the example where label_list = [I-MISC, I-MISC, O, I-PER, I-PER, O, O, O, O, O I-ORG, O] according to current function the following will happen :

Since there is no tag involving B-, whole_tag and tag_index will always be [] and hence the output of the function is [] which is wrong?

@udion
Copy link
Author

udion commented Jun 6, 2018

infact in the above case tag_list will have only one null string

@jiesutd
Copy link
Owner

jiesutd commented Jun 6, 2018

The metric is correct. You use the wrong data format, only BIO/BMES format are supported.

You need do more homework before doubt others code.

@jiesutd jiesutd closed this as completed Jun 6, 2018
@udion
Copy link
Author

udion commented Jun 6, 2018

@jiesutd Yes, thank you for pointing that out, the above example is not even correct with respect to BIO or BIOES as first I-MISC is followed by another I-MISC, I just checked and the dataset I was using had other such sentences, I corrected it to BIOES format and It seems to be giving f-score (!=-1)

However, I have no reference to check if my converted dataset is correct, do you have such reference? Does CoNLL website provide BIO and BIOES format as well? (I don't have their dataset directly as it requires some manual authentication/NDA process)

comments?

@jiesutd
Copy link
Owner

jiesutd commented Jun 6, 2018

You can refer this paper https://arxiv.org/pdf/1707.06799.pdf for the difference between BIO/BIOES/IOB.

@udion udion changed the title Error in metric.py doubt in metric.py Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants