class_docstr: Builds and/or loads a dictionary.
  
  All code is TorchScriptable.
class_docstr_tok: ["Builds","and\/or","loads","a","dictionary",".","All","code","is","TorchScriptable","."]
docstr: Convert a string to a vector (list of ints).
  
  First runs a sentence tokenizer, then a word tokenizer.
docstr_tok: ["Convert","a","string","to","a","vector","(","list","of","ints",")",".","First","runs","a","sentence","tokenizer",",","then","a","word","tokenizer","."]
code: def txt2vec(self, text: str, dict_tokenizer: str) -> List[int]:
      """
      Convert a string to a vector (list of ints).
  
      First runs a sentence tokenizer, then a word tokenizer.
      """
      itr: List[int] = []
      if (
          dict_tokenizer == "gpt2"
          or dict_tokenizer == "slow_bytelevel_bpe"
      ):
          for token in self.gpt2_tokenize(str(text)):
              itr.append(self._word_lookup(token))
      elif dict_tokenizer == "bpe":
          for token in self.bpe_tokenize(str(text)):
              itr.append(self._word_lookup(token))
      else:
          raise NotImplementedError
      return itr
  
imports: from typing import Dict, List, Tuple
  import torch.jit
label_desc: Use image node_id 6 for calling the ScriptableDictionaryAgent obj's underlying member method code with example usage: obj.txt2vec(text, dict_tokenizer) and returns: itr