I am doing twitter sentiment analysis for valentines day purpose. I want to know how to group tweets under a particular category. As an example, suppose various gifts category a person may offer to their valentine either flower,pendant or cards. Now how do i group tweets which fall under either flower or card or pendant category by writing some code in R. Please share me the detailed code. I urgently need the code.
If you have the tags related to each category e.g. #valentinecard or #redroses, then you can follow the code and the steps mentioned in this article:
You might need to perform some text cleaning before you can actually use the tweets directly. Here is a good list of practices to follow:
Hope this helps.
You can try using the package Word2Vec. What it does is that it converts your words into vectors and looks out for similar points (words in this case). I think the package will fit in this scenario well.
Hope this helps,