| Crates.io | ngram_rs |
| lib.rs | ngram_rs |
| version | 0.1.1 |
| created_at | 2025-11-13 22:02:49.995267+00 |
| updated_at | 2025-11-13 22:02:49.995267+00 |
| description | Facilitate creating ngrams in Rust to be used in the polars plugin. |
| homepage | https://github.com/ericqu/ngram-rs |
| repository | https://github.com/ericqu/ngram-rs |
| max_upload_size | |
| id | 1931938 |
| size | 13,678 |
A high-performance n-gram generation library with Rust core and Polars plugin integration.
Cow (Copy-on-Write) for minimal allocationsThe core Rust library providing:
use ngram_rs::generate_ngrams;
let words = vec!["the", "quick", "brown", "fox"]
.into_iter()
.map(String::from)
.collect::<Vec<_>>();
let ngrams = generate_ngrams(&words, &[1, 2, 3], Some(" "));
The library is optimized for: