Change the internal structure of NGram.