pub struct TextNormalizer;Expand description
Text normalization utilities
Implementations§
Source§impl TextNormalizer
impl TextNormalizer
Sourcepub fn normalize_for_ml(text: &str) -> String
pub fn normalize_for_ml(text: &str) -> String
Normalize text for machine learning (lowercase, trim, etc.)
Sourcepub fn normalize_whitespace(text: &str) -> String
pub fn normalize_whitespace(text: &str) -> String
Remove extra whitespace
Sourcepub fn to_title_case(text: &str) -> String
pub fn to_title_case(text: &str) -> String
Convert to title case
Remove HTML tags (simple implementation)
Sourcepub fn clean_for_analysis(text: &str) -> String
pub fn clean_for_analysis(text: &str) -> String
Clean text for analysis (remove punctuation, normalize case)
Auto Trait Implementations§
impl Freeze for TextNormalizer
impl RefUnwindSafe for TextNormalizer
impl Send for TextNormalizer
impl Sync for TextNormalizer
impl Unpin for TextNormalizer
impl UnwindSafe for TextNormalizer
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> 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