Struct hyphenation::extended::Extended [−][src]
pub struct Extended { pub exceptions: Exceptions, pub minima: (usize, usize), // some fields omitted }
Expand description
A dictionary for extended Knuth–Liang hyphenation, based on the strategy described by Németh in “Automatic non-standard hyphenation in OpenOffice.org”.
It comprises the working language, the set of extended patterns and exceptions, and the character boundaries for hyphenation.
Fields
exceptions: Exceptions
minima: (usize, usize)
The minimum number of char
s from the start and end of a word where
breaks may not occur.
Implementations
The language for which this dictionary can provide hyphenation.
An iterator over the tallies associated to all prefixes of the query, including the query itself.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Extended, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Extended, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
An owned opportunity used to specify and store the predetermined hyphenation of known words. Read more
Hyphenate a word, computing appropriate word breaks and preparing it for iteration. Read more
fn opportunities_within(
&'h self,
word: &str,
(l, r): (usize, usize)
) -> Vec<Self::Opportunity>
fn opportunities_within(
&'h self,
word: &str,
(l, r): (usize, usize)
) -> Vec<Self::Opportunity>
The hyphenation opportunities that arise by pattern between the specified byte indices. Read more
fn exception_within(
&'h self,
w: &str,
(l, r): (usize, usize)
) -> Option<Vec<Self::Opportunity>>
fn exception_within(
&'h self,
w: &str,
(l, r): (usize, usize)
) -> Option<Vec<Self::Opportunity>>
The hyphenation opportunities that arise by exception between the specified byte indices, if any. Read more
Specify the hyphenation of the given word with an exact sequence of
opportunities and add it to the exception list. Subsequent calls to
hyphenate
or opportunities
will yield this hyphenation instead of
generating one from patterns. Read more
If the word is an exception, remove it and return the previously specified opportunities; otherwise, return none. Read more
The number of char
s from the start and end of a word where breaks may
not occur, according to dictionary parameters. Read more
The hyphenation opportunities that our dictionary can find in the given word. The word should be lowercase. Read more
If this word is a known exception, retrieve its specified hyphenation.
Deserialize a dictionary from the provided reader, verifying that it belongs to the expected language. Read more
Deserialize a dictionary from the provided reader.
Deserialize the embedded dictionary for the given language.
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. Read more
Whether the given value denotes a valid break.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more