How to count my tokenized words

I am trying to count the tokenized sentences consisting of 3-4 words. However I am getting error as Error in UseMethod("pull") : no applicable method for 'pull' applied to an object of class "character"

I extracted the data from Excel file which consists of sentences like :

1.I am happy person today
2.I am sad today.
3. I am happy person.
4.I am sad person.
5.I am happy and beautiful

the answer should give me result such as :

   Sentence                                            Count 

I am happy 3
I am sad 2
' '


new <- feed$Feedback


new<- gsub("Blank","",as.character(new))

new<- gsub('blank',"",as.character(new))

tft_token_ngram <- tokenize_ngrams(x = new,
                                   lowercase = TRUE,
                                   n = 4L,
                                   n_min = 3L,
                                   stopwords = character(),
                                   ngram_delim = " ",
                                   simplify = FALSE)

a <- tft_token_ngram %>% count(word,sort = TRUE)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.