Skip to content

Commit

Permalink
fixes #56
Browse files Browse the repository at this point in the history
  • Loading branch information
Soldaini, Luca committed Jun 28, 2020
1 parent bad4c50 commit 8420573
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions quickumls/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,16 +322,18 @@ def _get_all_matches(self, ngrams):
for match in ngram_cands:
cuisem_match = sorted(self.cuisem_db.get(match))

for cui, semtypes, preferred in cuisem_match:
match_similarity = toolbox.get_similarity(
x=ngram_normalized,
y=match,
n=self.ngram_length,
similarity_name=self.similarity_name
)
if match_similarity == 0:
match_similarity = toolbox.get_similarity(
x=ngram_normalized,
y=match,
n=self.ngram_length,
similarity_name=self.similarity_name
)

if match_similarity == 0:
continue

for cui, semtypes, preferred in cuisem_match:

if not self._is_ok_semtype(semtypes):
continue

Expand Down

0 comments on commit 8420573

Please sign in to comment.