Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Ranker with Word Mover's Distance #192

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

Lolik111
Copy link

@Lolik111 Lolik111 commented Nov 30, 2017

Ranker based on Word Mover's Distance that uses word embedding for calculating a distance between two documents (see Kusner, Matt, et al. "From word embeddings to document distances." 2015 - http://mkusner.github.io/publications/WMD.pdf).
config.toml example:

[ranker]
method = "wmd-base"
mode = "rwmd"
distance-function = "cosine"

Available modes:

  • emd - more precise according to paper above but very slow
  • rwmd - relaxed wmd - faster and close to emd in precision
  • wcd - word centroid discance - fast, but not precise
  • prefetch-prune - combination of all modes that allow to reduce possible candidates before running emd

Available distance functions:

  • cosine - uses cosine distance between two numeric vectors
  • l2diff - uses Euclidean distance (L2-norm) between two numeric vectors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants