Doc.similarity either outputting 0 or 1 (only when it's the same string) #11116
Answered
by
polm
JayThibs
asked this question in
Help: Coding & Implementations
-
How to reproduce the behaviourWhen I run the code below, I get a score of 0.0. I only get a score of 1 if I use "apple" for doc2. Everything else it 0. Any ideas what's wrong? Your Environment
|
Beta Was this translation helpful? Give feedback.
Answered by
polm
Jul 12, 2022
Replies: 1 comment
-
|
This is expected behavior. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
polm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is expected behavior.
doc.similarityrelies ondoc.vector, which relies on word vectors, and the Transformers pipeline has no word vectors. See #9011.