def test_phrase_similarity_totally_different_vectors(self): returned = compare_vectors(['dogs'], ['cats']) self.assertEqual(returned, 0)
def test_phrase_similarity_similar_vectors(self): returned = compare_vectors(['cats', 'great'], ['cats', 'evil']) self.assertAlmostEqual(returned, .5)
def test_phrase_similarity_same_word(self): returned = compare_vectors(['cats'], ['cats']) self.assertEqual(returned, 1)