📜  nltk 正则表达式解析器 - Python 代码示例

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

代码示例1
>>> def ie_preprocess(document):
...    sentences = nltk.sent_tokenize(document) 
...    sentences = [nltk.word_tokenize(sent) for sent in sentences] 
...    sentences = [nltk.pos_tag(sent) for sent in sentences]