39

Loughran&McDonald金融文本情感分析库

 4 years ago
source link: http://mp.weixin.qq.com/s?__biz=MzI1MTE2ODg4MA%3D%3D&%3Bmid=2650071625&%3Bidx=1&%3Bsn=f59229fe2d9b5500fc1b7915ffa44739
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

今天看到一个预测股价的项目,其中用到pysentiment库对金融文本数据进行情感计算。查了下该库的官方文档,发现该库提供了两大情感分析

  • Harvard IV-4 英文通用情感分析

  • Loughran&MCdonald 英文金融情感分析

pysentiment github地址https://github.com/hanzhichao2000/pysentiment

pysentiment安装

pysentiment我一直没有安装成功过,最后没办法只能从github上下载下来放到 ipynb文件所属的文件夹 内调用使用。

大家课后下载我这个项目文件夹即可(文末附有下载地址)。

pysentiment接口

  • HIV4 英文通用情感分析

  • LM 英文金融领域情感分析

英文通用情感分析

通用情绪的情感分析使用的Harvard IV-4的词库,词库详情可见 http://www.wjh.harvard.edu/~inquirer/

计算说明:

  • Positive正面词词频数

  • Negative负面词词频数

  • Polarity=(Pos-Neg)/(Pos+Neg)

  • Subjectivity=(Pos+Neg)/count(*)

英文金融情感分析

英文金融情感分析使用的Loughran and McDonald的词库,词库详情可见 https://www3.nd.edu/~mcdonald/Word_Lists.html

计算说明:

  • Positive正面词词频数

  • Negative负面词词频数

  • Polarity=(Pos-Neg)/(Pos+Neg)

  • Subjectivity=(Pos+Neg)/count(*)

觉得本文有用,请不吝点赞评论转发~谢谢支持~

近期文章

精选课程 | Python数据分析实战(学术)

代码不到40行的超燃动态排序图

使用Python自动生成事件分析图谱

如何使用Adaboost预测下一次营销活动的效果

计算社会经济学

Loughran&McDonald金融文本情感分析库

使用分析师报告中含有的情感信息预测上市公司股价变动

日期数据操作第1期 datetime库

日期数据操作第2期 pandas库

史上最大规模1.4亿中文知识图谱开源下载

【公开视频课】Python语法快速入门

【公开视频课】ython爬虫快速入门

文本数据分析文章汇总(2016-至今)

当文本分析遇到乱码(ง'⌣')ง怎么办?

当pandas遇上数据类型问题

如何理解pandas中的transform函数

一行pandas代码生成哑变量

Python最被低估的库,用好了效率提升10倍!

课件获取方式,请在公众号后台回复关键词“ LM情感分析

觉得本文有用,请不吝点赞评论转发~谢谢支持~


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK