Crates.io | rust-jieba |
lib.rs | rust-jieba |
version | 0.1.0 |
source | src |
created_at | 2018-01-26 02:37:55.161638 |
updated_at | 2018-01-26 02:37:55.161638 |
description | Rust binding to cppjieba |
homepage | |
repository | https://github.com/messense/rust-jieba.git |
max_upload_size | |
id | 48334 |
size | 17,635 |
cppjieba Rust binding
Add it to your Cargo.toml
:
[dependencies]
rust-jieba = "0.1"
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);
}
This work is released under the MIT license. A copy of the license is provided in the LICENSE file.