def preprocess_mapper(features, params, lookup_table):
  """Model-specific preprocessing of features from the dataset."""
  features["question_inputs"] = text_utils.build_text_inputs(
      text=features["question"],
      length=params["question_length"],
      lookup_table=lookup_table)

  features["context_inputs"] = text_utils.build_text_inputs(
      text=features["context"],
      length=params["context_length"],
      lookup_table=lookup_table)

  # Remove extra inputs.
  features = {f: features[f] for f in features if f in KEYS}

  return features
Model-specific preprocessing of features from the dataset.
language/capwap/datasets/rc_dataset.py