def process_table(table_name, columns, tokenizer, aligned_schema_entities):
  """Processes a schema table into a DatabaseTable object."""
  table_obj = DatabaseTable()
  table_obj.original_table_name = table_name

  table_obj.matches_to_utterance = table_obj.original_table_name.lower(
  ).replace('_', ' ') in aligned_schema_entities

  # Name wordpieces. Remove underscores then tokenize.
  table_obj.table_name_wordpieces.extend(
      get_wordpieces(table_name.replace('_', ' '), tokenizer)[0])

  table_obj.table_columns.extend(
      process_columns(columns, tokenizer, table_obj.original_table_name,
                      aligned_schema_entities))

  return table_obj
Processes a schema table into a DatabaseTable object.
language/xsp/data_preprocessing/schema_utils.py