pub struct FuzzyConfig {
pub z_zh: bool,
pub c_ch: bool,
pub s_sh: bool,
pub n_l: bool,
pub f_h: bool,
pub r_l: bool,
pub in_ing: bool,
pub en_eng: bool,
pub an_ang: bool,
}Expand description
Toggleable fuzzy-pair flags. All off by default.
Fields§
§z_zh: boolz ↔ zh
c_ch: boolc ↔ ch
s_sh: bools ↔ sh
n_l: booln ↔ l (initial only)
f_h: boolf ↔ h
r_l: boolr ↔ l (initial only)
in_ing: boolin ↔ ing (final)
en_eng: boolen ↔ eng (final)
an_ang: boolan ↔ ang (final)
Implementations§
Source§impl FuzzyConfig
impl FuzzyConfig
Sourcepub const fn permissive() -> Self
pub const fn permissive() -> Self
All pairs on — common dialect-tolerant default for southern speakers.
Sourcepub fn expand(&self, syl: &str) -> Vec<String>
pub fn expand(&self, syl: &str) -> Vec<String>
Returns the canonical syllable plus any fuzzy alternates this config
permits. The result always begins with syl itself; alternates are
only added when the rule applies.
Single-rule expansion only — does not cascade. s.iter().count()
is between 1 and ~3 in practice.
Trait Implementations§
Source§impl Clone for FuzzyConfig
impl Clone for FuzzyConfig
Source§fn clone(&self) -> FuzzyConfig
fn clone(&self) -> FuzzyConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FuzzyConfig
impl Debug for FuzzyConfig
Source§impl Default for FuzzyConfig
impl Default for FuzzyConfig
Source§fn default() -> FuzzyConfig
fn default() -> FuzzyConfig
Returns the “default value” for a type. Read more
impl Copy for FuzzyConfig
Auto Trait Implementations§
impl Freeze for FuzzyConfig
impl RefUnwindSafe for FuzzyConfig
impl Send for FuzzyConfig
impl Sync for FuzzyConfig
impl Unpin for FuzzyConfig
impl UnsafeUnpin for FuzzyConfig
impl UnwindSafe for FuzzyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more