📌  相关文章
📜  python 将字符串拆分为句子 - Python 代码示例

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

代码示例3
import spacy
nlp = spacy.load('en_core_web_sm') # Load the English Model

string1 = "This is the first sentence. This is the second sentence. This is the third sentence."
doc = nlp(string1)

list(doc.sents)
    
 # Output: ["This is the first sentence.", "This is the second sentence.", "This is the third sentence."]