def preprocess_mapper(features, lookup_table):
  """Model-specific preprocessing of features from the dataset."""
  features = _num_context_mapper(["context"])(features)
  features = _string_to_tokens_dataset_mapper(["question", "context"])(features)

  # Add the word IDs to the dataset ("question_wid" and "context_wid").
  features = dataset_utils.string_to_int_mapper(["question_tok", "context_tok"],
                                                mapping=lookup_table,
                                                suffix="_wid")(
                                                    features)

  return features
Model-specific preprocessing of features from the dataset.
language/question_answering/decatt_docreader/models/nq_long_model.py