class_docstr: Generate a noisy version of a sentence, without changing words themselves.
class_docstr_tok: ["Generate","a","noisy","version","of","a","sentence",",","without","changing","words","themselves","."]
code: def __init__(
      self, dictionary, bpe_cont_marker="@@", bpe_end_marker=None
  ):
      self.dictionary = dictionary
      self.bpe_end = None
      if bpe_cont_marker:
          self.bpe_end = np.array(
              [
                  not self.dictionary[i].endswith(bpe_cont_marker)
                  for i in range(len(self.dictionary))
              ]
          )
      elif bpe_end_marker:
          self.bpe_end = np.array(
              [
                  self.dictionary[i].endswith(bpe_end_marker)
                  for i in range(len(self.dictionary))
              ]
          )
  
      self.get_word_idx = (
          self._get_bpe_word_idx
          if self.bpe_end is not None
          else self._get_token_idx
      )
  
imports: import numpy
  import torch
  from fairseq.data import data_utils
label_desc: Use image node_id 1 to create a new WordNoising object from inherited base classes: object with example: obj = WordNoising(dictionary, bpe_cont_marker, bpe_end_marker)