Skip to content
This repository was archived by the owner on Aug 26, 2023. It is now read-only.

Added method to retrieve k nearest neighbours from given query vector #7

Merged
merged 1 commit into from
Feb 7, 2019

Conversation

sebastianarnold
Copy link

In some cases it is practical to retrieve k nearest neighbours not only for a given word: nn(int k, String queryWord) but also for a given vector: nn(int k, Vector queryVec)

I implemented this function so we can use it in our application, maybe this is helpful to others. Feel free to merge it.

PS: fasttext 0.2.0 was re-licensed to MIT (facebookresearch/fastText@7842495), maybe you can reflect this in your library as well.

@sszuev sszuev self-requested a review February 7, 2019 12:30
Copy link
Owner

@sszuev sszuev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything seems fine

@sszuev
Copy link
Owner

sszuev commented Feb 7, 2019

Hello
Thank you for PR!

Although, a good PR must be accompanied with tests, this one seems to be safe.
Anyway, even in the main codebase there is a lack of tests.

About licensing.
This fasttext_java fork reflects only 0.1.0 cpp version, so I am not sure something needs to be changed in that sense.
When (if) the main codebase will be updated to 0.2.0, the license will be changed as well.

About maven build.
I think I can create pre-release with a tag 1.0.1-SNAPSHOT, and your patch will be available through JitPack.

@sszuev sszuev merged commit 34a7caf into sszuev:master Feb 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants