class_docstr: An implementation of Easy Data Augmentation, which combines:
  
  - WordNet synonym replacement
      - Randomly replace words with their synonyms.
  - Word deletion
      - Randomly remove words from the sentence.
  - Word order swaps
      - Randomly swap the position of words in the sentence.
  - Random synonym insertion
      - Insert a random synonym of a random word at a random location.
  
  in one augmentation method.
  
  "EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Tasks" (Wei and Zou, 2019)
  https://arxiv.org/abs/1901.11196
class_docstr_tok: ["An","implementation","of","Easy","Data","Augmentation",",","which","combines",":","-","WordNet","synonym","replacement","-","Randomly","replace","words","with","their","synonyms",".","-","Word","deletion","-","Randomly","remove","words","from","the","sentence",".","-","Word","order","swaps","-","Randomly","swap","the","position","of","words","in","the","sentence",".","-","Random","synonym","insertion","-","Insert","a","random","synonym","of","a","random","word","at","a","random","location",".","in","one","augmentation","method",".","``","EDA",":","Easy","Data","Augmentation","Techniques","for","Boosting","Performance","on","Text","Classification","Tasks","''","(","Wei","and","Zou",",","2019",")","https",":","\/\/arxiv.org\/abs\/1901.11196"]
code: def __init__(
      self, pct_words_to_swap=0.1, transformations_per_example=4
  ):
      assert (
          0.0 <= pct_words_to_swap <= 1.0
      ), "pct_words_to_swap must be in [0., 1.]"
      assert (
          transformations_per_example > 0
      ), "transformations_per_example must be a positive integer"
      self.pct_words_to_swap = pct_words_to_swap
      self.transformations_per_example = transformations_per_example
      n_aug_each = max(transformations_per_example // 4, 1)
  
      self.synonym_replacement = WordNetAugmenter(
          pct_words_to_swap=pct_words_to_swap,
          transformations_per_example=n_aug_each,
      )
      self.random_deletion = DeletionAugmenter(
          pct_words_to_swap=pct_words_to_swap,
          transformations_per_example=n_aug_each,
      )
      self.random_swap = SwapAugmenter(
          pct_words_to_swap=pct_words_to_swap,
          transformations_per_example=n_aug_each,
      )
      self.random_insertion = SynonymInsertionAugmenter(
          pct_words_to_swap=pct_words_to_swap,
          transformations_per_example=n_aug_each,
      )
  
imports: import random
  from textattack.constraints.pre_transformation import RepeatModification, StopwordModification
  from textattack.constraints.semantics.sentence_encoders import UniversalSentenceEncoder
  from .None import Augmenter
label_desc: Use image node_id 1 to create a new EasyDataAugmenter object from inherited base classes: Augmenter with example: obj = EasyDataAugmenter(pct_words_to_swap, transformations_per_example)