情感倾向分析(Sentiment Classification)针对带有主观描述的文本,可自动判断该文本的情感极性类别并给出相应的置信度,能够帮助企业理解用户消费习惯、分析热点话题和危机舆情监控,为企业提供有利的决策支持。
zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties
kafka-server-start /usr/local/etc/kafka/server.properties
kafka-topics --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic twitter-data
kafka-console-producer --broker-list localhost:9092 --topic twitter-data < data.txt
运行成功后,命令行应该看到下面的信息:
xxxxxxxxxx
...
content: is alone downstairs...working
prediction: [
class: "Negative", probability: 0.98781
class: "Positive", probability: 0.01218
]
content: I feel bad for doing it
prediction: [
class: "Negative", probability: 0.99725
class: "Positive", probability: 0.00274
]
content: @RyanSeacrest is it just me, or she hates anoop. i mean seriously, she's kinda mean to him.
prediction: [
class: "Negative", probability: 0.99816
class: "Positive", probability: 0.00183
]
...