Added sorting for NGram lists