pub struct MultiPassNormalizer { /* private fields */ }Expand description
Applies an ordered sequence of normalization passes to text.
Implementations§
Source§impl MultiPassNormalizer
impl MultiPassNormalizer
Sourcepub fn new(passes: Vec<NormalizationPass>) -> Self
pub fn new(passes: Vec<NormalizationPass>) -> Self
Create a normalizer with the given passes applied in order.
Sourcepub fn with_all_passes() -> Self
pub fn with_all_passes() -> Self
Create a normalizer with all passes in recommended order.
Sourcepub fn normalize(&self, text: &str) -> NormalizationResult
pub fn normalize(&self, text: &str) -> NormalizationResult
Run all configured passes and produce a result with per-pass metrics.
Sourcepub fn apply_pass(&self, text: &str, pass: &NormalizationPass) -> String
pub fn apply_pass(&self, text: &str, pass: &NormalizationPass) -> String
Apply a single normalization pass to the input text.
Trait Implementations§
Source§impl Clone for MultiPassNormalizer
impl Clone for MultiPassNormalizer
Source§fn clone(&self) -> MultiPassNormalizer
fn clone(&self) -> MultiPassNormalizer
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 moreAuto Trait Implementations§
impl Freeze for MultiPassNormalizer
impl RefUnwindSafe for MultiPassNormalizer
impl Send for MultiPassNormalizer
impl Sync for MultiPassNormalizer
impl Unpin for MultiPassNormalizer
impl UnsafeUnpin for MultiPassNormalizer
impl UnwindSafe for MultiPassNormalizer
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