Skip to content

Commit d597f45

Browse files
committed
Case Fixes
1 parent 768015c commit d597f45

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

machine_learning/cosine_similarity.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import spacy
21
import logging
32
import numpy as np
3+
import spacy
44

5-
6-
class cosine_similarity:
5+
class CosineSimilarity:
76
"""
87
Cosine Similarity Algorithm
98
@@ -180,5 +179,5 @@ def cosine_similarity_percentage(self, text1: str, text2: str) -> float:
180179
text1 = "The biggest Infrastructure in the World is Burj Khalifa"
181180
text2 = "The name of the talllest Tower in the world is Burj Khalifa"
182181

183-
similarity_percentage = cosine_similarity().cosine_similarity_percentage(text1, text2)
182+
similarity_percentage = CosineSimilarity().cosine_similarity_percentage(text1, text2)
184183
print(f"Cosine Similarity: {similarity_percentage:.2f}%")

0 commit comments

Comments
 (0)