diff --git a/ir_axioms/modules/similarity.py b/ir_axioms/modules/similarity.py index 4716598..ed5f483 100644 --- a/ir_axioms/modules/similarity.py +++ b/ir_axioms/modules/similarity.py @@ -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)