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.
I think in utils/recommend.py, the "## forward maximum matching (FMM)" part, the third condition should change to
i.e. remove the second part
otherwise, when
FMM_end
equals the end of a line,decode_origin[FMM_end]
is a newline character, thenFMM_end
will be moved one character backward, which will then makedecode_origin[FMM_start:FMM_end]
a non-word.