示例#1
0
 def test_words_with_no_similarity(self):
     index = calculate("aaa", "bbb")
     self.assertEqual(index, 0)
示例#2
0
 def test_identical_words(self):
     index = calculate("transport", "transport")
     self.assertEqual(index, 1)
def calculate(base,term):
	return 1.0 - jaccardIndex.calculate(base,term)
示例#4
0
 def test_words_with_similarity(self):
     index = calculate("transport", "transportation")
     self.assertEqual(index, 0.875)
示例#5
0
def calculate(base, term):
    return 1.0 - jaccardIndex.calculate(base, term)