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

#55 in Internationalization (i18n)

Download history 33/week @ 2024-02-19 29/week @ 2024-02-26 7/week @ 2024-03-04 23/week @ 2024-03-11 47/week @ 2024-03-18 5/week @ 2024-03-25 44/week @ 2024-04-01 13/week @ 2024-04-08 12/week @ 2024-04-15

76 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