def _correct_searchqa_score(x, dataset):
  """Method to correct for deleted datapoints in the sets.

  Args:
    x: number to correct
    dataset: string that identifies the correction to make

  Returns:
    The rescaled score x.

  Raises:
    ValueError: if dataset is none of train, dev, test.
  """
  if dataset == 'train':
    return x * 90843 / (90843 + 8977)
  elif dataset == 'dev':
    return x * 12635 / (12635 + 1258)
  elif dataset == 'test':
    return x * 24660 / (24660 + 2588)
  else:
    raise ValueError('Unexepected value for dataset: {}'.format(dataset))