Expand description
Delta-Stack Monoid algorithm for parallel sentence boundary detection
This crate implements a mathematically sound parallel approach to sentence boundary detection using monoid algebra. The core innovation lies in representing parsing state as a monoid, enabling associative operations that can be computed in parallel while maintaining perfect accuracy.
§Stability Notice
This crate is pre-1.0. The current 0.3 series exposes a deliberately small
public surface (the api module, re-exported at the crate root) so that
internal improvements no longer require breaking changes. Pin a minor
version in your Cargo.toml:
sakurs-core = "0.3"§Example
use sakurs_core::{SentenceProcessor, Input};
// Create processor with default configuration
let processor = SentenceProcessor::new();
// Process text
let text = "Hello world. This is a test.";
let result = processor.process(Input::from_text(text)).unwrap();
// Check boundaries
assert!(!result.boundaries.is_empty());Re-exports§
pub use api::Boundary;pub use api::Config;pub use api::ConfigBuilder;pub use api::Error as ApiError;pub use api::Input;pub use api::Language;pub use api::LanguageConfig;pub use api::Output;pub use api::ProcessingMetadata;pub use api::ProcessingStats;pub use api::SentenceProcessor;
Modules§
- api
- New unified API for sakurs-core