Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mam10eks committed Dec 12, 2024
1 parent 9c29f5e commit 2f8bfab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ir_axioms/modules/similarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,14 @@ def similarity(self, term1: str, term2: str) -> float:


class MagnitudeTermSimilarityMixin(TermSimilarityMixin, ABC):
embeddings_path: str = NotImplemented
embeddings_path: str = None

@cached_property
def _embeddings(self):
url = 'https://files.webis.de/data-in-production/data-research/ir-axioms/wiki-news-300d-1M.magnitude' # noqa: E501
if (
not os.path.isfile(self.embeddings_path)
and self.embeddings_path
and self.embeddings_path.endswith('wiki-news-300d-1M.magnitude')
):
wget.download(url, out=self.embeddings_path)
Expand Down

0 comments on commit 2f8bfab

Please sign in to comment.