rust-jieba

Crates.iorust-jieba
lib.rsrust-jieba
version0.1.0
sourcesrc
created_at2018-01-26 02:37:55.161638
updated_at2018-01-26 02:37:55.161638
descriptionRust binding to cppjieba
homepage
repositoryhttps://github.com/messense/rust-jieba.git
max_upload_size
id48334
size17,635
messense (messense)

documentation

README

rust-jieba

Build Status codecov Crates.io docs.rs

cppjieba Rust binding

Installation

Add it to your Cargo.toml:

[dependencies]
rust-jieba = "0.1"

Example

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 file.

Commit count: 21

cargo fmt