public static void main (String[] args) throws Throwable { TestSuite theSuite; if (args.length > 0) { theSuite = new TestSuite (); for (int i = 0; i < args.length; i++) { theSuite.addTest (new TestPerDocumentF1Evaluator (args[i])); } } else { theSuite = (TestSuite) suite (); } junit.textui.TestRunner.run (theSuite); }
public void testPerFieldEval () { Extraction extraction = createExtractionFrom (mpdPred, mpdTrue); PerFieldF1Evaluator eval = new PerFieldF1Evaluator (); ByteArrayOutputStream out = new ByteArrayOutputStream (); eval.evaluate ("Testing", extraction, new PrintStream (out)); assertEquals (mpdExpected, out.toString()); }
public void testToStdout () { Extraction extraction = createExtractionFrom (mpdPred, mpdTrue); PerFieldF1Evaluator eval = new PerFieldF1Evaluator (); eval.evaluate (extraction); System.out.println ("*** Please verify that something was output above."); }
public void testToStdout () { Extraction extraction = createExtractionFrom (mpdPred, mpdTrue); PerFieldF1Evaluator eval = new PerFieldF1Evaluator (); eval.evaluate (extraction); System.out.println ("*** Please verify that something was output above."); }
public void testPerFieldEval () { Extraction extraction = createExtractionFrom (mpdPred, mpdTrue); PerFieldF1Evaluator eval = new PerFieldF1Evaluator (); ByteArrayOutputStream out = new ByteArrayOutputStream (); eval.evaluate ("Testing", extraction, new PrintStream (out)); assertEquals (mpdExpected, out.toString()); }
public static void main (String[] args) throws Throwable { TestSuite theSuite; if (args.length > 0) { theSuite = new TestSuite (); for (int i = 0; i < args.length; i++) { theSuite.addTest (new TestPerDocumentF1Evaluator (args[i])); } } else { theSuite = (TestSuite) suite (); } junit.textui.TestRunner.run (theSuite); }
public void testPerDocEval () { Extraction extraction = createExtractionFrom (testPred, testTrue); PerDocumentF1Evaluator eval = new PerDocumentF1Evaluator (); ByteArrayOutputStream out = new ByteArrayOutputStream (); eval.setErrorOutputStream (System.out); eval.evaluate ("Testing", extraction, new PrintWriter (new OutputStreamWriter (out), true)); String output = out.toString (); assertEquals (testAExpected, output); }
public void testPerDocEval () { Extraction extraction = createExtractionFrom (testPred, testTrue); PerDocumentF1Evaluator eval = new PerDocumentF1Evaluator (); ByteArrayOutputStream out = new ByteArrayOutputStream (); eval.setErrorOutputStream (System.out); eval.evaluate ("Testing", extraction, new PrintWriter (new OutputStreamWriter (out), true)); String output = out.toString (); assertEquals (testAExpected, output); }
public void testFieldCleaning () { Extraction extraction = createExtractionFrom (punctPred, punctTrue); extraction.cleanFields (new RegexFieldCleaner ("<.*?>|,|!")); PerFieldF1Evaluator eval = new PerFieldF1Evaluator (); ByteArrayOutputStream out = new ByteArrayOutputStream (); eval.evaluate ("Testing", extraction, new PrintStream (out)); assertEquals (mpdExpected, out.toString()); }
public void testFieldCleaning () { Extraction extraction = createExtractionFrom (punctPred, punctTrue); extraction.cleanFields (new RegexFieldCleaner ("<.*?>|,|!")); PerFieldF1Evaluator eval = new PerFieldF1Evaluator (); ByteArrayOutputStream out = new ByteArrayOutputStream (); eval.evaluate ("Testing", extraction, new PrintStream (out)); assertEquals (mpdExpected, out.toString()); }
public void testPunctuationIgnoringEvaluator () { Extraction extraction = createExtractionFrom (punctPred, punctTrue); PerFieldF1Evaluator eval = new PerFieldF1Evaluator (); eval.setComparator (new PunctuationIgnoringComparator ()); eval.setErrorOutputStream (System.out); ByteArrayOutputStream out = new ByteArrayOutputStream (); eval.evaluate ("Testing", extraction, new PrintStream (out)); assertEquals (mpdExpected, out.toString()); }
public void testPunctuationIgnoringEvaluator () { Extraction extraction = createExtractionFrom (punctPred, punctTrue); PerFieldF1Evaluator eval = new PerFieldF1Evaluator (); eval.setComparator (new PunctuationIgnoringComparator ()); eval.setErrorOutputStream (System.out); ByteArrayOutputStream out = new ByteArrayOutputStream (); eval.evaluate ("Testing", extraction, new PrintStream (out)); assertEquals (mpdExpected, out.toString()); }