如何用 Python 中的 NLTK 对中文进行分析和处理

2025-04-30 02:00:14
推荐回答(1个)
回答1:

用到的函数:

nltk.sent_tokenize(text) #对文本按照句子进行分割

nltk.word_tokenize(sent) #对句子进行分词