]> git.donarmstrong.com Git - deb_pkgs/scowl.git/blob - src/add-accents
[svn-inject] Installing original source of scowl
[deb_pkgs/scowl.git] / src / add-accents
1 #!/usr/bin/perl
2
3 open A, "working/with-accents.lst";
4 open B, "working/without-accents.lst";
5
6 for (;;) 
7 {
8   $with_accent = <A> or last;
9   chop $with_accent;
10   $without_accent = <B> or die;
11   chop $without_accent;
12   $lookup{$without_accent} = $with_accent;
13 }
14
15 while (<STDIN>) {
16   chop;
17   if (exists $lookup{$_}) {
18     print "$lookup{$_}\n";
19   } else {
20     my $w = $_;
21     s/\'s$//;
22     if (exists $lookup{$_}) {
23       print "$lookup{$_}'s\n";
24     } else {
25       print "$w\n";
26     }
27   }
28 }
29
30