def tuple_dataset(context,
                  tuple_input,
                  type_specs,
                  normalize_outputs = True,
                  field_separator = '\t',
                  entity_separator = ' || ',
                  start_line = 0,
                  end_line = None):
  """Produce a dataset by parsing lines from a file.

  Lines are formatted as described in documents for tuple_generator_builder.

  Args:
    context: passed to tuple_generator_builder
    tuple_input: passed to tuple_generator_builder
    type_specs: passed to tuple_generator_builder
    normalize_outputs: passed to tuple_generator_builder
    field_separator: passed to tuple_generator_builder
    entity_separator: passed to tuple_generator_builder
    start_line: passed to tuple_generator_builder
    end_line: passed to tuple_generator_builder

  Returns:
    tf.Data.Dataset over tuples, with one component for tab-separated field
  """

  return tf.data.Dataset.from_generator(
      tuple_generator_builder(context, tuple_input, type_specs,
                              normalize_outputs, field_separator,
                              entity_separator, start_line, end_line),
      tuple([spec_as_tf_type(spec) for spec in type_specs]),
      tuple([spec_as_shape(spec, context) for spec in type_specs]))
Produce a dataset by parsing lines from a file.

  Lines are formatted as described in documents for tuple_generator_builder.

  Args:
    context: passed to tuple_generator_builder
    tuple_input: passed to tuple_generator_builder
    type_specs: passed to tuple_generator_builder
    normalize_outputs: passed to tuple_generator_builder
    field_separator: passed to tuple_generator_builder
    entity_separator: passed to tuple_generator_builder
    start_line: passed to tuple_generator_builder
    end_line: passed to tuple_generator_builder

  Returns:
    tf.Data.Dataset over tuples, with one component for tab-separated field
  
language/nql/nql/dataset.py