Spaces:
Runtime error
Runtime error
ranker
Browse files- japanese/ranker.py +1 -17
japanese/ranker.py
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
import numpy
|
2 |
-
import pickle
|
3 |
-
|
4 |
-
import numpy as np
|
5 |
-
import os
|
6 |
-
import re
|
7 |
-
import string
|
8 |
-
import tojson
|
9 |
-
from multiprocessing import Pool
|
10 |
-
|
11 |
-
import sys
|
12 |
-
import tojson
|
13 |
-
import re
|
14 |
-
import string
|
15 |
-
|
16 |
-
|
17 |
import numpy as np
|
18 |
from numpy.linalg import norm
|
19 |
|
@@ -144,4 +128,4 @@ class DirectedCentralityRnak(object):
|
|
144 |
similarity_matrix.append(self.get_similarity_matrix(embedded))
|
145 |
for matrix, doc_vector, candidate_phrases_embeddings in zip(similarity_matrix, self.doc_embeddings, self.tokens_embeddings):
|
146 |
extracted_list.append(self._rank_part(matrix, doc_vector, candidate_phrases_embeddings))
|
147 |
-
return extracted_list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import numpy as np
|
2 |
from numpy.linalg import norm
|
3 |
|
|
|
128 |
similarity_matrix.append(self.get_similarity_matrix(embedded))
|
129 |
for matrix, doc_vector, candidate_phrases_embeddings in zip(similarity_matrix, self.doc_embeddings, self.tokens_embeddings):
|
130 |
extracted_list.append(self._rank_part(matrix, doc_vector, candidate_phrases_embeddings))
|
131 |
+
return extracted_list
|