jieba rs
v0.7.0
ช่วยฉันเป็นนักพัฒนาโอเพนซอร์สเต็มเวลาโดยสนับสนุนฉันใน GitHub
การแบ่งส่วนคำภาษาจีน jieba นำมาใช้ในสนิม
เพิ่มลงใน Cargo.toml ของคุณ:
[ dependencies ]
jieba-rs = " 0.7 " ถ้าอย่างนั้นคุณก็พร้อมที่จะไป หากคุณกำลังใช้ Rust 2015 คุณต้อง extern crate jieba_rs ไปยังรากลังของคุณเช่นกัน
use jieba_rs :: Jieba ;
fn main ( ) {
let jieba = Jieba :: new ( ) ;
let words = jieba . cut ( "我们中出了一个叛徒" , false ) ;
assert_eq ! ( words , vec! [ "我们" , "中" , "出" , "了" , "一个" , "叛徒" ] ) ;
} default-dict เปิดใช้งานพจนานุกรมฝังตัวคุณลักษณะนี้เปิดใช้งานโดยค่าเริ่มต้นtfidf ช่วยให้ TF-IDF Keywords Extractortextrank ช่วยให้ Textrank Keywords Extractor [ dependencies ]
jieba-rs = { version = " 0.7 " , features = [ " tfidf " , " textrank " ] }cargo bench --all-featuresjieba-rs@node-rs/jieba nodejs bindingjieba-php php ผูกพันrjieba-py python ผูกพันcang-jie tokenizer จีนสำหรับ tantivytantivy-jieba อะแดปเตอร์ที่เชื่อมระหว่าง Tantivy และ Jieba-rsjieba-wasm การผูกมัด webasply งานนี้เปิดตัวภายใต้ใบอนุญาต MIT สำเนาใบอนุญาตมีให้ในไฟล์ใบอนุญาต