chilynn / sequence-labeling

307 stars 167 forks source link

confused about the task #13

Closed lemmonation closed 7 years ago

lemmonation commented 7 years ago

Hi I'm reading your code but I'm confused with the task it deal with.

The test output format example is

NBAD<@>NBA

ZZZZZ<@>

Does this means the task is to delete the O labeled character?So it is used for NER only?.

And if I want to use it to segment sequences, i.e., I want to tag the characters as B M E S ,then use B(begin) E(end) and S(single) to segment the sentence, where should I modify this code?Just BILSTM_CRF.test?

Thanks a lot!

chilynn commented 7 years ago

Hi, here the content = "NBAD" and predict label = "BMEO" then I use the regular expression r'BM*E' to match, so it will return "NBA" as an entity and the output format of predict will be NBAD<@>NBA, if no entity is found it will be ZZZZZ<@>

If you want to use "BMES" tag, you can modify the function of extractEntity() of helper.py

Hope this could help you.

lemmonation commented 7 years ago

Thanks a lot