pub struct TokenizerEpoch(/* private fields */);Expand description
A tokenizer epoch: the identity of one analysis behaviour.
Stored as a little-endian u64 in EpochMeta.tokenizer.
Implementations§
Source§impl TokenizerEpoch
impl TokenizerEpoch
Sourcepub fn of(config: &TokenizerConfig) -> Self
pub fn of(config: &TokenizerConfig) -> Self
Computes the epoch of a configuration.
§The canonical digest input
Little-endian throughout, length-prefixed for every variable field, in exactly this order: magic, segmenter id, folding form id, folding table version, Unicode version string, stopword list id, stopword term count, stemmer id, the three boolean knobs, profile id, then the vocabulary. The vocabulary contributes its entry count followed by every (surface form, canonical term) pair in sorted order, so two vocabularies built by different insertion orders digest identically.
This layout is a persisted-meaning contract frozen by
golden_streams_cannot_change_without_an_epoch_bump.
Trait Implementations§
Source§impl Clone for TokenizerEpoch
impl Clone for TokenizerEpoch
impl Copy for TokenizerEpoch
Source§impl Debug for TokenizerEpoch
impl Debug for TokenizerEpoch
Source§impl Display for TokenizerEpoch
impl Display for TokenizerEpoch
impl Eq for TokenizerEpoch
Source§impl Hash for TokenizerEpoch
impl Hash for TokenizerEpoch
Source§impl Ord for TokenizerEpoch
impl Ord for TokenizerEpoch
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for TokenizerEpoch
impl PartialEq for TokenizerEpoch
Source§impl PartialOrd for TokenizerEpoch
impl PartialOrd for TokenizerEpoch
impl StructuralPartialEq for TokenizerEpoch
Auto Trait Implementations§
impl Freeze for TokenizerEpoch
impl RefUnwindSafe for TokenizerEpoch
impl Send for TokenizerEpoch
impl Sync for TokenizerEpoch
impl Unpin for TokenizerEpoch
impl UnsafeUnpin for TokenizerEpoch
impl UnwindSafe for TokenizerEpoch
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