Speech:MakeCorpus.pl

=Summary= Title: makeCorpus.pl Authors: Jon Shallow/ James Schumaker -- Modeling Group SP16 Location: /mnt/main/scripts/user/ Usage: Usage: makeCorpus.pl  Example: makeCorpus.pl first_5hrs

=Description=

This script is used to create the directory structure of a new corpus:
 * 
 * Info
 * Logs
 * Misc
 * Test
 * Audio
 * Conv
 * Utt
 * Etc
 * Trans
 * Train
 * Audio
 * Conv
 * Utt
 * Etc
 * Trans

Instructions:

Run from the parent folder your corpus will fall under. Example: from /mnt/main/corpus/switchboard: "perl /mnt/main/scripts/user/makeCorpus my_new_corpus"

=Code= use Cwd; use File::Basename;
 * 1) !/user/bin/perl
 * 1) Usage: makeCorpus.pl 
 * 2) Example: makeCorpus.pl

$corpus_name = $ARGV[0]; #first_5hrs $path = getcwd; $corpus_path = "$path"; $corpus_utt_path = "$corpus_path/$corpus_name/train/audio/utt/"; $full_corpus_trans = "/mnt/main/corpus/switchboard/full/train/trans/train.trans"; $full_corpus_utt_path = "/mnt/main/corpus/switchboard/full/train/audio/utt/";
 * 1) Variables used throughout script
 * 1) $corpus_path = "/mnt/main/corpus/switchboard";


 * 1) Create Directory Structure
 * 1) Create Directory Structure

$cmd = "mkdir $corpus_path/$corpus_name"; #"/mnt/main/cropus/switchboard/first_5hrs" system($cmd);

system("mkdir $corpus_path/$corpus_name/test"); system("mkdir $corpus_path/$corpus_name/test/audio"); system("mkdir $corpus_path/$corpus_name/test/audio/conv"); system("mkdir $corpus_path/$corpus_name/test/audio/utt"); system("mkdir $corpus_path/$corpus_name/test/etc"); system("mkdir $corpus_path/$corpus_name/test/trans");
 * 1) test subdirectory.
 * 2)       audio   etc     trans
 * 3) conv utt   -    -

system("mkdir $corpus_path/$corpus_name/train"); system("mkdir $corpus_path/$corpus_name/train/audio"); system("mkdir $corpus_path/$corpus_name/train/audio/conv"); system("mkdir $corpus_path/$corpus_name/train/audio/utt"); system("mkdir $corpus_path/$corpus_name/train/etc"); system("mkdir $corpus_path/$corpus_name/train/trans");
 * 1) train subdirectory.
 * 2)       audio   etc     trans
 * 3) conv utt   -    -

system("mkdir $corpus_path/$corpus_name/info"); system("mkdir $corpus_path/$corpus_name/info/logs"); system("mkdir $corpus_path/$corpus_name/info/misc");
 * 1) Info subdirectory

print "$corpus_name directory structure created!\n";