
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
中文文本分析库,可对文本进行词频统计、情绪分析、话题分析等
功能模块含
pip install textanalyze4sc
from texttool import analyze
df_data = analyze.load_data(the path of your data)
df_data_key=analyze.get_keyword(df_data)
df_data_entity=analyze.get_entity(df_data)
这里提供两种粒度的情感分析。
1,这里分为三种“积极”,“负面”,“中立”
analyze.get_emotion('我很开心,你是这么认为的吗')
结果
'pos'
2,这里进行更为细粒度的区分,分为“好”,“乐”,“哀”,“怒”,“惧”,“恶”,“惊” 七类情绪。
analyze.get_emotion_sp('我很开心,你是这么认为的吗')
结果
{'words': 10,
'sentences': 1,
'好': 0,
'乐': 1,
'哀': 0,
'怒': 0,
'惧': 0,
'恶': 0,
'惊': 0}
本文使用筛选出现频率出现前50的实体,并作出共现图
analyze.get_cosemantic(df_data,top50_all)
text = "他叫汤姆去拿外衣。"
get_graph(text)
结果
[['他', '叫', '汤姆'], ['汤姆', '拿', '外衣']]
本文应用抽取式摘要技术,可以设置sent_num参数控制输出摘要局数。
text='2013年,信号与信息处理专业硕士毕业的张超凡进入国铁南宁局南宁电务段工作。那一年,广西同时开通多条高铁线路,高铁营业里程从0公里跃升至1000多公里。10年间,伴随着中国铁路高速发展,张超凡收获颇多。'
get_summary(text,sent_num=1)
结果
'2013年,信号与信息处理专业硕士毕业的张超凡进入国铁南宁局南宁电务段工作。'
本文提供各类可视化工具,柱状图,趋势图,词云图等。
FAQs
We found that textanalyze4sc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.