class_docstr: bla
class_docstr_tok: ["bla"]
docstr: Args:
      nlp: spacy object
      class_names: list of strings
      use_unk_distribution: if True, the perturbation distribution
          will just replace words randomly with mask_string.
          If False, words will be replaced by similar words using word
          embeddings
      mask_string: String used to mask tokens if use_unk_distribution is True.
docstr_tok: ["Args",":","nlp",":","spacy","object","class_names",":","list","of","strings","use_unk_distribution",":","if","True",",","the","perturbation","distribution","will","just","replace","words","randomly","with","mask_string",".","If","False",",","words","will","be","replaced","by","similar","words","using","word","embeddings","mask_string",":","String","used","to","mask","tokens","if","use_unk_distribution","is","True","."]
code: def __init__(
      self,
      nlp,
      class_names,
      use_unk_distribution=True,
      mask_string="UNK",
  ):
      """
      Args:
          nlp: spacy object
          class_names: list of strings
          use_unk_distribution: if True, the perturbation distribution
              will just replace words randomly with mask_string.
              If False, words will be replaced by similar words using word
              embeddings
          mask_string: String used to mask tokens if use_unk_distribution is True.
      """
      self.nlp = nlp
      self.class_names = class_names
      self.use_unk_distribution = use_unk_distribution
      self.tg = None
      self.mask_string = mask_string
      if not self.use_unk_distribution:
          self.tg = TextGenerator()
  
imports: from .None import utils
  from .None import anchor_base
  from .None import anchor_explanation
  import numpy
  import json
  import os
  import string
  import sys
  from io import open
  import numpy
label_desc: Use image node_id 1 to create a new AnchorText object from inherited base classes: object with example: obj = AnchorText(nlp, class_names, use_unk_distribution, mask_string)