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

Returning vectors with similarity above threshold for most_similar() #34

Open
lucas-ubm opened this issue Aug 24, 2020 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@lucas-ubm
Copy link

In sentencevectors.py most_similar() can return the topn most similar words. However it would be useful to be able to specify a similarity threshold above which the sentences are returned. For this topn could take a fractional value and therefore if topn is strictly smaller than 1 then it's considered a threshold and otherwise it works in the same way as it does now.

@oborchers oborchers self-assigned this Jan 28, 2021
@oborchers oborchers added the enhancement New feature or request label Jan 28, 2021
@oborchers
Copy link
Owner

Yes this is absolutely correct. However, the current implementation is actually highly inefficient in terms of similarty search (brute force). I had plans to include approximate nearest neighbor search, but haven't found time to implement it

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

No branches or pull requests

2 participants