Answers for "Spacy customize sentence segmentation"

0

Spacy customize sentence segmentation

#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
Posted by: Guest on August-29-2021

Browse Popular Code Answers by Language