Overview

Components
CorpusSegmenter
TheCorpusSegmenter processes Arrow shards and produces segmented output:
Segmentation via Pipeline (Recommended)
For most use cases, use thePipeline class:
Configuration
Options
Segmentation Engines
MyWord (Default)
High-accuracy segmentation using the myword library:CRF
Conditional Random Fields - good balance of speed and accuracy.Transformer
Highest accuracy using a HuggingFace token classification model (XLM-RoBERTa fine-tuned for Myanmar word boundary detection). Requires thetransformers package.
Comparison
Parallel Processing
Worker Configuration
Configure parallel workers viaPipelineConfig:
macOS Note
OpenMP requires libomp on macOS:Performance Optimization
Batch Size
Larger batches improve throughput:Memory Management
For memory-constrained environments:Benchmarks
Integration with Pipeline
See Also
- Data Pipeline - Pipeline overview
- Building Stage - Next stage
- Cython Guide - Cython internals