I have trained a word2vec model using gensim. In the models matrix some values' floating point looks like this: "-7.18556e-05"
I need to use the values on the matrix as a string. Is there a way to remove those "e-05","e-04" etc.?
import nltk
from gensim.models import Word2Vec
from nltk.corpus import stopwords
text = "My text is here"
sentences = nltk.sent_tokenize(text)
for i in range(len(sentences)):
sentences[i] = [word for word in sentences[i] if word not in stopwords.words('english')]
model = Word2Vec(sentences, min_count=1)
words = model.wv.vocab
for word in words:
matrix = model.wv[words.keys()]