System.out.printf("%5.2f (%d/%d)\n", (double)invalid/total, invalid, total);
}
void toQuestion(String[] args)
{
SRLReader reader = new SRLReader(0, 1, 2, 3, 4, 5, 6, 7);
reader.open(UTInput.createBufferedFileReader(args[0]));
PrintStream fout = UTOutput.createPrintBufferedFileStream(args[1]);
Pattern p = UTRegex.getORPatternExact(DEPLibEn.DEP_COMPLM, DEPLibEn.DEP_MARK);
DEPNode root, head;
DEPTree tree;
while ((tree = reader.next()) != null)
{
tree.setDependents();
root = tree.getFirstRoot();
head = root.getDependents().get(0).getNode();
tree = new DEPTree();
head.removeDependentsByLabels(p);
for (DEPNode node : head.getSubNodeSortedList())
{
tree.add(node);
if (node.isDependentOf(root))
node.setHead(tree.get(0), DEPLibEn.DEP_ROOT);
}
tree.resetIDs();
fout.println(tree.toStringSRL()+"\n");
}
fout.close();
reader.close();
}