我正在使用Twitter4j開發應用程序。 我試圖用某個hashtag(例如:weather)導入tweets 然後,我想通過搜索關鍵詞將tweets與該hashtag分類。Twitter4j:在標籤中搜索關鍵字
例如: 一些進口的推文的可能是
- OMG, I hate this rain #weather
- This sunshine makes me feel so happy #weather
- Such strange #weather! One moment it rains, the next the sun shines. Confusing!
- Rain makes me sad #weather
- I love the sunshine! #weather
然後,我要歸類這些鳴叫爲:
- hate, Confusing, sad,... are negative
- happy, love,... are positive
PositiveTweets是:
- This sunshine makes me feel so happy #weather
- I love the sunshine! #weather
NegativeTweets將是:
- OMG, I hate this rain #weather
- Such strange #weather! One moment it rains, the next the sun shines. Confusing!
- Rain makes me sad #weather
所以,NegativeTweets=3
和PositiveTweets=2
誰能幫我這個或點我對類似的東西?