import logging


def _get_do_lower_case(do_lower_case, vocab_file):
  """Returns do_lower_case, replacing None by a guess from vocab file name."""
  if do_lower_case is None:
    do_lower_case = "uncased" in vocab_file
    logging.info("Using do_lower_case=%s based on name of vocab_file=%s",
                 do_lower_case, vocab_file)
  return do_lower_case