Created
March 15, 2014 18:15
-
-
Save psibre/abf0d2ac833046af17cb to your computer and use it in GitHub Desktop.
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
#! /usr/bin/env perl | |
$indir = "lab_raw"; | |
opendir INDIR, $indir; | |
@files = grep (/\.lab$/,readdir INDIR); | |
closedir INDIR; | |
foreach $file (@files) | |
{ | |
open INFILE, "$indir/$file"; | |
@lines = <INFILE>; | |
close INFILE; | |
open OUTFILE, ">lab/$file"; | |
for(@lines){ | |
s/zh/Z/; | |
s/hh/h/; | |
s/th/T/; | |
s/ih/I/; | |
s/pau/_/; | |
s/uw/u/; | |
s/dh/D/; | |
s/ay/AI/; | |
s/ey/EI/; | |
s/uh/U/; | |
s/ax/\@/; | |
s/sh/S/; | |
s/aw/aU/; | |
s/ow/\@U/; | |
s/oy/OI/; | |
s/eh/E/; | |
s/ao/O/; | |
s/jh/dZ/; | |
s/iy/i/; | |
s/ng/N/; | |
s/aa/A/; | |
s/ch/tS/; | |
s/ah/V/; | |
s/er/r=/; | |
s/ae/{/; | |
s/y/j/; | |
} | |
print OUTFILE @lines; | |
close OUTFILE; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment