Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/messense/rust-jieba
Rust binding to cppjieba
https://github.com/messense/rust-jieba
Last synced: 28 days 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-15T09:03:33.000Z (about 4 years ago)
- Last Synced: 2024-10-04T12:42:06.493Z (about 1 month ago)
- Language: Rust
- Size: 26.4 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rust-jieba
[![Build Status](https://travis-ci.org/messense/rust-jieba.svg?branch=master)](https://travis-ci.org/messense/rust-jieba)
[![codecov](https://codecov.io/gh/messense/rust-jieba/branch/master/graph/badge.svg)](https://codecov.io/gh/messense/rust-jieba)
[![Crates.io](https://img.shields.io/crates/v/rust-jieba.svg)](https://crates.io/crates/rust-jieba)
[![docs.rs](https://docs.rs/rust-jieba/badge.svg)](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.