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

#93 in Internationalization (i18n)

Download history 5/week @ 2024-11-14 5/week @ 2024-11-21 11/week @ 2024-11-28 70/week @ 2024-12-05 80/week @ 2024-12-12 30/week @ 2024-12-19 15/week @ 2024-12-26 32/week @ 2025-01-02 37/week @ 2025-01-09 22/week @ 2025-01-16 8/week @ 2025-01-23 11/week @ 2025-01-30 38/week @ 2025-02-06 8/week @ 2025-02-13 14/week @ 2025-02-20 26/week @ 2025-02-27

92 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