def test_registry_has_builtin_similarity_functions(self): assert SimilarityFunction.by_name( "dot_product").__name__ == "DotProductSimilarity" assert SimilarityFunction.by_name( "bilinear").__name__ == "BilinearSimilarity" assert SimilarityFunction.by_name( "linear").__name__ == "LinearSimilarity" assert SimilarityFunction.by_name( "cosine").__name__ == "CosineSimilarity"
def test_registry_has_builtin_similarity_functions(self): assert SimilarityFunction.by_name( u"dot_product").__name__ == u'DotProductSimilarity' assert SimilarityFunction.by_name( u"bilinear").__name__ == u'BilinearSimilarity' assert SimilarityFunction.by_name( u"linear").__name__ == u'LinearSimilarity' assert SimilarityFunction.by_name( u"cosine").__name__ == u'CosineSimilarity'
def test_registry_has_builtin_similarity_functions(self): assert SimilarityFunction.by_name("dot_product").__name__ == 'DotProductSimilarity' assert SimilarityFunction.by_name("bilinear").__name__ == 'BilinearSimilarity' assert SimilarityFunction.by_name("linear").__name__ == 'LinearSimilarity' assert SimilarityFunction.by_name("cosine").__name__ == 'CosineSimilarity'