I have a pandas dataframe, with the following columns :
Column 1
['if', 'you', 'think', 'she', "'s", 'cute', 'now', ',', 'you', 'should', 'have', 'see', 'her', 'a', 'couple', 'of', 'year', 'ago', '.']
['uh', ',', 'yeah', '.', 'just', 'a', 'fax', '.']
Column 2
if you think she 's cute now , you should have see her a couple of year ago .
uh , yeah . just a fax .
etc.
My target is to count the bigrams, trigrams, quadrigrams of the dataframe (and specifically, the column 2, which is already lemmatized).
I tried the following :
import nltk
from nltk import bigrams
from nltk import trigrams
trig = trigrams(df ["Column2"])
print (trig)
However, I have the following error
<generator object trigrams at 0x0000013C757F1C48>
My final target is to be able to print the top X bi grams, trigrams etc.