pub trait LatticeNode: RightId {
// Required methods
fn begin(&self) -> usize;
fn end(&self) -> usize;
fn cost(&self) -> i16;
fn word_id(&self) -> WordId;
fn left_id(&self) -> u16;
// Provided methods
fn is_oov(&self) -> bool { ... }
fn is_special_node(&self) -> bool { ... }
fn num_codepts(&self) -> usize { ... }
fn char_range(&self) -> Range<usize> { ... }
}
Required Methods§
fn begin(&self) -> usize
fn end(&self) -> usize
fn cost(&self) -> i16
fn word_id(&self) -> WordId
fn left_id(&self) -> u16
Provided Methods§
sourcefn is_oov(&self) -> bool
fn is_oov(&self) -> bool
Is true when the word does not come from the dictionary. BOS and EOS are also treated as OOV.
sourcefn is_special_node(&self) -> bool
fn is_special_node(&self) -> bool
If a node is a special system node like BOS or EOS. Java name isSystem (which is similar to a regular node coming from the system dictionary)
sourcefn num_codepts(&self) -> usize
fn num_codepts(&self) -> usize
Returns number of codepoints in the current node
sourcefn char_range(&self) -> Range<usize>
fn char_range(&self) -> Range<usize>
Utility method for extracting [begin, end) codepoint range.