extract_ngrams function

Extract n-grams from text