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

The item returned from this method will be used to pad the beginning and end of each n-gram

Provided Methods

Specifies how many characters of padding to add. Defaults to N - 1

Implementors