class_docstr: An class that supply methods for ABSA task data transformation.
docstr: Add the degree words to sentence.
  
  :param list word_list: tokenized words of original sentence
  :param int from_idx: index of start
  :param int to_idx: index of end
  :return: transformed sentence and opinion words
docstr_tok: ["Add","the","degree","words","to","sentence",".",":","param","list","word_list",":","tokenized","words","of","original","sentence",":","param","int","from_idx",":","index","of","start",":","param","int","to_idx",":","index","of","end",":","return",":","transformed","sentence","and","opinion","words"]
code: def add_degree_words(word_list, from_idx, to_idx):
      r"""
      Add the degree words to sentence.
  
      :param list word_list: tokenized words of original sentence
      :param int from_idx: index of start
      :param int to_idx: index of end
      :return: transformed sentence and opinion words
      """
      candidate_list = DEGREE_WORD_LIST
      select = random.randint(0, len(candidate_list) - 1)
      opi1 = [
          " ".join(
              [candidate_list[select]]
              + word_list[from_idx : from_idx + 1]
          )
      ]
      new_words = (
          word_list[:from_idx] + opi1 + word_list[from_idx + 1 :]
      )
      opi = new_words[from_idx:to_idx]
  
      return new_words, opi
  
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 7 for calling the ABSATransformation obj's underlying member method code with example usage: obj.add_degree_words(word_list, from_idx, to_idx) and returns: new_words,  opi