Jieba库分词词性标注以及词性说明

分词实例

import jieba

import jieba.analyse

import jieba.posseg

def dosegment_al(sentence):

"""
带词性标注,对句子进行分词,不排除停词等
"""
sentence_seged = jieba.posseg.cut(sentence.strip())
outStr = ''
for x in setence_seged:
    outStr += "{}/{}".format(x.world,x.flag)
return outStr

词性标注表