nickmuchi commited on
Commit
c2ce126
1 Parent(s): d401ad6

Update functions.py

Browse files
Files changed (1) hide show
  1. 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(sentence_embedding_model.encode(entity, show_progress_bar=False),
206
- sentence_embedding_model.encode(art_entity, show_progress_bar=False)) > 0.9 for
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: