@Test public void testEvaluateSense() throws Exception { PredicateArgumentEvaluator evaluator = new PredicateArgumentEvaluator(); evaluator.evaluateSense(senseTester, gold, predicted); assertEquals(1.0, senseTester.getMicroF1(), 0); predicted.getPredicates().get(0).addAttribute(PredicateArgumentView.SenseIdentifer, "02"); evaluator = new PredicateArgumentEvaluator(); evaluator.evaluateSense(senseTester, gold, predicted); assertEquals(0.875, senseTester.getMicroF1(), 0.01); }
public void evaluateSense(ClassificationTester senseTester, View goldView, View predictionView) { gold = (PredicateArgumentView) goldView; prediction = (PredicateArgumentView) predictionView; goldToPredictionPredicateMapping = getGoldToPredictionPredicateMapping(); for (Constituent gp : gold.getPredicates()) { if (goldToPredictionPredicateMapping.containsKey(gp)) { Constituent pp = goldToPredictionPredicateMapping.get(gp); String goldSense = gp.getAttribute(PredicateArgumentView.SenseIdentifer); if (goldSense.equals("XX")) goldSense = "01"; String predSense = pp.getAttribute(PredicateArgumentView.SenseIdentifer); assert predSense != null; senseTester.record(goldSense, predSense); } } }
PredicateArgumentEvaluator extends Evaluator { public void evaluateSense(ClassificationTester senseTester, View goldView, View predictionView) { gold = (PredicateArgumentView) goldView; prediction = (PredicateArgumentView) predictionView; goldToPredictionPredicateMapping = getGoldToPredictionPredicateMapping(); for (Constituent gp : gold.getPredicates()) { if (goldToPredictionPredicateMapping.containsKey(gp)) { Constituent pp = goldToPredictionPredicateMapping.get(gp); String goldSense = gp.getAttribute(PredicateArgumentView.SenseIdentifer); if (goldSense.equals("XX")) goldSense = "01"; String predSense = pp.getAttribute(PredicateArgumentView.SenseIdentifer); assert predSense != null; senseTester.record(goldSense, predSense); } } } }
PredicateArgumentEvaluator extends Evaluator { public void evaluateSense(ClassificationTester senseTester, View goldView, View predictionView) { gold = (PredicateArgumentView) goldView; prediction = (PredicateArgumentView) predictionView; goldToPredictionPredicateMapping = getGoldToPredictionPredicateMapping(); for (Constituent gp : gold.getPredicates()) { if (goldToPredictionPredicateMapping.containsKey(gp)) { Constituent pp = goldToPredictionPredicateMapping.get(gp); String goldSense = gp.getAttribute(PredicateArgumentView.SenseIdentifer); if (goldSense.equals("XX")) goldSense = "01"; String predSense = pp.getAttribute(PredicateArgumentView.SenseIdentifer); assert predSense != null; senseTester.record(goldSense, predSense); } } }  }
PredicateArgumentEvaluator extends Evaluator { public void evaluateSense(ClassificationTester senseTester, View goldView, View predictionView) { gold = (PredicateArgumentView) goldView; prediction = (PredicateArgumentView) predictionView; goldToPredictionPredicateMapping = getGoldToPredictionPredicateMapping(); for (Constituent gp : gold.getPredicates()) { if (goldToPredictionPredicateMapping.containsKey(gp)) { Constituent pp = goldToPredictionPredicateMapping.get(gp); String goldSense = gp.getAttribute(PredicateArgumentView.SenseIdentifer); if (goldSense.equals("XX")) goldSense = "01"; String predSense = pp.getAttribute(PredicateArgumentView.SenseIdentifer); assert predSense != null; senseTester.record(goldSense, predSense); } } }  void evaluateSense(ClassificationTester senseTester, View goldView, View predictionView); void evaluate(ClassificationTester tester, View goldView, View predictionView); }
PredicateArgumentEvaluator extends Evaluator { public void evaluateSense(ClassificationTester senseTester, View goldView, View predictionView) { gold = (PredicateArgumentView) goldView; prediction = (PredicateArgumentView) predictionView; goldToPredictionPredicateMapping = getGoldToPredictionPredicateMapping(); for (Constituent gp : gold.getPredicates()) { if (goldToPredictionPredicateMapping.containsKey(gp)) { Constituent pp = goldToPredictionPredicateMapping.get(gp); String goldSense = gp.getAttribute(PredicateArgumentView.SenseIdentifer); if (goldSense.equals("XX")) goldSense = "01"; String predSense = pp.getAttribute(PredicateArgumentView.SenseIdentifer); assert predSense != null; senseTester.record(goldSense, predSense); } } }  void evaluateSense(ClassificationTester senseTester, View goldView, View predictionView); void evaluate(ClassificationTester tester, View goldView, View predictionView);  }