1

I'm using tidytext packages for n grams text mining. I tried on 2 columns of texts, n grams (bigrams) function is working well for one but 0 obs returned for the other one. 2 columns from same resource so no diff with format but just diff content. Anyone knows why?

codes: result=unnest_tokens(table,bigrams,txt,token="ngrams",n=2)

MJW
  • 29
  • 7
  • Please, add a reproducible example coming from your data. – Terru_theTerror Feb 12 '18 at 16:12
  • 2
    Yep, we are going to need to see some example data to help you out here. Check out this question from some help on how to get started with a reproducible example: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Julia Silge Feb 15 '18 at 00:27
  • Add an example with token data, like use Shakespeare which you can get online. – smci Feb 15 '18 at 14:06

1 Answers1

0

Thanks for the comments. It's company data I can't post here. This codes applies well to other data tables.

I just find the issue. NA! NA! NA!. remember to remove NAs before process.

MW

MJW
  • 29
  • 7