Esempio n. 1
0
 def test_overlap_1(self):
     self.assertAlmostEqual(overlap("levenshtein","leuwenhstijn"), 0.636, 3)
Esempio n. 2
0
 def test_overlap_identity(self):
     self.assertEqual(overlap("a","a"), 1.0)
Esempio n. 3
0
 def test_overlap_symmetry(self):
     self.assertEqual(overlap("ab","bc"), overlap("bc","ab"))
Esempio n. 4
0
 def test_overlap_empty_2(self):
     self.assertEqual(overlap("a",""), 0.0)
Esempio n. 5
0
 def test_overlap_empty_3(self):
     self.assertEqual(overlap("","a"), 0.0)
Esempio n. 6
0
 def test_overlap_1(self):
     self.assertAlmostEqual(overlap("levenshtein", "leuwenhstijn"), 0.636,
                            3)
Esempio n. 7
0
 def test_overlap_symmetry(self):
     self.assertEqual(overlap("ab", "bc"), overlap("bc", "ab"))
Esempio n. 8
0
 def test_overlap_identity(self):
     self.assertEqual(overlap("a", "a"), 1.0)
Esempio n. 9
0
 def test_overlap_empty_3(self):
     self.assertEqual(overlap("", "a"), 0.0)
Esempio n. 10
0
 def test_overlap_empty_2(self):
     self.assertEqual(overlap("a", ""), 0.0)