pub struct TextEncoderConfig {
pub position_stride: usize,
pub ngram_size: Option<usize>,
pub lowercase: bool,
pub code_aware: bool,
}Expand description
Configuration for the text encoder.
Fields§
§position_stride: usizeNumber of positions to shift for position encoding. Default: 1 (each token position shifts by 1 permutation).
ngram_size: Option<usize>Whether to include character n-grams for typo robustness. Default: false.
lowercase: boolWhether to lowercase text before encoding. Default: true.
code_aware: boolEnable code-aware tokenization (split on _, -, ., /, ::).
Default: false.
Trait Implementations§
Source§impl Clone for TextEncoderConfig
impl Clone for TextEncoderConfig
Source§fn clone(&self) -> TextEncoderConfig
fn clone(&self) -> TextEncoderConfig
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 TextEncoderConfig
impl Debug for TextEncoderConfig
Auto Trait Implementations§
impl Freeze for TextEncoderConfig
impl RefUnwindSafe for TextEncoderConfig
impl Send for TextEncoderConfig
impl Sync for TextEncoderConfig
impl Unpin for TextEncoderConfig
impl UnsafeUnpin for TextEncoderConfig
impl UnwindSafe for TextEncoderConfig
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