Open sinievanderben opened 3 years ago
I could have a look but it'd help if you shared a few things.
Sorry! Here's the code:
lang = GensimLanguage('/Volumes/TOSHIBA EXT/PROVEE/stressdatasets/forwhatlies/glove.twitter.27B.25d_word2vec.kv')
# Load in file with meta data
metaFile = '/Volumes/TOSHIBA EXT/tensflow/metadata25d.tsv'
metaData = open(metaFile, encoding="utf8")
metaDataWords = metaData.readlines()
embeddings = lang[metaDataWords[:100]]
Mac: python 3.9.7, gensim 3.8.3 Windows: python 3.9.4, gensim 4.0.1
Additional remark:
Also just to confirm. Do you have a Mac with an M1 chip?
Yes that’s correct
I just tried running code on my M1 mac and I could not reproduce.
import gensim.downloader as api
from whatlies.language import GensimLanguage
# First download some vectors
wv = api.load('glove-twitter-25')
# [=====================] 100.0% 104.8/104.8MB downloaded
wv.save("glove-twitter-25.kv")
# Next, load in downloaded vectors.
lang = GensimLanguage("glove-twitter-25.kv")
lang[["hello", "world"]]
I don't have access to your embeddings though, so I'm wondering if there's something up with that. I'm using gensim==3.8.3
and whatlies==0.6.4
.
Closing due to radio silence.
I am facing the same error with gensim version == 3.8.3 on google colab
Can you confirm that this runs?
import gensim.downloader as api
from whatlies.language import GensimLanguage
# First download some vectors
wv = api.load('glove-twitter-25')
# [=====================] 100.0% 104.8/104.8MB downloaded
wv.save("glove-twitter-25.kv")
# Next, load in downloaded vectors.
lang = GensimLanguage("glove-twitter-25.kv")
lang[["hello", "world"]]
Hi, I am facing the same error with gensim==3.8.3, and I want to known you have fixed this bug?
Can you confirm if this runs? Could you also share your platform info?
import gensim.downloader as api
from whatlies.language import GensimLanguage
# First download some vectors
wv = api.load('glove-twitter-25')
# [=====================] 100.0% 104.8/104.8MB downloaded
wv.save("glove-twitter-25.kv")
# Next, load in downloaded vectors.
lang = GensimLanguage("glove-twitter-25.kv")
lang[["hello", "world"]]
Hi I had a question I tried similar file with similar code on a Windows and a Mac. I only changed the path names but with the Mac I'm getting an error. I was wondering whether this is due to the fact that it is a Mac or if there is anything else I am overlooking?
In both cases I run the code in Jupyter Notebook in VS code.
Thanks in advance!
Windows:
Mac:
full error on Mac: