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","."]
docstr: This is to extend noising functions to be able to apply to non-bpe
  tokens, e.g. word or characters.
docstr_tok: ["This","is","to","extend","noising","functions","to","be","able","to","apply","to","non-bpe","tokens",",","e.g",".","word","or","characters","."]
code: def _get_token_idx(self, x):
      """
      This is to extend noising functions to be able to apply to non-bpe
      tokens, e.g. word or characters.
      """
      x = torch.t(x)
      word_idx = np.array([range(len(x_i)) for x_i in x])
      return np.transpose(word_idx)
  
imports: import numpy
  import torch
  from fairseq.data import data_utils
label_desc: Use image node_id 4 for calling the WordNoising obj's underlying member method code with example usage: obj._get_token_idx(x) and returns: np