Changeset 2579
- Timestamp:
- 05/12/08 22:03:24 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Trunk/Scripts/Audio_scripts/UserSubmission/LICENSE.pm
r2517 r2579 31 31 use File::Copy; 32 32 use lib '../../Audio_scripts'; 33 use UserSubmission::README; 33 use UserSubmission::README; 34 34 35 35 Trunk/Scripts/Audio_scripts/UserSubmission/PROMPTS.pm
r2578 r2579 135 135 my $audio_rate_dir = "$samplingrate:$samplingrateformat"; 136 136 open (FILEIN, "$QuarantineDir/$audio_dir_name/PROMPTS") ||confess ("Unable to open PROMPTS file for reading"); 137 # !!!!!!!138 #if ($readme->getLanguage() =~ /EN/) {139 # open (FILEOUT,">$QuarantineDir/$audio_dir_name/VALIDATION-PROMPTS") || confess ("Unable to open VALIDATION-PROMPTS file for writing");140 #}141 # !!!!!!!142 137 open (FILEOUT_PROD,">$QuarantineDir/$audio_dir_name/PROD-PROMPTS") || confess ("Unable to open PROD-PROMPTS file for writing"); 143 138 my %prompts; … … 155 150 $linescalar =~ tr/a-z/A-Z/; # change to uppercase 156 151 $linescalar =~ s/,//g; # remove commas 157 #$linescalar =~ s/\.//g; # remove periods152 $linescalar =~ s/\.//g; # remove periods 158 153 # dealing with quotes 159 154 # $linescalar =~ s/\'//g; # remove single quotes; but need words like "don't" - need to research this more ... 160 155 # $linescalar =~ s/\'\b(.*)\b\'/$1/g; # remove single quotes from quoted text; single quote must be at start of a word, and at end of a word - does not work if there are two words with single quotesin them in same sentence ... 161 156 $linescalar =~ s/\"//g; # remove double quotes 162 #$linescalar =~ s/://g; # remove colon157 $linescalar =~ s/://g; # remove colon 163 158 # $linescalar =~ s/-//g; # compound word dash 164 #$linescalar =~ s/--//g; # double dash165 #$linescalar =~ s/ - / /g; # space dash space punctuation166 #$linescalar =~ s/ -/ /g; # space dash punctuation159 $linescalar =~ s/--//g; # double dash 160 $linescalar =~ s/ - / /g; # space dash space punctuation 161 $linescalar =~ s/ -/ /g; # space dash punctuation 167 162 $linescalar =~ s/;//g; # semi-colon 168 163 $linescalar =~ s/!//g; # exclamation mark 169 164 $linescalar =~ s/\?//g; # question mark 170 # Other cleanup !!!!!! need to change the prompts files directly rather than doing this!!! or add to dictionnary!!! 171 #!!!!!! 172 #if ($readme->getLanguage() =~ /EN/) { 173 # print (FILEOUT "$path_mfcc/$filename $linescalar\n"); 174 #} 175 #!!!!!! 165 $linescalar =~ s/\+//g; # plus 176 166 print (FILEOUT_PROD "$prod_path_mfcc/$filename $linescalar\n"); # output to file 177 167 $prompts{'PromptCount'}++; … … 179 169 } 180 170 close(FILEIN); 181 #!!!!!! 182 #if ($readme->getLanguage() =~ /EN/) { 183 # close(FILEOUT); 184 #} 185 #close(FILEOUT_PROD); 186 #!!!!!! 171 close(FILEOUT_PROD); 187 172 rename "$QuarantineDir/$audio_dir_name/PROMPTS", "$QuarantineDir/$audio_dir_name/prompts-original" || confess "can't rename file\n"; 188 173 rename "$QuarantineDir/$audio_dir_name/PROD-PROMPTS", "$QuarantineDir/$audio_dir_name/PROMPTS" || confess "can't rename file\n";; Trunk/Scripts/Audio_scripts/UserSubmission/PROMPTS/EN.pm
r2578 r2579 52 52 my $audio_rate_dir = "$samplingrate:$samplingrateformat"; 53 53 open (FILEIN, "$QuarantineDir/$audio_dir_name/PROMPTS") ||confess ("Unable to open PROMPTS file for reading"); 54 #if ($readme->getLanguage() =~ /EN/) {55 54 open (FILEOUT,">$QuarantineDir/$audio_dir_name/VALIDATION-PROMPTS") || confess ("Unable to open VALIDATION-PROMPTS file for writing"); 56 #}57 55 open (FILEOUT_PROD,">$QuarantineDir/$audio_dir_name/PROD-PROMPTS") || confess ("Unable to open PROD-PROMPTS file for writing"); 58 56 my %prompts; … … 77 75 # $linescalar =~ s/\'//g; # remove single quotes; but need words like "don't" - need to research this more ... 78 76 # $linescalar =~ s/\'\b(.*)\b\'/$1/g; # remove single quotes from quoted text; single quote must be at start of a word, and at end of a word - does not work if there are two words with single quotesin them in same sentence ... 79 $linescalar =~ s/\'EM//g; # remove leading single quotes for contraction of them80 77 $linescalar =~ s/\"//g; # remove double quotes 81 78 $linescalar =~ s/://g; # remove colon … … 88 85 $linescalar =~ s/\?//g; # question mark 89 86 # Other cleanup !!!!!! need to change the prompts files directly rather than doing this!!! or add to dictionnary!!! 87 $linescalar =~ s/\'EM//g; # remove leading single quotes for contraction of them 90 88 $linescalar =~ s/&/AND/g; 91 89 $linescalar =~ s/2000/TWO THOUSAND/g; … … 98 96 } 99 97 close(FILEIN); 100 #if ($readme->getLanguage() =~ /EN/) { 101 close(FILEOUT); 102 #} 98 close(FILEOUT); 103 99 close(FILEOUT_PROD); 104 100 rename "$QuarantineDir/$audio_dir_name/PROMPTS", "$QuarantineDir/$audio_dir_name/prompts-original" || confess "can't rename file\n";