pub struct SentenceProcessor { /* private fields */ }Expand description
Unified sentence processor with clean API
Implementations§
Source§impl SentenceProcessor
impl SentenceProcessor
Sourcepub fn with_config(config: Config) -> Result<Self, Error>
pub fn with_config(config: Config) -> Result<Self, Error>
Create a processor with custom configuration
Sourcepub fn with_custom_rules(
config: Config,
language_rules: Arc<dyn LanguageRules>,
) -> Result<Self, Error>
pub fn with_custom_rules( config: Config, language_rules: Arc<dyn LanguageRules>, ) -> Result<Self, Error>
Create a processor with custom language rules
Sourcepub fn with_language(lang_code: impl Into<String>) -> Result<Self, Error>
pub fn with_language(lang_code: impl Into<String>) -> Result<Self, Error>
Create a processor for a specific language
Sourcepub fn process(&self, input: Input) -> Result<Output, Error>
pub fn process(&self, input: Input) -> Result<Output, Error>
Process input and return sentence boundaries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SentenceProcessor
impl !RefUnwindSafe for SentenceProcessor
impl Send for SentenceProcessor
impl Sync for SentenceProcessor
impl Unpin for SentenceProcessor
impl !UnwindSafe for SentenceProcessor
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