def generate_split(queries_path, fraction_dev, fraction_test):
  """Place queries in sets of training, dev, test, and heldout train.

  Args:
     queries_path : str name of file containing json table of queries
     fraction_dev: str 1 iff exporting dev set, otherwise 0
     fraction_test : str 1 iff exporting test set, otherwise 0

  Returns:
     sets of train, dev, and test queries

  """
  train_qids = {}
  dev_qids = {}
  test_qids = {}
  train_eval_qids = {}
  queries = get_table(queries_path)
  answers = get_table(FLAGS.answers_path)
  num_examples = 0
  n_queries = len(queries)
  assert (fraction_dev == 0 or fraction_dev == 1)
  assert (fraction_test == 0 or fraction_test == 1)
  assert fraction_test * fraction_dev == 0

  # actually iterate over the neighbors
  print("Splitting " + str(n_queries) + "queries")
  for q_id, _ in queries.items():

    num_examples = num_examples + 1

    if fraction_dev == 1:
      dev_qids[q_id] = 1
      continue
    if fraction_test == 1:
      test_qids[q_id] = 1
      continue

    if q_id in answers:
      train_qids[q_id] = 1

  tf.logging.info(
      "Created examples train {} eval {} test {} train eval {}".format(
          len(train_qids), len(dev_qids), len(test_qids), len(train_eval_qids)))
  return train_qids, dev_qids, test_qids, train_eval_qids
Place queries in sets of training, dev, test, and heldout train.

  Args:
     queries_path : str name of file containing json table of queries
     fraction_dev: str 1 iff exporting dev set, otherwise 0
     fraction_test : str 1 iff exporting test set, otherwise 0

  Returns:
     sets of train, dev, and test queries

  
language/multivec/preprocessing/create_training_data.py