I have a csv file which has tweeet_id, class (positive/negative), tweet. i'i it work for your code?. I think according to me, each tweet should be stored in each file within a corresponding directory and after easily can be applied you code. Am i right. Then also I have code. Twitter comments has so many emoticons, urls and etc. Whether your code will work for twitter data.