You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.py 339 B

6 years ago
6 years ago
6 years ago
123456789101112131415161718
  1. import jiagu
  2. # jiagu.init() # 可手动初始化,也可以动态初始化
  3. text = '厦门明天会不会下雨'
  4. words = jiagu.seg(text) # 分词
  5. print(words)
  6. words = jiagu.seg(text, model="mmseg") # mmseg分词
  7. print(words)
  8. pos = jiagu.pos(words) # 词性标注
  9. print(pos)
  10. ner = jiagu.ner(text) # 命名实体识别
  11. print(ner)

Jiagu使用大规模语料训练而成。将提供中文分词、词性标注、命名实体识别、情感分析、知识图谱关系抽取、关键词抽取、文本摘要、新词发现、情感分析、文本聚类等常用自然语言处理功能。参考了各大工具优缺点制作,将Jiagu回馈给大家