diff --git a/.gitignore b/.gitignore index 2de9550..3be7f35 100644 --- a/.gitignore +++ b/.gitignore @@ -271,3 +271,4 @@ cython_debug/ !.vscode/*.code-snippets # End of https://www.toptal.com/developers/gitignore/api/python,visualstudiocode,intellij +ir_axioms/modules/wiki-news-300d-1M.magnitude diff --git a/ir_axioms/modules/similarity.py b/ir_axioms/modules/similarity.py index fdc4ada..4716598 100644 --- a/ir_axioms/modules/similarity.py +++ b/ir_axioms/modules/similarity.py @@ -194,8 +194,11 @@ class MagnitudeTermSimilarityMixin(TermSimilarityMixin, ABC): @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.endswith('wiki-news-300d-1M.magnitude'): + 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.endswith('wiki-news-300d-1M.magnitude') + ): wget.download(url, out=self.embeddings_path) return Magnitude(self.embeddings_path) @@ -211,5 +214,3 @@ class FastTextWikiNewsTermSimilarityMixin(MagnitudeTermSimilarityMixin): def __init__(self): super().__init__() - -