Text Mining in Python: Steps and Examples
词性标注(Part-of-speech tagging)
词性标注(Part-of-speech tagging)
(自然语言处理文档系列)Penn Treebank词性标记集
import pandas as pd
import numpy as np
import os
import nltk.corpus
from nltk.tokenize import word_tokenize
text = 'Despite the popularity of the term, sociologists have ignored gaslighting, leaving it to be theorized by psychologists'
tex = word_tokenize(text)
for token in tex:
print(nltk.pos_tag([token]))
[('Despite', 'IN')]
[('the', 'DT')]
[('popularity', 'NN')]
[('of', 'IN')]
[('the', 'DT')]
[('term', 'NN')]
[(',', ',')]
[('sociologists', 'NNS')]
[('have', 'VB')]
[('ignored', 'VBN')]
[('gaslighting', 'VBG')]
[(',', ',')]
[('leaving', 'VBG')]
[('it', 'PRP')]
[('to', 'TO')]
[('be', 'VB')]
[('theorized', 'VBN')]
[('by', 'IN')]
[('psychologists', 'NNS')]
http://localhost:9011/
图解自然语言处理的那点事
英语标记集
自然语言处理之分词、命名主体识别、词性、语法分析-stanfordcorenlp-NER(二)