a test
a practice
trying to complete a word2vec with java.
it's a simple word2vec, although the project has no errors, but there are some questions with its correctness.
项目中构建了霍夫曼树,实现了cbow和skip-gram模型。
负采样方法已经实现,但实际效果很差
run example.java
ok it's work, happy like a child.
mother
wife:0.8537818931766553
father:0.8404146666084213
moses:0.8283279208670095
son:0.821570292835865
sons:0.8075150070733301
daughter:0.8061691977538024
eldest:0.7934346501674241
poisoned:0.7696131373524758
priest:0.7608771809776231
married:0.7524227618880981
daughters:0.7496536730003414
cousin:0.7333588829744664
grandson:0.7314131423220077
saul:0.7305570446978552
grandfather:0.7275829254512352
father
wife:0.8656574194233372
mother:0.8404146666084213
moses:0.8300705490873064
son:0.8230882692120841
eldest:0.7648159657043161
sons:0.75498045435112
daughter:0.7488752812283529
holy:0.7303396198167486
brother:0.72711072589085
priest:0.718421984244354
begotten:0.7114793924089596
marriage:0.7055202444533419
throne:0.6982929980034182
married:0.693536433724017
saul:0.6894119569773921
love
dylan:0.7136665617675042
starring:0.7135376508478467
girl:0.7111183694160119
friends:0.7034813256347131
songs:0.7010107756745959
moore:0.6940831353014654
wrote:0.6899559172797265
mystery:0.6871801316218983
beowulf:0.6864228118440534
carter:0.6856713315663039
harry:0.6835642596586814
iommi:0.6768033655674056
guest:0.6760251428862819
title:0.6750192452809151
lensman:0.6748815636328874
cancer
patients:0.8227043114653647
lung:0.8132515119778542
diseases:0.8129721145904981
risk:0.7811939508676687
bacterial:0.7729021796171904
sexually:0.7718017043394624
drinking:0.770036045494189
reduces:0.7682649406770053
cure:0.7658176737753327
tissue:0.7634982775450744
respiratory:0.7633289943001561
disorders:0.7624417278244576
liver:0.762179192347913
therapy:0.7562051360523528
symptoms:0.7532112064939397
computer
computers:0.7631174440240317
graphics:0.7213413881600178
hardware:0.7146888362029792
technology:0.7106247395777887
program:0.708568286608305
pc:0.6899653731238632
software:0.6874426660862449
programs:0.6787633845176915
digital:0.6780949667414182
interface:0.6760962262547157
bios:0.6677708177493298
basic:0.6616486287757336
ibm:0.6613882072137955
rom:0.6561361697920173
amiga:0.6456543193682249