python模块获得unicode表情符号的情感排名。
emosent-p的Python项目详细描述
emosent py
emosett py是一个python实用程序包,用于获取unicode emojis的情感排名。
根据Kralj Novak P、Smailovi奇J、Sluban B、Mozeti_i的研究 (2015)关于情感的情感。
日志链接: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0144296
从Clarin存储库获取的CSV数据, 存储库链接:http://hdl.handle.net/11356/1048
这个项目的灵感来自emoji-sentiment,一个用javascript编写的类似实用程序。
emoji支持
此项目支持的情绪化情绪排序的完整列表 可以在找到 Emoji Sentiment Ranking v1.0。
安装
您可以使用pip
:
pip install emosent-py
用法
示例1
fromemosentimportget_emoji_sentiment_rankget_emoji_sentiment_rank('❤')
输出:
{'unicode_codepoint':'0x2764','occurrences':8050,'position':0.746943086,'negative':355.0,'neutral':1334.0,'positive':6361.0,'unicode_name':'HEAVY BLACK HEART','unicode_block':'Dingbats','sentiment_score':0.746}
示例2
fromemosentimportget_emoji_sentiment_rankget_emoji_sentiment_rank('?')
输出:
{'unicode_codepoint':'0x1f602','occurrences':14622,'position':0.805100583,'negative':3614.0,'neutral':4163.0,'positive':6845.0,'unicode_name':'FACE WITH TEARS OF JOY','unicode_block':'Emoticons','sentiment_score':0.221}
版本控制
我们使用SemVer进行版本控制。对于可用的版本, 见 tags on this repository。
许可证
这个项目是根据麻省理工学院的许可证授权的-参见 LICENSE.txt文件了解更多详细信息。