More minimal n-gram implementation.