Sentiment Analysis (Sentiment Classification) For text with subjective descriptions, it can automatically determine the sentiment polarity category of the text and give the corresponding confidence level, which can help enterprises understand user consumption habits, analyze hot topics and crisis public opinion monitoring, and provide favorable decision support for enterprises.
- The sentiment polarity is divided into two categories -Negative -Positive
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
After successful operation, the command line should see the following information:
...
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
]
...
brew install kafka