pub struct NgramGenerator { /* private fields */ }Expand description
N-gram generator for creating n-gram features from text
Implementations§
Source§impl NgramGenerator
impl NgramGenerator
Sourcepub fn with_config(config: NgramGeneratorConfig) -> Self
pub fn with_config(config: NgramGeneratorConfig) -> Self
Create a new N-gram generator with custom configuration
Sourcepub fn generate_ngrams(&self, text: &str) -> Vec<String>
pub fn generate_ngrams(&self, text: &str) -> Vec<String>
Generate n-grams from text
Trait Implementations§
Source§impl Clone for NgramGenerator
impl Clone for NgramGenerator
Source§fn clone(&self) -> NgramGenerator
fn clone(&self) -> NgramGenerator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NgramGenerator
impl Debug for NgramGenerator
Auto Trait Implementations§
impl Freeze for NgramGenerator
impl RefUnwindSafe for NgramGenerator
impl Send for NgramGenerator
impl Sync for NgramGenerator
impl Unpin for NgramGenerator
impl UnwindSafe for NgramGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more