Skip to content

Commit

Permalink
Reference paper on efficient implementation of soft cosine similarity
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Apr 4, 2020
1 parent 7bae286 commit f357ee1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gensim/similarities/termsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,15 @@ def inner_product(self, X, Y, normalized=False):
References
----------
The soft cosine measure was perhaps first described by [sidorovetal14]_.
Further notes on the efficient implementation of the soft cosine measure are described by
[novotny18]_.
.. [sidorovetal14] Grigori Sidorov et al., "Soft Similarity and Soft Cosine Measure: Similarity
of Features in Vector Space Model", 2014, http://www.cys.cic.ipn.mx/ojs/index.php/CyS/article/view/2043/1921.
.. [novotny18] Vít Novotný, "Implementation Notes for the Soft Cosine Measure", 2018,
http://dx.doi.org/10.1145/3269206.3269317.
"""
if not X or not Y:
return self.matrix.dtype.type(0.0)
Expand Down

0 comments on commit f357ee1

Please sign in to comment.