步骤一: keyword_processor = KeywordProcessor()keyword_processor.set_non_word_boundaries(set('-')) #加上该行步骤二: 修改源代码第532行 idx = sequence_end_pos 修改为 idx = sequence_end_pos -1参考地址:GitHub