【发布时间】:2012-06-25 13:07:58
【问题描述】:
我正在使用 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
谁能帮我解决这个问题或为我指出类似的事情?
【问题讨论】:
标签: java twitter filter twitter4j hashtag