36
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

char2vecを作ってみた

36
Last updated at Posted at 2015-09-13

日本語は漢字の数が多いので、単語単位ではなく文字単位でベクトル表現しても意味のある結果が得られるのでは?ということで、char2vecを作ってみました。

オリジナルのword2vecはこちら
https://code.google.com/p/word2vec/

ウィキペディアで学習した結果でうまくいったものを載せます。

■文字の類似性(distance)

Character: 私  Position in vocabulary: 860

      Character  Cosine distance
------------------------------------------------------------------------
         僕             0.546389
         俺             0.474454
         噂             0.473720
         ち             0.462748
         独             0.451800
         孫             0.448622
         昔             0.444323
         誰             0.422753
         彼             0.420957


Character: 犬  Position in vocabulary: 1319

      Character  Cosine distance
------------------------------------------------------------------------
         猫             0.727828
         羊             0.590153
         狐             0.575378
         牛             0.561064
         虎             0.543004
         猿             0.527262
         鬼             0.521105
         蛇             0.514800
         狼             0.508942


Character: 愛  Position in vocabulary: 493

      Character  Cosine distance
------------------------------------------------------------------------
         略             0.408893
         識             0.399666
         唄             0.382650
         夢             0.378747
         名             0.378549
         能             0.374202
         許             0.372498
         児             0.367996
         恵             0.351598


Character: 夢  Position in vocabulary: 1153

      Character  Cosine distance
------------------------------------------------------------------------
         闇             0.671510
         涙             0.648715
         恋             0.640480
         虹             0.625041
         瞳             0.606751
         僕             0.606210
         絆             0.567457
         夜             0.554111
         魂             0.553650

■類推(analogy)

男→父⇒女→

東→右⇒西→

花→桜⇒木→

冬→雪⇒夏→

36
28
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
36
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?