| Crates.io | chinese_detection |
| lib.rs | chinese_detection |
| version | 2.0.4 |
| created_at | 2020-05-06 02:32:18.280773+00 |
| updated_at | 2023-11-10 23:16:08.254815+00 |
| description | Classify a string as either English, Chinese, or Pinyin. |
| homepage | |
| repository | https://github.com/sotch-pr35mac/chinese_detection |
| max_upload_size | |
| id | 238049 |
| size | 6,340,749 |
Classify a string as either English, Chinese, or Pinyin.
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("实验"));