Struct hyphenation_commons::Patterns [] [src]

pub struct Patterns {
    pub tally: Option<Vec<u8>>,
    pub descendants: HashMap<u8, Patterns, BuildHasherDefault<FnvHasher>>,
}

A basic trie, used to associate patterns to their hyphenation scores.

Fields

Trait Implementations

impl Debug for Patterns
[src]

Formats the value using the given formatter.

impl Clone for Patterns
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> KLPTrie<'a> for Patterns
[src]

Creates an empty Patterns trie.

Inserts a Knuth-Liang hyphenation pair into the trie.

If the pattern already exists, the old tally is returned; if not, None is.

Assigns a score to each potential hyphenation point.

All patterns matching a substring of word are compounded, and for each hyphenation point, the highest competing value is selected.