This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ($i =0; $i < $K; $i++) { #遷移確率を求める | |
for ($j =0; $j < $K; $j++) { | |
$t0 =0; | |
$t1 =0; | |
for ($u =0; $u < @state -1; $u++) { #個数を数える | |
if ($state[$u] == $i) { | |
$t0++; | |
if ($state[$u +1] == $j) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for ($i =0; $i < @$lineList; $i++) { | |
foreach $list (@attr) { #示唆単語それぞれについて | |
$j =1; #ベクトル未追加フラグ | |
foreach $line (@{$list}) { | |
if ($$lineList[$i] =~ /$line/) { | |
push @{$vector[$i]}, 1; | |
$j =0; | |
last; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach $i (keys %WikiDic) { #等しいハッシュ値を探す | |
if ($length == $i) { #同じハッシュが存在した | |
foreach $j (@{$WikiDic{"$i"}}) { | |
if ($title eq $j) { #同じタイトル名が存在した | |
$check =0; #追加せずに離脱 | |
last; | |
} | |
} | |
if ($check) { #ハッシュ内に対応する文字列は無かった |
NewerOlder