Created
June 25, 2012 07:50
-
-
Save tabris2012/2987230 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
open ATTR, "<attribute.txt" or die "open: $!"; | |
@attr = (); | |
$i =0; | |
while ($line = <ATTR>) { #属性示唆単語読込み | |
if ($line =~ /^#/) { | |
next; | |
} | |
elsif ($line eq "\n") { | |
$i++; | |
} | |
else { | |
chomp $line; | |
push @{$attr[$i]}, $line; | |
} | |
} | |
close ATTR; | |
for ($i =0; $i < @attr; $i++) { | |
foreach $line (@{$attr[$i]}) { #対応単語の表記を変更 | |
$$document =~ s($line)(<u>$line</u>)g; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment