I have this example and i want to know how to get this result. I have text and I tokenize it then I collect the bigram and trigram and fourgram like that
from nltk.util import ngrams
text = "Hi How are you? i am fine and you"
n = int(input("ngram value = "))
n_grams = ngrams(text.split(), n)
for grams in n_grams :
print(grams)