chinese_detection

Crates.iochinese_detection
lib.rschinese_detection
version2.0.4
sourcesrc
created_at2020-05-06 02:32:18.280773
updated_at2023-11-10 23:16:08.254815
descriptionClassify a string as either English, Chinese, or Pinyin.
homepage
repositoryhttps://github.com/sotch-pr35mac/chinese_detection
max_upload_size
id238049
size6,340,749
Preston Wang-Stosur-Bassett (sotch-pr35mac)

documentation

README

chinese_detection

v2.0.0

About

Classify a string as either English, Chinese, or Pinyin.

Usage

extern crate chinese_detection;

use chinese_detection::{ClassificationResult, classify};

assert_eq!(ClassificationResult::EN, classify("test"));
assert_eq!(ClassificationResult::PY, classify("shiyan")); 
assert_eq!(ClassificationResult::ZH, classify("实验")); 

License

MIT

Commit count: 19

cargo fmt