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

How to calculate WMD distance, not similarity #31

Open
tjddus9597 opened this issue Aug 13, 2018 · 1 comment
Open

How to calculate WMD distance, not similarity #31

tjddus9597 opened this issue Aug 13, 2018 · 1 comment

Comments

@tjddus9597
Copy link

I want to get Relaxed-WMD with spacy. However, there is only function which calculate similarity .
Is there calculating distance function like Gensim?

distance = model.wmdistance(sentence_obama, sentence_president)
distance : 3.3741

Or Can you please explain how to calculate WMD distance?

@vmarkovtsev
Copy link
Collaborator

vmarkovtsev commented Aug 13, 2018

Please refer to https://github.com/src-d/wmd-relax/blob/master/wmd/__init__.py#L626

I think that although it is named "similarity", it really means "distance" because when it returns 0 the items are identical.

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

No branches or pull requests

2 participants