pub enum SegmentLanguage {
Chinese,
Japanese,
Korean,
}Expand description
The language a Tokenizer::Segment segments with.
Separate from [crate::expr::Language], which selects a Snowball stemming
algorithm: the two vocabularies do not overlap. Snowball strips suffixes and
has no CJK algorithms, while these languages are segmented by
dictionary-driven morphological analysis and have no stemmer. Keeping them
apart makes SNOWBALL(KOREAN) and SEGMENT(ENGLISH) unrepresentable rather
than merely rejected.
Variants§
Implementations§
Source§impl SegmentLanguage
impl SegmentLanguage
Sourcepub fn walk_revisioned_variant_name(
wire_revision: u16,
discriminant: u32,
) -> Option<&'static str>
pub fn walk_revisioned_variant_name( wire_revision: u16, discriminant: u32, ) -> Option<&'static str>
Resolve a wire discriminant at wire_revision to the variant
identifier at that revision. Returns None if no such variant
exists at that revision.
Generated by the revisioned derive.
Sourcepub fn walk_revisioned_variant_table(
wire_revision: u16,
) -> &'static [(&'static str, u32)]
pub fn walk_revisioned_variant_table( wire_revision: u16, ) -> &'static [(&'static str, u32)]
Variant name + discriminant pairs at wire_revision. Returns
an empty slice if the revision is unknown. Generated by the
revisioned derive.
Trait Implementations§
Source§impl Clone for SegmentLanguage
impl Clone for SegmentLanguage
impl Copy for SegmentLanguage
Source§impl Debug for SegmentLanguage
impl Debug for SegmentLanguage
Source§impl Display for SegmentLanguage
impl Display for SegmentLanguage
impl Eq for SegmentLanguage
Source§impl From<SegmentLanguage> for SegmentLanguage
impl From<SegmentLanguage> for SegmentLanguage
Source§fn from(v: SegmentLanguage) -> Self
fn from(v: SegmentLanguage) -> Self
Converts to this type from the input type.
Source§impl From<SegmentLanguage> for SegmentLanguage
impl From<SegmentLanguage> for SegmentLanguage
Source§fn from(v: SegmentLanguage) -> Self
fn from(v: SegmentLanguage) -> Self
Converts to this type from the input type.
Source§impl Hash for SegmentLanguage
impl Hash for SegmentLanguage
Source§impl PartialEq for SegmentLanguage
impl PartialEq for SegmentLanguage
Source§impl Revisioned for SegmentLanguage
impl Revisioned for SegmentLanguage
Source§impl SkipRevisioned for SegmentLanguage
impl SkipRevisioned for SegmentLanguage
fn skip_revisioned<R: Read>(reader: &mut R) -> Result<(), Error>
Source§fn skip_revisioned_slice(reader: &mut SliceReader<'_>) -> Result<(), Error>
fn skip_revisioned_slice(reader: &mut SliceReader<'_>) -> Result<(), Error>
Consume through bytes backed by
SliceReader without allocating a buffer for bulk segments. Read moreimpl StructuralPartialEq for SegmentLanguage
Source§impl WalkRevisioned for SegmentLanguage
impl WalkRevisioned for SegmentLanguage
Source§type Walker<'r, R: BorrowedReader + 'r> = SegmentLanguageWalker<'r, R>
type Walker<'r, R: BorrowedReader + 'r> = SegmentLanguageWalker<'r, R>
Walker produced by
walk_revisioned. Read moreSource§fn walk_revisioned<'r, R: BorrowedReader>(
reader: &'r mut R,
) -> Result<Self::Walker<'r, R>, Error>
fn walk_revisioned<'r, R: BorrowedReader>( reader: &'r mut R, ) -> Result<Self::Walker<'r, R>, Error>
Read the type’s revision-level prefix and return a walker positioned at
the start of the body. Read more
Auto Trait Implementations§
impl Freeze for SegmentLanguage
impl RefUnwindSafe for SegmentLanguage
impl Send for SegmentLanguage
impl Sync for SegmentLanguage
impl Unpin for SegmentLanguage
impl UnsafeUnpin for SegmentLanguage
impl UnwindSafe for SegmentLanguage
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.