#!/opt/local/bin/gawk -f

#
# Copyright(C) 2007-2012 National Institute of Information and Communications Technology
#


# 評価表現や評価タイプを抜き出して1行1事例にして出力する

BEGIN {
  FS = "\t";
}

{
  if ($10 == "") next;

  sen = $5;
  mrp = $10;
  n8 = split($8, a8, /\\n/);
  n9 = split($9, a9, /\\n/);

  if (n8 != n9) error("n8 != n9");

  for (i = 1; i <= n8; i++) {
    cls = a9[i];
    xpr = a8[i];
    printf "%s\t%s\t%s\t%s\n", cls, xpr, sen, mrp;
  }
}
