Created
May 2, 2012 03:06
-
-
Save tabris2012/2573305 to your computer and use it in GitHub Desktop.
This file contains 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; | |
} | |
} | |
if ($j) { | |
push @{$vector[$i]}, 0; | |
} | |
} | |
} #各行ベクトル化終了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment