赞
踩
1、textrank的调用,用于提取关键词
- # textrank
- import jieba
- sentence=""
- for x,w in jieba.analyse.textrank(sentence, topk=20, withWeight=True, allowPOS=('ns', 'n', 'vn', 'v')):
- print(f"weight:{x}, word:{w}")
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。