Update functions.py
Browse files- functions.py +2 -2
functions.py
CHANGED
@@ -202,8 +202,8 @@ def get_and_compare_entities(article_content,summary_output):
|
|
202 |
if any(entity.lower() in substring_entity.lower() for substring_entity in entities_article):
|
203 |
matched_entities.append(entity)
|
204 |
elif any(
|
205 |
-
np.inner(
|
206 |
-
|
207 |
art_entity in entities_article):
|
208 |
matched_entities.append(entity)
|
209 |
else:
|
|
|
202 |
if any(entity.lower() in substring_entity.lower() for substring_entity in entities_article):
|
203 |
matched_entities.append(entity)
|
204 |
elif any(
|
205 |
+
np.inner(sbert.encode(entity, show_progress_bar=False),
|
206 |
+
sbert.encode(art_entity, show_progress_bar=False)) > 0.9 for
|
207 |
art_entity in entities_article):
|
208 |
matched_entities.append(entity)
|
209 |
else:
|