Skip to content

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.

2 participants