Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

jieba-rs

> 编程语言
Open source

The Jieba Chinese Word Segmentation Implemented in Rust

963 stars0 likes0 views
WebsiteGitHub

About

The Jieba Chinese Word Segmentation Implemented in Rust

jieba-rs

Help me to become a full-time open-source developer by sponsoring me on GitHub

The Jieba Chinese Word Segmentation Implemented in Rust

Installation

Add it to your Cargo.toml:

toml
[dependencies]
jieba-rs = "0.11"

then you are good to go. If you are using Rust 2015 you have to extern crate jieba_rs to your crate root as well.

Example

rust
use jieba_rs::Jieba;

fn main() {
    let jieba = Jieba::new();
    let words = jieba.cut("我们中出了一个叛徒", false);
    assert_eq!(words, vec!["我们", "中", "出", "了", "一个", "叛徒"]);
}

Enabling Additional Features

  • default-dict feature enables embedded dictionary, this features is enabled by default
  • tfidf feature enables TF-IDF keywords extractor
  • textrank feature enables TextRank keywords extractor
toml
[dependencies]
jieba-rs = { version = "0.11", features = ["tfidf", "textrank"] }

Run benchmark

bash
cargo bench --all-features

Benchmark: Compare with cppjieba

  • jieba-rs 分词性能优化记录:提升 2.4 倍
  • Making jieba-rs 2.4x faster
  • Optimizing jieba-rs to be 33% faster than cppjieba
  • 优化 jieba-rs 中文分词性能评测
  • 最佳化 jieba-rs 中文斷詞性能測試

jieba-rs bindings

  • @node-rs/jieba NodeJS binding
  • jieba-php PHP binding
  • rjieba-py Python binding
  • cang-jie Chinese tokenizer for tantivy
  • tantivy-jieba An adapter that bridges between tantivy and jieba-rs
  • jieba-wasm the WebAssembly binding
  • jiebaRS R binding
  • emacs-jieba-rs binding and minor mode extension

License

This work is released under the MIT license. A copy of the license is provided in the LICENSE file.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustchinese-word-segmentationjiebajieba-chinesenlp

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言