摘要: 代码: 1 from pyhanlp import * 2 3 if __name__=="__main__": 4 sentence=HanLP.parseDependency("1998年11月11日,马化腾和同学张志东在广东省深圳市正式注册成" 5 "立‘深圳市腾讯计算机系统有限公司’。") 阅读全文
posted @ 2020-10-15 21:35 博二爷 阅读(1592) 评论(0) 推荐(1) 编辑
摘要: 来源:https://blog.csdn.net/u014258362/article/details/81044286 一、常用 标识 释义 a 形容词 an 名形词 c 连词 d 副词 n 名词 ni 机构相关 nr 人名 ns 地名 p 介词 q 量词 r 代词 t 时间词 uv 连词 v 动 阅读全文
posted @ 2020-10-15 20:56 博二爷 阅读(1327) 评论(0) 推荐(0) 编辑
摘要: 直接上代码 1 #-*- coding:utf-8 -*- 2 from pyhanlp import * 3 4 print("=" * 20 + "命名实体识别与词性标注" + "=" * 30) 5 NLPTokenizer = JClass('com.hankcs.hanlp.tokeniz 阅读全文
posted @ 2020-10-15 20:32 博二爷 阅读(1389) 评论(0) 推荐(0) 编辑
摘要: 直接给代码 1 #-*- coding:utf-8 -*- 2 from pyhanlp import * 3 4 # 中文分词 5 print(HanLP.segment('你好,欢迎在Python中调用HanLP的API')) 6 print("-" * 70) 7 8 print("=" * 阅读全文
posted @ 2020-10-15 20:31 博二爷 阅读(674) 评论(0) 推荐(0) 编辑
摘要: 一:首先要装第三方库 1 pip install pyhanlp 二:复制粘贴以下代码: 1 from pyhanlp import * 2 3 if __name__ == '__main__': 4 text1 = "1998年11月11日,马化腾和同学张志东在广东省深圳市正式注册成立“深圳市腾 阅读全文
posted @ 2020-10-15 20:20 博二爷 阅读(484) 评论(0) 推荐(0) 编辑