pub struct Node { /* private fields */ }
Implementations§
Trait Implementations§
source§impl LatticeNode for Node
impl LatticeNode for Node
fn begin(&self) -> usize
fn end(&self) -> usize
fn cost(&self) -> i16
fn word_id(&self) -> WordId
fn left_id(&self) -> u16
source§fn 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.
source§fn 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)
source§fn num_codepts(&self) -> usize
fn num_codepts(&self) -> usize
Returns number of codepoints in the current node
source§fn char_range(&self) -> Range<usize>
fn char_range(&self) -> Range<usize>
Utility method for extracting [begin, end) codepoint range.
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more