class_docstr: Transforms input by common abbreviations in TwitterType.
  
  :param str mode: Twitter type, only support ['at', 'url', 'random']
class_docstr_tok: ["Transforms","input","by","common","abbreviations","in","TwitterType",".",":","param","str","mode",":","Twitter","type",",","only","support","[","'at","'",",","'url","'",",","'random","'","]"]
docstr: :param Sample sample: Sample
  :param str field: field str
  :return list indices: list of contractions indices list
  :return list contractions: list of contractions list
docstr_tok: [":","param","Sample","sample",":","Sample",":","param","str","field",":","field","str",":","return","list","indices",":","list","of","contractions","indices","list",":","return","list","contractions",":","list","of","contractions","list"]
code: def _get_contractions(self, sample, field):
      r"""
      :param Sample sample: Sample
      :param str field: field str
      :return list indices: list of contractions indices list
      :return list contractions: list of contractions list
  
      """
      tokens = sample.get_words(field)
      contractions = []
      indices = []
  
      for twitter_phrase in self.twitter_dic:
          twitter_words = self.processor.tokenize(twitter_phrase)
  
          for i in range(len(tokens) - len(twitter_words)):
              if tokens[i : len(twitter_words)] == twitter_words:
                  contractions.append(self.twitter_dic[twitter_phrase])
                  indices.append([i, i + len(twitter_words)])
  
      return indices, contractions
  
file_path: textflint/textflint/generation/transformation/UT/twitter_type.py
imports: import random
  import string
  import numpy
  from ..transformation import Transformation
  from ....common.settings import TWITTER_PATH
  from ....common.utils.load import json_loader
  from ....common.utils.install import download_if_needed
label_desc: Use image node_id 4 for calling the TwitterType obj's underlying member method code with example usage: obj._get_contractions(sample, field) and returns: indices,  contractions