jiesutd / YEDDA

YEDDA: A Lightweight Collaborative Text Span Annotation Tool. Code for ACL 2018 Best Demo Paper Nomination.
Apache License 2.0
1.03k stars 297 forks source link

Cannot recognize and recommend entities right before a newline character #14

Open jinangela opened 6 years ago

jinangela commented 6 years ago

I think in utils/recommend.py, the "## forward maximum matching (FMM)" part, the third condition should change to

elif entity_recognized_list[FMM_end] != 0:

i.e. remove the second part

decode_origin[FMM_end] == '\n'

otherwise, when FMM_end equals the end of a line, decode_origin[FMM_end] is a newline character, then FMM_end will be moved one character backward, which will then make decode_origin[FMM_start:FMM_end] a non-word.