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

def get_word_vec_similarity() in notebooks/00-populate_basic_graph.ipynb #19

Open
gtaaffeite opened this issue Apr 9, 2022 · 0 comments

Comments

@gtaaffeite
Copy link

notebook In [21]:
def get_word_vec_similarity(node1, node2, node_ls):
node1_vec = [tup[4] for tup in node_ls if tup[0] == node1]
node2_vec = [tup[4] for tup in node_ls if tup[0] == node2]
if node1_vec and node2_vec:
return cosine_similarity(node1_vec, node2_vec)
return 'one or both terms not found'

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

1 participant