Trait ngrams::Pad
[−]
[src]
pub trait Pad { fn symbol() -> Self; fn len(n: usize) -> usize { ... } }
Implement this so ngrams
knows how to pad the beginning and end of your input.
There are default implementations for &str
, String
, and Vec<u8>
Required Methods
fn symbol() -> Self
The item returned from this method will be used to pad the beginning and end of each n-gram