📜  Spacy 自定义句子分割 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:15.457000             🧑  作者: Mango

代码示例1
#ADD A NEW RULE TO THE PIPELINE
def set_custom_Sentence_end_points(doc):
    for token in doc[:-1]:
        if token.text == ';':
            doc[token.i+1].is_sent_start = True
    return doc