-
Notifications
You must be signed in to change notification settings - Fork 241
Closed
Labels
usageGeneral usageGeneral usage
Description
I am not able to leverage the similarity examples from the blog or issue #24 to my case. I just wanted to get the "sense" of "bear" i.e Homonyms in an example like "The bear growled. She could not bear the pain."
import spacy
nlp = spacy.load("en_core_web_md")
from sense2vec import Sense2VecComponent
text = "The bear growled. She could not bear the pain."
s2v = Sense2VecComponent('./reddit_vectors-1.1.0')
nlp.add_pipe(s2v)
doc = nlp(text)
After this i can't get any official reference for the similarity API that took two vectors. I have tried with the following but i get errors-
s2v._.similarity(doc[1]._.s2v_vec,doc[6]._.s2v_vec)
nlp._.similarity(doc[1]._.s2v_vec,doc[6]._.s2v_vec)
Metadata
Metadata
Assignees
Labels
usageGeneral usageGeneral usage