using vis.py ipython notebook version:
original vis.py
In [1]:
import visword2vec
# 単語で作ったモデル
vis = visword2vec.visWord2Vec("recipe_steps.bin")
# フレーズで作ったモデル
vis_phrase = visword2vec.visWord2Vec("recipe_steps-phrase.bin")
In [2]:
def plot_both(word):
vis.plot(word)
vis_phrase.plot(word)
In [3]:
plot_both('チョコ')
In [4]:
vis_phrase.plot('義理_チョコ')
In [5]:
plot_both('義理')
In [6]:
plot_both('あつあつ')
In [7]:
plot_both('赤味噌')
using vis.py ipython notebook version:
original vis.py
In [1]:
import visword2vec
# 単語で作ったモデル
vis = visword2vec.visWord2Vec("recipe_steps.bin")
# フレーズで作ったモデル
vis_phrase = visword2vec.visWord2Vec("recipe_steps-phrase.bin")
In [2]:
def plot_both(word):
vis.plot(word)
vis_phrase.plot(word)
In [3]:
plot_both('チョコ')
In [4]:
vis_phrase.plot('義理_チョコ')
In [5]:
plot_both('義理')
In [6]:
plot_both('あつあつ')
In [7]:
plot_both('赤味噌')