class_docstr: This class is an implementation of the original EDA algorithm (2019) [1].
  
  [1] Wei, J. and Zou, K., 2019, November. EDA: Easy Data Augmentation Techniques for Boosting Performance on
  Text Classification Tasks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing
  and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) (pp. 6383-6389).
  https://www.aclweb.org/anthology/D19-1670.pdf
  
  Example usage: ::
      >>> from textaugment import EDA
      >>> t = EDA()
      >>> t.synonym_replacement("John is going to town",top_n=3)
      John is give out to town
      >>> t.random_deletion("John is going to town", p=0.2)
      is going to town
      >>> t.random_swap("John is going to town")
      John town going to is
      >>> t.random_insertion("John is going to town")
      John is going to make up town
class_docstr_tok: ["This","class","is","an","implementation","of","the","original","EDA","algorithm","(","2019",")","[","1","]",".","[","1","]","Wei",",","J.","and","Zou",",","K.",",","2019",",","November",".","EDA",":","Easy","Data","Augmentation","Techniques","for","Boosting","Performance","on","Text","Classification","Tasks",".","In","Proceedings","of","the","2019","Conference","on","Empirical","Methods","in","Natural","Language","Processing","and","the","9th","International","Joint","Conference","on","Natural","Language","Processing","(","EMNLP-IJCNLP",")","(","pp",".","6383-6389",")",".","https",":","\/\/www.aclweb.org\/anthology\/D19-1670.pdf","Example","usage",":",":",":",">",">",">","from","textaugment","import","EDA",">",">",">","t","=","EDA","(",")",">",">",">","t.synonym_replacement","(","``","John","is","going","to","town","''",",","top_n=3",")","John","is","give","out","to","town",">",">",">","t.random_deletion","(","``","John","is","going","to","town","''",",","p=0.2",")","is","going","to","town",">",">",">","t.random_swap","(","``","John","is","going","to","town","''",")","John","town","going","to","is",">",">",">","t.random_insertion","(","``","John","is","going","to","town","''",")","John","is","going","to","make","up","town"]
docstr: Swap words
docstr_tok: ["Swap","words"]
code: def swap_word(new_words):
      """Swap words"""
      random_idx_1 = random.randint(0, len(new_words) - 1)
      random_idx_2 = random_idx_1
      counter = 0
      while random_idx_2 == random_idx_1:
          random_idx_2 = random.randint(0, len(new_words) - 1)
          counter += 1
          if counter > 3:
              return new_words
      new_words[random_idx_1], new_words[random_idx_2] = (
          new_words[random_idx_2],
          new_words[random_idx_1],
      )
      return new_words
  
file_path: textaugment/textaugment/eda.py
imports: import nltk
  from nltk.corpus import wordnet, stopwords
  import random
label_desc: Use image node_id 2 for calling the EDA obj's underlying member method code with example usage: obj.swap_word(new_words) and returns: new_words, new_words