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

Top 10 Similar terms #3

Open
Mustyy opened this issue Nov 14, 2018 · 2 comments
Open

Top 10 Similar terms #3

Mustyy opened this issue Nov 14, 2018 · 2 comments

Comments

@Mustyy
Copy link

Mustyy commented Nov 14, 2018

Thank you firstly for the tutorial
I wanted to ask if it is possible to use the final embeddings to test out a word and return top 10 similar terms.

e.g

Top 10 Similar words given an input word

word="external"
word_vec = final_embeddings[dictionary[word]]
sim = np.dot(word_vec,-final_embeddings.T).argsort()[0:8]
for idx in range(8):
print (reverse_dictionary[sim[idx]])

@Madhu009
Copy link
Owner

a emdeding vector represents the word. so similar words have similar emebeding (we can use a distance metric to find out the distance ) .

This thread has different ways to handle please check it out
https://stackoverflow.com/questions/40074412/word2vec-get-nearest-words

@Mustyy
Copy link
Author

Mustyy commented Nov 17, 2018

Hey @Madhu009
Thanks for the reply
I understand embedding vectors, I was just wondering if there was a quick workaround for the code so that I can plug in a word and return top 10 similar terms.
I tried using the tensorflow board but it wasnt successful either.
Currently researching other methods too

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