Spaces:
Sleeping
Sleeping
Update algorithms.py
Browse files- algorithms.py +1 -0
algorithms.py
CHANGED
|
@@ -8,6 +8,7 @@ import nltk
|
|
| 8 |
import onnxruntime as rt
|
| 9 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 10 |
nltk.download("punkt_tab")
|
|
|
|
| 11 |
def similar(a,b):
|
| 12 |
return np.linalg.matmul(a,b)/(np.linalg.norm(a)*np.linalg.norm(b))
|
| 13 |
def pred_next(text,how_many):
|
|
|
|
| 8 |
import onnxruntime as rt
|
| 9 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 10 |
nltk.download("punkt_tab")
|
| 11 |
+
nltk.download("wordnet")
|
| 12 |
def similar(a,b):
|
| 13 |
return np.linalg.matmul(a,b)/(np.linalg.norm(a)*np.linalg.norm(b))
|
| 14 |
def pred_next(text,how_many):
|