word2vecでさらに遊ぶ

コーパスによって単語の関係性にどれだけ違いが出るのか試してみました。

専門領域の用語として pitch, intensity, durationという3語を取り上げて,(古い)英辞郎と過去15年ほどの論文150本ほどをそれぞれ学習対象にしてみます。

まずは(古い)英辞郎

$ ./distance eijiro.bin

pitch を見ると

Enter word or sentence (EXIT to break): pitch

Word: pitch Position in vocabulary: 2530

Word Cosine distance
------------------------------------------------------------------------
swing 0.547932
hitter 0.521852
homer 0.514385
shot 0.511093
ball 0.498884
pitched 0.492131
sidearm 0.488452
throw 0.487487
batter 0.484926
pitcher 0.484573

と野球関連のつながりが多いようですね。

続いてintensity。

Enter word or sentence (EXIT to break): intensity

Word: intensity Position in vocabulary: 4108

Word Cosine distance
------------------------------------------------------------------------
luminosity 0.619719
spectrophotometry 0.603217
zodiacal 0.602022
spectroscopy 0.601598
monochromatic 0.599959
diffraction 0.595164
emissivity 0.593120
pulsed 0.592664
reflectance 0.574812
spectrometer 0.571763

なんか別分野の用語が多い感じ(^_^;;)。

そしてduration。

Enter word or sentence (EXIT to break): duration

Word: duration Position in vocabulary: 6222

Word Cosine distance
------------------------------------------------------------------------
periods 0.614564
interval 0.530581
shorter 0.530262
drawdown 0.527689
period 0.522462
payables 0.504385
durability 0.504005
termer 0.501189
recency 0.498010
lapse 0.494745

単複両方エントリしていたりして正規化が足りませんが,ご勘弁を。日常語彙という感じです。

 

続いて論文データを母集団にします。

$ ./distance articles.bin

pitchはこう。
Enter word or sentence (EXIT to break): pitch

Word: pitch Position in vocabulary: 139

Word Cosine distance
------------------------------------------------------------------------
fo 0.550375
f0 0.520453
rising 0.487682
falling 0.462313
contour 0.461940
intensity 0.455840
flat 0.431401
nuclear 0.428915
range 0.417038
accents 0.415764

いやぁ,わくわくするような関係性です(笑)。

続いてintensity。

Enter word or sentence (EXIT to break): intensity

Word: intensity Position in vocabulary: 153

Word Cosine distance
------------------------------------------------------------------------
constant 0.598782
amplitude 0.534910
manipulations 0.523191
f0 0.516113
duration 0.507572
range 0.503098
manipulation 0.497692
pitch 0.478521

ちょっと10個に届きませんでしたが(正規化失敗orz),これまた物理量と感覚量とか考えさせられます。

そしてduration。

Enter word or sentence (EXIT to break): duration

Word: duration Position in vocabulary: 45

Word Cosine distance
------------------------------------------------------------------------
duration 0.639721
intensity 0.533702
manipulations 0.469546
manipulation 0.467540
shortest 0.447489
dip 0.445082
f0 0.441383
amplitude 0.441203
durations 0.438589
increases 0.426070

となって,この3つの単語の当方の専門領域での関係性の深さやら,manipulationとの結びつきとか実験手法をいろいろと考えさせるものになっているように思います。

 

なお今回はMBAに構築したvmware上で仮想化したUbuntu 12.04LTSで処理しました。