Speeding up ngrams generation and access.