PairwiseResnikSimilarity implements PairwiseSimilarity { @Override public double computeScore(TermId query, TermId target) { return computeScoreImpl(query, target); } protected  PairwiseResnikSimilarity();  PairwiseResnikSimilarity(Ontology ontology, Map<TermId, Double> termToIc); @Override double computeScore(TermId query, TermId target); Ontology getOntology(); Map<TermId, Double> getTermToIc();  }
@Test public void testComputeSimilarities() { assertEquals(0.0, similarity.computeScore(idBeet, idCarrot), 0.01); assertEquals(0.405, similarity.computeScore(idBlueCarrot, idCarrot), 0.01); assertEquals(0.0, similarity.computeScore(idPumpkin, idCarrot), 0.01); assertEquals(0.0, similarity.computeScore(idLeafVegetable, idCarrot), 0.01); }