NGram related classes update