pub enum TextAugmentation {
SynonymReplacement {
probability: f64,
num_replacements: usize,
},
RandomInsertion {
probability: f64,
num_insertions: usize,
},
RandomDeletion {
probability: f64,
},
RandomSwap {
probability: f64,
num_swaps: usize,
},
BackTranslation {
intermediate_language: String,
},
Paraphrasing {
model_type: String,
},
}
Expand description
Text augmentation techniques
Variants§
SynonymReplacement
Random synonym replacement
Fields
RandomInsertion
Random word insertion
Fields
RandomDeletion
Random word deletion
RandomSwap
Random word swap
Fields
BackTranslation
Back translation
Paraphrasing
Paraphrasing
Trait Implementations§
Source§impl Clone for TextAugmentation
impl Clone for TextAugmentation
Source§fn clone(&self) -> TextAugmentation
fn clone(&self) -> TextAugmentation
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TextAugmentation
impl Debug for TextAugmentation
Source§impl PartialEq for TextAugmentation
impl PartialEq for TextAugmentation
impl StructuralPartialEq for TextAugmentation
Auto Trait Implementations§
impl Freeze for TextAugmentation
impl RefUnwindSafe for TextAugmentation
impl Send for TextAugmentation
impl Sync for TextAugmentation
impl Unpin for TextAugmentation
impl UnwindSafe for TextAugmentation
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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