https://github.com/messense/rust-jieba
Rust binding to cppjieba
https://github.com/messense/rust-jieba
Last synced: about 1 year ago
JSON representation
Rust binding to cppjieba
- Host: GitHub
- URL: https://github.com/messense/rust-jieba
- Owner: messense
- License: mit
- Created: 2018-01-23T12:29:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-15T09:03:33.000Z (over 5 years ago)
- Last Synced: 2025-04-15T04:12:19.419Z (about 1 year ago)
- Language: Rust
- Size: 26.4 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rust-jieba
[](https://travis-ci.org/messense/rust-jieba)
[](https://codecov.io/gh/messense/rust-jieba)
[](https://crates.io/crates/rust-jieba)
[](https://docs.rs/rust-jieba/)
[cppjieba](https://github.com/yanyiwu/cppjieba) Rust binding
## Installation
Add it to your `Cargo.toml`:
```toml
[dependencies]
rust-jieba = "0.1"
```
## Example
```rust
extern crate rust_jieba;
use rust_jieba::Jieba;
fn main() {
let jieba = Jieba::from_dir("cjieba-sys/cppjieba-cabi/cppjieba/dict");
let words = jieba.cut("南京市长江大桥", true);
assert_eq!(vec!["南京市", "长江大桥"], words);
}
```
## License
This work is released under the MIT license. A copy of the license is provided in the [LICENSE](./LICENSE) file.