1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! `hanzi-sort` sorts Chinese text by Hanyu Pinyin or stroke count.
//!
//! The CLI is the primary product, but the same core sorter is available as a
//! Rust library for pipelines, tests, and small embedding use cases.
//!
//! ```rust
//! use hanzi_sort::{sort_strings_by, PinyinContext, SortMode};
//!
//! let context = PinyinContext::default();
//! let sorted = sort_strings_by(
//! vec!["一".into(), "十".into(), "天".into()],
//! &context,
//! SortMode::Strokes,
//! );
//!
//! assert_eq!(sorted, vec!["一", "十", "天"]);
//! ```
//!
//! `phrase_override` rules let you resolve polyphonic phrases like `重庆` or
//! `银行` without rewriting the core lookup tables.
//!
//! ```compile_fail
//! use hanzi_sort::SortKey;
//! ```
//!
//! ```compile_fail
//! use hanzi_sort::SortToken;
//! ```
//!
//! ```compile_fail
//! use hanzi_sort::compare_sort_key;
//! ```
pub use ;
pub use ;
pub use ;
pub use r#overridePinyinOverride;
pub use ;
pub use ;