class_docstr: Abstract class for dialog problems.
docstr: Clean a line with some regex rules.
  
  Args:
    line: string, line to be processed and returned
  
  Returns:
    string
docstr_tok: ["Clean","a","line","with","some","regex","rules",".","Args",":","line",":","string",",","line","to","be","processed","and","returned","Returns",":","string"]
code: def clean_line(self, line):
      """Clean a line with some regex rules.
  
      Args:
        line: string, line to be processed and returned
  
      Returns:
        string
      """
  
      # 2 functions for more complex replacing.
      def replace(matchobj):
          return re.sub("'", " '", str(matchobj.group(0)))
  
      def replace_null(matchobj):
          return re.sub("'", "", str(matchobj.group(0)))
  
      # Keep some special tokens.
      line = re.sub("[^a-z .?!'0-9]", "", line)
      line = re.sub("[.]", " . ", line)
      line = re.sub("[?]", " ? ", line)
      line = re.sub("[!]", " ! ", line)
  
      # Take care of apostrophes.
      line = re.sub("[ ]'[ ]", " ", line)
      line = re.sub(" '[a-z]", replace_null, line)
      line = re.sub("n't", " n't", line)
      line = re.sub("[^ n]'[^ t]", replace, line)
  
      return line
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import re
  import tarfile
  import zipfile
  import requests
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.data_generators.text_problems import VocabType
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import metrics
  import tensorflow.compat.v1
label_desc: Use image node_id 35 for calling the DialogAbstract obj's underlying member method code with example usage: obj.clean_line(line) and returns: line, re, re