7 releases (stable)

2.0.4 Nov 10, 2023
2.0.3 Oct 12, 2022
2.0.2 Sep 10, 2022
2.0.1 Aug 2, 2022
0.1.0 May 6, 2020

#56 in Internationalization (i18n)

44 downloads per month
Used in chinese_dictionary

MIT license

1.5MB
124 lines

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


lib.rs:

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("实验"));

Dependencies