#[non_exhaustive]pub enum SegmentationStrategy {
Lattice,
Eager,
}Expand description
Strategy used to segment hanja-containing spans.
Lattice considers every dictionary path and chooses the best coverage,
while Eager greedily takes the longest match at each cursor. The eager
strategy can reduce work for callers that prefer speed over segmentation
accuracy.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Lattice
Use dynamic programming to maximize dictionary coverage.
Eager
Use left-to-right eager longest-match segmentation.
Trait Implementations§
Source§impl Clone for SegmentationStrategy
impl Clone for SegmentationStrategy
Source§fn clone(&self) -> SegmentationStrategy
fn clone(&self) -> SegmentationStrategy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SegmentationStrategy
impl Debug for SegmentationStrategy
Source§impl Default for SegmentationStrategy
impl Default for SegmentationStrategy
Source§fn default() -> SegmentationStrategy
fn default() -> SegmentationStrategy
Returns the “default value” for a type. Read more
Source§impl PartialEq for SegmentationStrategy
impl PartialEq for SegmentationStrategy
Source§fn eq(&self, other: &SegmentationStrategy) -> bool
fn eq(&self, other: &SegmentationStrategy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SegmentationStrategy
impl Eq for SegmentationStrategy
impl StructuralPartialEq for SegmentationStrategy
Auto Trait Implementations§
impl Freeze for SegmentationStrategy
impl RefUnwindSafe for SegmentationStrategy
impl Send for SegmentationStrategy
impl Sync for SegmentationStrategy
impl Unpin for SegmentationStrategy
impl UnsafeUnpin for SegmentationStrategy
impl UnwindSafe for SegmentationStrategy
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