txtファイル読み込み
全てスペース区切り
from gensim.models import KeyedVectors # binary=Trueでも読み込み可能 model = KeyedVectors.load_word2vec_format(file_path, binary=False)
すべてスペース区切りで、先頭行に単語数と次元数
6 4 word1 0.123 0.134 0.532 0.152 word2 0.934 0.412 0.532 0.159 word3 0.334 0.241 0.324 0.188 word4 0.334 0.241 0.324 0.188 word5 0.334 0.241 0.324 0.188 word6 0.334 0.241 0.324 0.188
model = KeyedVectors.load_word2vec_format(file_path, binary=True)