def read_data(data_file, long_para_max):
  """Read Wiki-A eval dataset.

  Args:
    data_file: data file to read from
    long_para_max: max size required to capture entire paragraph

  Returns:
    tuple of short_para, long_para, short_para_max, long_para_max
       short_para is a list of paragraphs max size short_para_max
       long_para is a list of paragraphs max size long_para_max

  """
  # Read from Wiki-A
  data = []
  with tf.gfile.Open(data_file, "r") as handle:
    for line in handle:
      if line.strip():
        data.append(line.strip())

  data_paragraphs = []
  para = []
  for d in data:
    if d == PARA_BREAK:
      data_paragraphs.append(para)
      para = []
    else:
      para.append(d)
  if para:
    data_paragraphs.append(para)

  short_data_paragraphs = [d for d in data_paragraphs if len(d) < 17]
  long_data_paragraphs = [d for d in data_paragraphs if len(d) >= 17]
  return short_data_paragraphs, long_data_paragraphs, 16, long_para_max
Read Wiki-A eval dataset.

  Args:
    data_file: data file to read from
    long_para_max: max size required to capture entire paragraph

  Returns:
    tuple of short_para, long_para, short_para_max, long_para_max
       short_para is a list of paragraphs max size short_para_max
       long_para is a list of paragraphs max size long_para_max

  
language/conpono/evals/coherence_eval.py