#[repr(i32)]pub enum ModelType {
Unigram = 1,
Bpe = 2,
Word = 3,
Char = 4,
}Expand description
Model type.
Variants§
Unigram = 1
Unigram language model with dynamic algorithm
Bpe = 2
Byte Pair Encoding
Word = 3
Delimitered by whitespace.
Char = 4
tokenizes into character sequence
Implementations§
Source§impl ModelType
impl ModelType
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Ord for ModelType
impl Ord for ModelType
Source§impl PartialOrd for ModelType
impl PartialOrd for ModelType
impl Copy for ModelType
impl Eq for ModelType
impl StructuralPartialEq for ModelType
Auto Trait Implementations§
impl Freeze for ModelType
impl RefUnwindSafe for ModelType
impl Send for ModelType
impl Sync for ModelType
impl Unpin for ModelType
impl UnwindSafe for ModelType
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