Struct rust_tokenizers::adapters::Example
source · pub struct Example {
pub sentence_1: String,
pub sentence_2: String,
pub label: Label,
}
Expand description
SST2 sample
Contains a placeholder for up to 2 sentences (the SST2 dataset only contains one per example) and a label
Fields§
§sentence_1: String
§sentence_2: String
§label: Label
Implementations§
source§impl Example
impl Example
sourcepub fn new_from_string(sentence: &str) -> Self
pub fn new_from_string(sentence: &str) -> Self
sourcepub fn new_from_strings(sentence_1: &str, sentence_2: &str) -> Self
pub fn new_from_strings(sentence_1: &str, sentence_2: &str) -> Self
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Example
impl Send for Example
impl Sync for Example
impl Unpin for Example
impl UnwindSafe for Example
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