asrtoolkit/clean_formatting.py
def clean_up(input_line):
  """
    Apply all text cleaning operations to input line
  """
  for char_to_replace in [',', '*', '&']:
    input_line = input_line.replace(char_to_replace, '')

  for pat in rematch:
    input_line = re.sub(rematch[pat][0], rematch[pat][1], input_line)

  for char_to_replace in [',', '*', '&', '.', '-']:
    input_line = input_line.replace(char_to_replace, '')

  input_line = input_line.encode().decode('utf-8').lower()

  # check for double spacing
  while "  " in input_line:
    input_line = input_line.replace("  ", " ")
  return input_line

    Apply all text cleaning operations to input line
  
Apply all text cleaning operations to input line
Apply all text cleaning operations to input line
def clean_up(input_line):
  for char_to_replace in [',', '*', '&']:
    input_line = input_line.replace(char_to_replace, '')
  for pat in rematch:
    input_line = re.sub(rematch[pat][0], rematch[pat][1], input_line)
  for char_to_replace in [',', '*', '&', '.', '-']:
    input_line = input_line.replace(char_to_replace, '')
  input_line = input_line.encode().decode('utf-8').lower()
  while "  " in input_line:
    input_line = input_line.replace("  ", " ")
  return input_line
def clean_up ( input_line ) : for char_to_replace in [ ',' , '*' , '&' ] : input_line = input_line . replace ( char_to_replace , '' ) for pat in rematch : input_line = re . sub ( rematch [ pat ] [ 0 ] , rematch [ pat ] [ 1 ] , input_line ) for char_to_replace in [ ',' , '*' , '&' , '.' , '-' ] : input_line = input_line . replace ( char_to_replace , '' ) input_line = input_line . encode ( ) . decode ( 'utf-8' ) . lower ( ) while "  " in input_line : input_line = input_line . replace ( "  " , " " ) return input_line
Apply all text cleaning operations to input line
Apply all text cleaning operations to input line
"""
    Apply all text cleaning operations to input line
  """ # check for double spacing
input_line