How to get Token.similarity using spacy 3.7+ ? #13242
Unanswered
wildfluss
asked this question in
Help: Coding & Implementations
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Kinda follow-up on this #13137 (comment) but I'm just trying to get token similarity using en_core_web_trf and latest spacy
This
is trying
Evaluating Token.similarity based on empty vectors
and then trying to get cosine similarity like this
for some tokens from two documents kinda does not work because sometimes
and for other token indecies its (1, 768) (which I would expect) I guess that has to do with "word pieces" or something but would it be correct to just average (?, 768) to get comparable tensors for a rough word vector similarity ?
Beta Was this translation helpful? Give feedback.
All reactions