Esempio n. 1
0
 def test_overlap_max_1(self):
     self.assertAlmostEqual(overlap_max("levenshtein","leuwenhstijn"), 0.583, 3)
Esempio n. 2
0
def overlap_max_sim(source_terms, target_terms, *args):
    return sim.overlap_max(source_terms, target_terms)
Esempio n. 3
0
 def test_overlap_max_identity(self):
     self.assertEqual(overlap_max("a","a"), 1.0)
Esempio n. 4
0
 def test_overlap_max_symmetry(self):
     self.assertEqual(overlap_max("ab","bc"), overlap_max("bc","ab"))
Esempio n. 5
0
 def test_overlap_max_empty_2(self):
     self.assertEqual(overlap_max("a",""), 0.0)
Esempio n. 6
0
 def test_overlap_max_empty_3(self):
     self.assertEqual(overlap_max("","a"), 0.0)
Esempio n. 7
0
 def test_overlap_max_1(self):
     self.assertAlmostEqual(overlap_max("levenshtein", "leuwenhstijn"),
                            0.583, 3)
Esempio n. 8
0
 def test_overlap_max_symmetry(self):
     self.assertEqual(overlap_max("ab", "bc"), overlap_max("bc", "ab"))
Esempio n. 9
0
 def test_overlap_max_identity(self):
     self.assertEqual(overlap_max("a", "a"), 1.0)
Esempio n. 10
0
 def test_overlap_max_empty_3(self):
     self.assertEqual(overlap_max("", "a"), 0.0)
Esempio n. 11
0
 def test_overlap_max_empty_2(self):
     self.assertEqual(overlap_max("a", ""), 0.0)