pub struct AdvancedTextCleaner { /* private fields */ }Expand description
Advanced text cleaner with various cleaning options
Implementations§
Source§impl AdvancedTextCleaner
impl AdvancedTextCleaner
Sourcepub fn privacy_focused() -> Self
pub fn privacy_focused() -> Self
Create a cleaner for privacy-sensitive text
Sourcepub fn set_strip_html(self, value: bool) -> Self
pub fn set_strip_html(self, value: bool) -> Self
Set whether to strip HTML tags
Sourcepub fn set_replace_urls(self, value: bool) -> Self
pub fn set_replace_urls(self, value: bool) -> Self
Set whether to replace URLs
Sourcepub fn set_replace_emails(self, value: bool) -> Self
pub fn set_replace_emails(self, value: bool) -> Self
Set whether to replace emails
Sourcepub fn set_replace_phone_numbers(self, value: bool) -> Self
pub fn set_replace_phone_numbers(self, value: bool) -> Self
Set whether to replace phone numbers
Sourcepub fn set_expand_contractions(self, value: bool) -> Self
pub fn set_expand_contractions(self, value: bool) -> Self
Set whether to expand contractions
Sourcepub fn set_remove_emojis(self, value: bool) -> Self
pub fn set_remove_emojis(self, value: bool) -> Self
Set whether to remove emojis
Sourcepub fn set_normalize_numbers(self, value: bool) -> Self
pub fn set_normalize_numbers(self, value: bool) -> Self
Set whether to normalize numbers
Sourcepub fn set_normalize_currencies(self, value: bool) -> Self
pub fn set_normalize_currencies(self, value: bool) -> Self
Set whether to normalize currencies
Sourcepub fn set_normalize_percentages(self, value: bool) -> Self
pub fn set_normalize_percentages(self, value: bool) -> Self
Set whether to normalize percentages
Sourcepub fn set_normalize_ordinals(self, value: bool) -> Self
pub fn set_normalize_ordinals(self, value: bool) -> Self
Set whether to normalize ordinals
Sourcepub fn set_normalize_dates(self, value: bool) -> Self
pub fn set_normalize_dates(self, value: bool) -> Self
Set whether to normalize dates
Sourcepub fn set_normalize_times(self, value: bool) -> Self
pub fn set_normalize_times(self, value: bool) -> Self
Set whether to normalize times
Sourcepub fn set_normalize_fractions(self, value: bool) -> Self
pub fn set_normalize_fractions(self, value: bool) -> Self
Set whether to normalize fractions
Sourcepub fn set_normalize_roman_numerals(self, value: bool) -> Self
pub fn set_normalize_roman_numerals(self, value: bool) -> Self
Set whether to normalize roman numerals
Sourcepub fn set_normalize_scientific_notation(self, value: bool) -> Self
pub fn set_normalize_scientific_notation(self, value: bool) -> Self
Set whether to normalize scientific notation
Sourcepub fn set_normalize_temperatures(self, value: bool) -> Self
pub fn set_normalize_temperatures(self, value: bool) -> Self
Set whether to normalize temperatures
Sourcepub fn set_normalize_measurements(self, value: bool) -> Self
pub fn set_normalize_measurements(self, value: bool) -> Self
Set whether to normalize measurements
Sourcepub fn set_normalize_versions(self, value: bool) -> Self
pub fn set_normalize_versions(self, value: bool) -> Self
Set whether to normalize version numbers
Sourcepub fn set_normalize_ip_addresses(self, value: bool) -> Self
pub fn set_normalize_ip_addresses(self, value: bool) -> Self
Set whether to normalize IP addresses
Sourcepub fn set_normalize_hex_numbers(self, value: bool) -> Self
pub fn set_normalize_hex_numbers(self, value: bool) -> Self
Set whether to normalize hexadecimal numbers
Sourcepub fn set_normalize_binary_numbers(self, value: bool) -> Self
pub fn set_normalize_binary_numbers(self, value: bool) -> Self
Set whether to normalize binary numbers
Sourcepub fn set_placeholders(
self,
url: Option<String>,
email: Option<String>,
phone: Option<String>,
) -> Self
pub fn set_placeholders( self, url: Option<String>, email: Option<String>, phone: Option<String>, ) -> Self
Set custom placeholders
Sourcepub fn set_number_placeholders(
self,
number: Option<String>,
currency: Option<String>,
percentage: Option<String>,
ordinal: Option<String>,
) -> Self
pub fn set_number_placeholders( self, number: Option<String>, currency: Option<String>, percentage: Option<String>, ordinal: Option<String>, ) -> Self
Set custom number placeholders
Sourcepub fn set_advanced_placeholders(
self,
date: Option<String>,
time: Option<String>,
fraction: Option<String>,
roman: Option<String>,
scientific: Option<String>,
temperature: Option<String>,
measurement: Option<String>,
version: Option<String>,
ip: Option<String>,
hex: Option<String>,
binary: Option<String>,
) -> Self
pub fn set_advanced_placeholders( self, date: Option<String>, time: Option<String>, fraction: Option<String>, roman: Option<String>, scientific: Option<String>, temperature: Option<String>, measurement: Option<String>, version: Option<String>, ip: Option<String>, hex: Option<String>, binary: Option<String>, ) -> Self
Set custom advanced placeholders for new normalization types
Trait Implementations§
Source§impl Clone for AdvancedTextCleaner
impl Clone for AdvancedTextCleaner
Source§fn clone(&self) -> AdvancedTextCleaner
fn clone(&self) -> AdvancedTextCleaner
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AdvancedTextCleaner
impl Debug for AdvancedTextCleaner
Auto Trait Implementations§
impl Freeze for AdvancedTextCleaner
impl RefUnwindSafe for AdvancedTextCleaner
impl Send for AdvancedTextCleaner
impl Sync for AdvancedTextCleaner
impl Unpin for AdvancedTextCleaner
impl UnwindSafe for AdvancedTextCleaner
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
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.