def _split_vocabulary_entries(batched_vocab_lines):
  """Splits vocabulary entries separated by a single space.

  Vocabulary entries that include indicators are formatted as:
  "<indicator><single space><key>"

  Args:
    batched_vocab_lines: A possible batched string tensor.

  Returns:
    A pair of (indicator, key) tensors.
  """
  # Setting maxsplit=1 allows the vocabulary entries to include space
  # characters.
  split = tf.strings.split(batched_vocab_lines, sep=' ', maxsplit=1)
  if isinstance(split, tf.RaggedTensor):
    split_tensor = split.to_tensor()
    return split_tensor[:, 1], split_tensor[:, 0]
  else:
    return split[1], split[0]
Splits vocabulary entries separated by a single space.

  Vocabulary entries that include indicators are formatted as:
  "<indicator><single space><key>"

  Args:
    batched_vocab_lines: A possible batched string tensor.

  Returns:
    A pair of (indicator, key) tensors.
  
tensorflow_transform/tf_utils.py