Trait hyphenation::score::Score[][src]

pub trait Score<'d> {
    type Value;
    fn score(&'d self, word: &str) -> Vec<Self::Value>;
fn denotes_opportunity(value: Self::Value) -> bool; }
Expand description

Methods to evaluate each index in a string as an opportunity for hyphenation.

Associated Types

A value assigned to each index — which is to say, to each potential break between letters — to determine whether the string can be broken at that index.

Required methods

Generate a word’s hyphenation score, from which opportunities may be extracted.

The Standard and Extended dictionaries mark each byte index with an integer value, where an odd value marks the index as a valid break.

Whether the given value denotes a valid break.

Implementors