MeanAveragePrecisionKeyphraseCounter extends AbstractKeyphraseCounter { public Double getMeanAveragePrecision() { BigDecimal meanAveragePrecision = new BigDecimal("0.0"); for (FilePerformance filePerformance : fileName2performanceMap.values()) { meanAveragePrecision = meanAveragePrecision.add(filePerformance .calculateAveragePrecision()); } meanAveragePrecision = meanAveragePrecision.divide( new BigDecimal(String.valueOf(fileName2performanceMap.size())), NBR_FLOATING_POINTS, RoundingMode.UP); return meanAveragePrecision.doubleValue(); }  Double getMeanAveragePrecision();  }
@Test public void test() throws AnalysisEngineProcessException { Assert.assertThat(perfCounter.getMeanAveragePrecision(), CoreMatchers.is(0.7606060607)); }