chinese_detection

Classify a string as either English, Chinese, or Pinyin

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

#341 in Text processing

Download history 220/week @ 2024-07-01 6/week @ 2024-07-15 5/week @ 2024-07-22 48/week @ 2024-07-29 6/week @ 2024-08-05 5/week @ 2024-08-12 4/week @ 2024-08-19 16/week @ 2024-08-26 5/week @ 2024-09-02 15/week @ 2024-09-09 17/week @ 2024-09-16 44/week @ 2024-09-23 8/week @ 2024-09-30 1/week @ 2024-10-07 23/week @ 2024-10-14

77 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