我正在使用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
Run Code Online (Sandbox Code Playgroud)
然后,我想将这些推文归类为:
- hate, Confusing, sad,... are negative
- happy, love,... are positive
Run Code Online (Sandbox Code Playgroud)
PositiveTweets将是:
- This sunshine makes me feel so happy #weather
- I love the sunshine! #weather
Run Code Online (Sandbox Code Playgroud)
NegativeTweets将是:
- OMG, I hate this rain #weather …Run Code Online (Sandbox Code Playgroud)