Skip to content

Instantly share code, notes, and snippets.

@tabris2012
Created May 2, 2012 03:06
Show Gist options
  • Save tabris2012/2573305 to your computer and use it in GitHub Desktop.
Save tabris2012/2573305 to your computer and use it in GitHub Desktop.
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