Added a method to create the n-grams