[−][src]Struct hyphenation::extended::Extended
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
impl Extended
[src]
pub fn language(&self) -> Language
[src]
The language for which this dictionary can provide hyphenation.
pub fn prefix_tallies(&'f self, query: &'q [u8]) -> PrefixTallies<'f, 'q, Tally>
[src]
An iterator over the tallies associated to all prefixes of the query, including the query itself.
Trait Implementations
impl Debug for Extended
[src]
impl<'de> Deserialize<'de> for Extended
[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<Extended, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Extended, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl From<Builder> for Extended
[src]
impl<'h> Hyphenator<'h> for Extended
[src]
type Opportunity = (usize, Option<&'h Subregion>)
Plain representation of a word break.
type Exact = (usize, Option<Subregion>)
An owned opportunity used to specify and store the predetermined hyphenation of known words. Read more
fn hyphenate<'t>(&'h self, word: &'t str) -> Word<'t, Self::Opportunity>
[src]
fn opportunities_within(
&'h self,
word: &str,
(l, r): (usize, usize)
) -> Vec<Self::Opportunity>
[src]
&'h self,
word: &str,
(l, r): (usize, usize)
) -> Vec<Self::Opportunity>
fn exception_within(
&'h self,
w: &str,
(l, r): (usize, usize)
) -> Option<Vec<Self::Opportunity>>
[src]
&'h self,
w: &str,
(l, r): (usize, usize)
) -> Option<Vec<Self::Opportunity>>
fn add_exception(
&mut self,
w: String,
ops: Vec<Self::Exact>
) -> Option<Vec<Self::Exact>>
[src]
&mut self,
w: String,
ops: Vec<Self::Exact>
) -> Option<Vec<Self::Exact>>
fn remove_exception(&mut self, w: &str) -> Option<Vec<Self::Exact>>
[src]
fn unbreakable_chars(&self) -> (usize, usize)
[src]
fn opportunities(&'h self, lowercase_word: &str) -> Vec<Self::Opportunity>
[src]
fn exception(&'h self, lowercase_word: &str) -> Option<Vec<Self::Opportunity>>
[src]
fn boundaries(&self, word: &str) -> Option<(usize, usize)>
[src]
impl Load for Extended
[src]
fn from_reader<R>(lang: Language, reader: &mut R) -> Result<Self> where
R: Read,
[src]
R: Read,
fn any_from_reader<R>(reader: &mut R) -> Result<Self> where
R: Read,
[src]
R: Read,
fn from_path<P>(lang: Language, path: P) -> Result<Self> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
impl<'d> Score<'d> for Extended
[src]
type Value = (u8, Option<&'d Subregion>)
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
fn denotes_opportunity((v, _): Self::Value) -> bool
[src]
fn score(&'d self, word: &str) -> Vec<Self::Value>
[src]
impl Serialize for Extended
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Auto Trait Implementations
impl RefUnwindSafe for Extended
impl Send for Extended
impl Sync for Extended
impl Unpin for Extended
impl UnwindSafe for Extended
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,