rustling
rustling is a library of tools for computational linguistics, implemented in Rust with Python bindings.
Features
- Word Segmentation — Models for segmenting unsegmented text into words
LongestStringMatching— Greedy left-to-right longest match segmenterRandomSegmenter— Random baseline segmenter
Installation
Python
Rust
Usage
Python
# Longest String Matching
=
=
# [['that', 'is', 'a', 'd', 'o', 'g'], ['this', 'is', 'not', 'a', 'c', 'a', 't']]
# Random Segmenter (no training needed)
=
=
# e.g., [['hel', 'lo', 'wor', 'ld']] (varies due to randomness)
Rust
use ;
License
MIT License
Links
- Author: Jackson L. Lee
- Source code: https://github.com/jacksonllee/rustling