I am trying to get similar words to an origin word using spacy. I've imported the en_core_web_md
and en_core_web_lg
models and I am using the word vectors to find words that are similar.
When I run this outside of my virtual environment, there is no issue; however, inside venv
, when I run:
dog = nlp.vocab[u'dog']
for x in dog.vocab:
print(x.text)
it produces results such as:
Nothin
5
Nuthin’
ll
:)
'y
this
-_-
(ಠ_ಠ)
’em
which are not even remotely similar to 'dog.' When I try with other words such as 'lively' or 'banana', it gives exactly the same results as dog.