class_docstr: Version of parlai.utils.bpe.SubwordBPEHelper that can be TorchScripted.
class_docstr_tok: ["Version","of","parlai.utils.bpe.SubwordBPEHelper","that","can","be","TorchScripted","."]
docstr: Return set of symbol pairs in a word.
  
  Word is represented as list of symbols (symbols being variable-length strings).
  
  :param word:
      word to symbolize
  
  :return pairs:
      set of tuples of symbols
docstr_tok: ["Return","set","of","symbol","pairs","in","a","word",".","Word","is","represented","as","list","of","symbols","(","symbols","being","variable-length","strings",")",".",":","param","word",":","word","to","symbolize",":","return","pairs",":","set","of","tuples","of","symbols"]
code: def get_pairs(self, word: List[str]) -> List[Tuple[str, str]]:
      """
      Return set of symbol pairs in a word.
  
      Word is represented as list of symbols (symbols being variable-length strings).
  
      :param word:
          word to symbolize
  
      :return pairs:
          set of tuples of symbols
      """
      pairs: List[Tuple[str, str]] = []
      prev_char = word[0]
  
      for char in word[1:]:
          pairs.append((prev_char, char))
          prev_char = char
  
      return pairs
  
imports: from typing import Dict, List, Tuple
  import torch.jit
label_desc: Use image node_id 4 for calling the ScriptableSubwordBpeHelper obj's underlying member method code with example usage: obj.get_pairs(word) and returns: pairs