class_docstr: A helper class that represents input string that to be modified.
  
  Text that Sample contains parsed in data set,
  ``TextField`` provides multiple methods for Sample to modify.
  
  Support sentence level and word level modification,
  default using word level API.
docstr: :param str|list field_value: Sentence string or tokenized words.
  :param list mask: list of mask values
  :param bool is_one_sent: whether input is a sentence
  :param boo split_by_space: whether tokenize sentence by split space
  :param kwargs:
docstr_tok: [":","param","str|list","field_value",":","Sentence","string","or","tokenized","words",".",":","param","list","mask",":","list","of","mask","values",":","param","bool","is_one_sent",":","whether","input","is","a","sentence",":","param","boo","split_by_space",":","whether","tokenize","sentence","by","split","space",":","param","kwargs",":"]
code: def __init__(
      self,
      field_value,
      mask=None,
      is_one_sent=False,
      split_by_space=False,
      **kwargs,
  ):
      r"""
  
      :param str|list field_value: Sentence string or tokenized words.
      :param list mask: list of mask values
      :param bool is_one_sent: whether input is a sentence
      :param boo split_by_space: whether tokenize sentence by split space
      :param kwargs:
  
      """
      if isinstance(field_value, str):
          # lazy load
          self._words = None
          self._text = field_value
      elif isinstance(field_value, list):
          self._words = field_value
          self._text = None
      else:
          raise ValueError(
              "TextField supports string/token list, given {0}".format(
                  type(field_value)
              )
          )
  
      super().__init__(field_value, field_type=(str, list), **kwargs)
  
      self._mask = None
      self.is_one_sent = is_one_sent
      self.split_by_space = split_by_space
      if mask:
          self.replace_mask(mask)
  
      # Process tags lazily
      self._sentences = None
      self._pos_tags = None
      self._ner_tags = None
      self._dp_tags = None
  
imports: from .field import Field
  from ....common.utils.list_op import *
  from ....common.preprocess.en_processor import EnProcessor
  from ....common.settings import ORIGIN, TASK_MASK, MODIFIED_MASK
label_desc: Use image node_id 1 to create a new TextField object from inherited base classes: Field with example: obj = TextField(field_value, mask, is_one_sent, split_by_space)