ngrams generator script