基于python的人物情感分析_python中基于方面的情感分析

我对Liu Bing的《情感分析和观点挖掘》一书很感兴趣,我已经实现了一个小程序来获取文本的各个方面。在

我用Hu在我的文本中搜索了一系列积极和消极的单词,并在感慨词旁边找到了最近的名词或人称代词nltk.tokenizer. 结果很有趣,但我很难发现否定和上下文。在

来自亚马逊的例子:"I love spicy ramen, but for whatever reasons this thing burns my stomach badly and the burning sensation doesn't go away for like 3 hours! Not sure if that is healthy or not .... and you can buy this at Walmart for $0.28, way cheaper than Amazon."

我的程序返回元组列表(“情感词”,“方面”,“情感”)。1表示积极情绪,0表示消极情绪。在[(u'love', u'i', 1),

(u'love', u'spicy', 1),

(u'burns', u'thing', 0),

(u'badly', u'stomach', 0),

(u'burning', u'stomach', 0),

(u'sensation', u'stomach', 1),

(u'healthy', u'healthy', 1),

(u'cheaper', u'way', 1)]

这种方法似乎可以捕捉到某些方面,但还远远不够。此外,我还远没有刘的例子(第23页):I bought a Samsung camera and my friends brought a Canon camera

yesterday. (2) In the past week, we both used the cameras a lot. (3)

The photos from my Samy are not that great, and the battery life is

short too. (4) My friend was very happy with his camera and loves its

picture quality. (5) I want a camera that can take good photos. (6) I

am going to return it tomorrow

我真的很想改进,这样我才能正确地捕捉到这些方面和情感。我知道这是一个很普遍的问题,但你能给我推荐一些套餐和读物吗?在

最好的,非常感谢

亚历克斯

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值