shiroyagicorp / japanese-word2vec-model-builder Goto Github PK
View Code? Open in Web Editor NEWA tool for building gensim word2vec model for Japanese.
License: MIT License
A tool for building gensim word2vec model for Japanese.
License: MIT License
I downloaded: http://public.shiroyagi.s3.amazonaws.com/latest-ja-word2vec-gensim-model.zip
In gensim 4.0.1
:
>>> from gensim.models import Word2Vec
>>> model = Word2Vec.load('word2vec.gensim.model')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/eggplants/.pyenv/versions/3.8.8/lib/python3.8/site-packages/gensim/models/word2vec.py", line 1934, in load
raise ae
File "/home/eggplants/.pyenv/versions/3.8.8/lib/python3.8/site-packages/gensim/models/word2vec.py", line 1922, in load
model = super(Word2Vec, cls).load(*args, **kwargs)
File "/home/eggplants/.pyenv/versions/3.8.8/lib/python3.8/site-packages/gensim/utils.py", line 486, in load
obj = unpickle(fname)
File "/home/eggplants/.pyenv/versions/3.8.8/lib/python3.8/site-packages/gensim/utils.py", line 1458, in unpickle
return _pickle.load(f, encoding='latin1') # needed because loading from S3 doesn't support readline()
AttributeError: Can't get attribute 'Vocab' on <module 'gensim.models.word2vec' from '/home/eggplants/.pyenv/versions/3.8.8/lib/python3.8/site-packages/gensim/models/word2vec.py'>
At least, I was able to load in gensim 3.8.3
:
>>> from gensim.models import Word2Vec, KeyedVectors
>>> model = Word2Vec.load('word2vec.gensim.model')
>>> model
<gensim.models.word2vec.Word2Vec object at 0x7f9159673760>
>>> model['่ถ']
array([-0.01575674, -0.10300584, 0.02857462, -0.00356116, -0.16234541,
-0.0022368 , -0.05394654, -0.01199903, -0.18319821, 0.04346316,
0.14963926, 0.03202467, 0.09968029, 0.11826714, -0.05681837,
0.16948035, 0.28472725, -0.24892537, -0.14317186, 0.1457012 ,
0.20019206, 0.04302821, 0.03181615, 0.2817595 , -0.08760485,
-0.16652937, 0.00674798, 0.31616545, 0.18014094, 0.15537646,
-0.01063021, 0.2273897 , -0.16566291, 0.15725176, -0.18540007,
0.20853749, -0.13369396, -0.02151924, -0.0025336 , -0.14052488,
-0.05878513, -0.1054413 , -0.02877514, 0.17363845, 0.10139048,
0.1059038 , 0.04486514, 0.13671686, 0.17967068, -0.07128946],
dtype=float32)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.