Skip to content

Commit 2aa3608

Browse files
committed
Resolved Package OS Error
1 parent d320b99 commit 2aa3608

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

machine_learning/cosine_similarity.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import numpy as np
44
import spacy
5+
import spacy.cli
6+
import spacy.cli.download
57

68
"""
79
Cosine Similarity Algorithm - Natural Language Processing (NLP) Algorithm
@@ -20,10 +22,9 @@
2022
- numpy: A Library for Numerical Operations in Python, used for Mathematical
2123
Computations.
2224
"""
23-
25+
spacy.cli.download("en_core_web_md") # Comment if Installed
2426
nlp = spacy.load("en_core_web_md")
2527

26-
2728
class CosineSimilarity:
2829
def __init__(self) -> None:
2930
"""

0 commit comments

Comments
 (0)