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 Freeze for Example
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more