NLP笔记
词性标注器
>>> text = nltk.word_tokenize('what are your name?')
>>> text
>>> nltk.pos_tag(text)
[('what', 'WDT'), ('are', 'VBP'), ('your', 'PRP$'), ('name', 'NN'), ('?', '.')]
CC 并列连词
RB 副词
IN 连词
JJ 形容词
帮助文档使用
nltk.help.upenn_tagset( 'RB*')
text = nltk.Text(word.lower() for word in nltk.corpus.brown.words())
text.similar('woman') #找出与woman相似的词
nltk.tag.str2tuple() #已标记的词构建为列表
nltk.corpus.brown.tagged_words()
nltk.corpus.nps_chat.tagged_words()
nltk.corpus.conll2000.tagged_words()
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步