code: def update_text(
      sentence: List[str], wordvec_type: WVType
  ) -> List[str]:
      """
      Process a line of text (with tokenization provided as whitespace)
      into a list of strings.
      """
      # stanford sentiment dataset has a lot of random - and /
      # remove those characters and flatten the newly created sublists into one list each time
      sentence = [y for x in sentence for y in x.split("-") if y]
      sentence = [y for x in sentence for y in x.split("/") if y]
      sentence = [x.strip() for x in sentence]
      sentence = [x for x in sentence if x]
      if sentence == []:
          # removed too much
          sentence = ["-"]
      # our current word vectors are all entirely lowercased
      sentence = [word.lower() for word in sentence]
      if wordvec_type == WVType.WORD2VEC:
          return sentence
      elif wordvec_type == WVType.GOOGLE:
          new_sentence = []
          for word in sentence:
              if word != "0" and word != "1":
                  word = re.sub("[0-9]", "#", word)
              new_sentence.append(word)
          return new_sentence
      elif wordvec_type == WVType.FASTTEXT:
          return sentence
      elif wordvec_type == WVType.OTHER:
          return sentence
      else:
          raise ValueError(
              "Unknown wordvec_type {}".format(wordvec_type)
          )
  
imports: import collections
  from collections import namedtuple
  import logging
  import json
  import random
  import re
  from typing import List
  from stanza.models.classifiers.utils import WVType
  from stanza.models.common.vocab import PAD, PAD_ID, UNK, UNK_ID
  import stanza.models.constituency.tree_reader
label_desc: Use image node_id 1 for calling a global function with example usage: update_text(sentence, wordvec_type) and returns: sentence, new_sentence, sentence, sentence