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 8c9ab92 commit 9c29f5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 5 additions & 4 deletions ir_axioms/modules/similarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -211,5 +214,3 @@ class FastTextWikiNewsTermSimilarityMixin(MagnitudeTermSimilarityMixin):

def __init__(self):
super().__init__()


0 comments on commit 9c29f5e

Please sign in to comment.