Extend ngrams to any n, rather than just n = 2