voxforge.org
VoxForge Dev
Show
Ignore:
Timestamp:
06/17/08 15:40:55 (7 months ago)
Author:
kmaclean
Message:

AudioSegmentation script - snapshot re: interactive Missingword update

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/Scripts/Audio_scripts/AudioSegmentation/AudioBook/MissingWords/CommandLine.pm

    r2613 r2614  
    1414=head1 Requirements 
    1515 
    16 Perl Package: "Term::ReadLine::Gnu" needs to be installed - required for the "preput" feature it provides 
    17 Term::ReadLine is used as the front-end to Term::ReadLine::Gnu 
     16Perl Package: "Term::ReadLine::Gnu" needs to be installed - required for the "preput" feature it provides. 
     17"Term::ReadLine" is used as the front-end to "Term::ReadLine::Gnu". 
    1818 
    1919=cut  
     
    3030my $command; 
    3131 
     32=head1 Class Methods    
     33 
    3234=head2 new  
    3335 
     
    4951        return $self; 
    5052} 
     53 
     54=head1 Instance Methods    
    5155 
    5256=head2 interactive  
     
    8892        updateDictionary(\@processedWordsPhones); 
    8993} 
    90  
    91 =head1 Methods    
    9294 
    9395=head3 process 
     
    221223        print "updateDictionary\n"; 
    222224        open(MISSINGWORDSFINAL,">AudioBook/interim_files/MissingWords_final") or confess ("cannot open AudioBook/interim_files/MissingWords_final file"); 
     225# !!!!!! 
     226        my ($word, $phonesSelected); 
    223227        foreach my $line (@$processedWordsPhones) { 
    224                 my $word = $$line[0]; 
    225                 my $phonesSelected = $$line[1]; 
    226                 print MISSINGWORDSFINAL "$word\t[$word]\t$phonesSelected\n"; 
     228                $word = $$line[0]; 
     229                $phonesSelected = $$line[1]; 
     230                #print MISSINGWORDSFINAL "$word\t[$word]\t$phonesSelected\n"; 
     231                if (length($word)<14) { #  
     232                        write MISSINGWORDSFINAL; 
     233                } else { 
     234                        print MISSINGWORDSFINAL "$word [$word] $phonesSelected\n"; 
     235                } 
    227236        } 
    228237        close MISSINGWORDSFINAL;         
     238        format MISSINGWORDSFINAL = 
     239@<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     240$word,"[" . $word ."]",$phonesSelected 
     241. 
     242# !!!!!! 
    229243} 
    230244