Lao/Thai word segmentation library in Rust
```rust extern crate chamkho;
use chamkho::wordcut::Wordcut; use chamkho::dict::Dict;
fn main() { let dict = Dict::load(Dict::laopath()); let wordcut = Wordcut::new(dict.unwrap()); let segmentedstring = wordcut.putdelimiters(&"ພາສາລາວມີ".tostring(), "|"); println!("{}", segmented_string); } ```
```rust extern crate chamkho;
use chamkho::wordcut::Wordcut; use chamkho::dict::Dict;
fn main() { let dict = Dict::load(Dict::defaultpath()); let wordcut = Wordcut::new(dict.unwrap()); let segmentedstring = wordcut.putdelimiters(&"กากกา".tostring(), "|"); println!("{}", segmented_string); } ```
echo "กากกา" | wordcut
echo "กากกา" | wordcut -d <path to dictionary>
echo "ພາສາລາວມີ" | wordcut -l lao