DocumentTermMatrix wrong counting when using a dictionary
问题 actually I am trying to do a sentiment analysis based on twitter data using the naive bayes algorithm. I have a look on 2000 Tweets. After getting the data into R studio I split and preprocess the date as follows: train_size = floor(0.75 * nrow(Tweets_Model_Input)) set.seed(123) train_sub = sample(seq_len(nrow(Tweets_Model_Input)), size = train_size) Tweets_Model_Input_Train = Tweets_Model_Input[train_sub, ] Tweets_Model_Input_Test = Tweets_Model_Input[-train_sub, ] myCorpus = Corpus