class_docstr: An class that supply methods for ABSA task data transformation.
docstr: Get the span of term in trans_sentence.
  
  :param list trans_sentence: transformed sentence
  :param list term: target term
  :return: start and end index of target term
docstr_tok: ["Get","the","span","of","term","in","trans_sentence",".",":","param","list","trans_sentence",":","transformed","sentence",":","param","list","term",":","target","term",":","return",":","start","and","end","index","of","target","term"]
code: def get_term_span(self, trans_sentence, term):
      r"""
      Get the span of term in trans_sentence.
  
      :param list trans_sentence: transformed sentence
      :param list term: target term
      :return: start and end index of target term
      """
      span_from = 0
      char_from = 0
      char_sentence = "".join(self.tokenize(trans_sentence))
      char_term = "".join(self.tokenize(term))
      for idx in range(len(char_sentence)):
          if char_sentence[idx : idx + len(char_term)] == char_term:
              char_from = len(char_sentence[:idx])
              break
      trans_from = 0
      for idx in range(len(trans_sentence)):
          if trans_sentence[idx] != " ":
              trans_from += 1
          if (
              trans_from == char_from
              and char_from != 0
              and trans_sentence[idx + 1] != " "
          ):
              span_from = idx + 1
              break
          if (
              trans_from == char_from
              and char_from != 0
              and trans_sentence[idx + 1] == " "
          ):
              span_from = idx + 2
              break
      span_to = span_from + len(term)
  
      return span_from, span_to
  
imports: import random
  from abc import ABC
  from copy import deepcopy
  from ..transformation import Transformation
  from ....common.settings import NEGATIVE_WORDS_LIST, DEGREE_WORD_LIST
label_desc: Use image node_id 10 for calling the ABSATransformation obj's underlying member method code with example usage: obj.get_term_span(trans_sentence, term) and returns: span_from,  span_to