class_docstr: Class for splitting texts on tokens using NLTK wrapper over MosesTokenizer
  
  Attributes:
      escape: whether escape characters for use in html markup
      tokenizer: tokenizer instance from nltk.tokenize.moses
      detokenizer: detokenizer instance from nltk.tokenize.moses
  
  Args:
      escape: whether escape characters for use in html markup
docstr: Tokenize given batch of strings or detokenize given batch of lists of tokens
  
  Args:
      batch: list of text samples or list of lists of tokens
  
  Returns:
      list of lists of tokens or list of text samples
docstr_tok: ["Tokenize","given","batch","of","strings","or","detokenize","given","batch","of","lists","of","tokens","Args",":","batch",":","list","of","text","samples","or","list","of","lists","of","tokens","Returns",":","list","of","lists","of","tokens","or","list","of","text","samples"]
code: def __call__(
      self, batch: List[Union[str, List[str]]]
  ) -> List[Union[List[str], str]]:
      """Tokenize given batch of strings or detokenize given batch of lists of tokens
  
      Args:
          batch: list of text samples or list of lists of tokens
  
      Returns:
          list of lists of tokens or list of text samples
      """
      if isinstance(batch[0], str):
          return [
              self.tokenizer.tokenize(line, escape=self.escape)
              for line in batch
          ]
      else:
          return [
              self.detokenizer.detokenize(
                  line, return_str=True, unescape=self.escape
              )
              for line in batch
          ]
  
imports: from typing import Union, List
  from sacremoses import MosesDetokenizer, MosesTokenizer
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
label_desc: Use image node_id 2 for calling the NLTKMosesTokenizer obj's underlying member method code with example usage: obj.__call__(batch) and returns: unknown, unknown