u
This commit is contained in:
		
							parent
							
								
									be14f64242
								
							
						
					
					
						commit
						7f0bf14e13
					
				
							
								
								
									
										
											BIN
										
									
								
								script_nuance/XWin Server.lnk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								script_nuance/XWin Server.lnk
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										77
									
								
								script_nuance/_template.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								script_nuance/_template.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,77 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | ################################################################################ | ||||||
|  | # template for checking platform to set platform-specific environment. | ||||||
|  | ################################################################################ | ||||||
|  | PLATFORM=`hostname | perl -ne 'if (/AC-/) {exec "echo aachen_linux"} elsif (/leiqin/) {exec "echo aachen_windows"} elsif (/xena|cvshost/) {exec "echo burlington_unix"}'` | ||||||
|  | 
 | ||||||
|  | if [ $PLATFORM == 'aachen_windows' ] | ||||||
|  | then  | ||||||
|  |     echo "$PLATFORM: do something" | ||||||
|  | elif [ $PLATFORM == 'aachen_linux' ] | ||||||
|  | then  | ||||||
|  |     echo "$PLATFORM: do something" | ||||||
|  | else | ||||||
|  |   echo "Unknown System: nothing has been performed!" | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | ################################################################################ | ||||||
|  | # template for system-specific settings | ||||||
|  | ################################################################################ | ||||||
|  | HOST=`/bin/hostname` | ||||||
|  | OS_TYPE=`/bin/uname -s` | ||||||
|  | OS_REL=`/bin/uname -r` | ||||||
|  | CPU=`/usr/localbin/cpu` | ||||||
|  | OS=`/usr/localbin/os` | ||||||
|  | 
 | ||||||
|  | if [ $HOST == '???' ] | ||||||
|  | then . ~/???.sh | ||||||
|  | elif [ $HOST == '???' ] | ||||||
|  | then . ~/???.sh | ||||||
|  | else | ||||||
|  |     echo "Unknown system $HOST." | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | #################################### | ||||||
|  | # you must use double quote around $1, because it's a shell variable and replaced by shell directly. | ||||||
|  | if [ "$1" == "" ] # it's always safer to quote variables in shell script. | ||||||
|  | 
 | ||||||
|  | if [ condition ] | ||||||
|  | then # then must be on a seperate line! | ||||||
|  |     cmds | ||||||
|  | elif [ condition ]  | ||||||
|  |     cmds | ||||||
|  | else | ||||||
|  |     cmds | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | ################################################################################ | ||||||
|  | #******************************************************************************* | ||||||
|  | ################################################################################ | ||||||
|  | 
 | ||||||
|  | #~/bin/csh | ||||||
|  | 
 | ||||||
|  | ################################################################################ | ||||||
|  | # template for system-specific settings | ||||||
|  | ################################################################################ | ||||||
|  | set host=`/bin/hostname` | ||||||
|  | set os_type=`/bin/uname -s` | ||||||
|  | set os_rel=`/bin/uname -r` | ||||||
|  | #set cpu=`/usr/localbin/cpu` | ||||||
|  | #set os=`/usr/localbin/os` | ||||||
|  | 
 | ||||||
|  | if ($host == "hydra") then  # the then must be in the same line of if | ||||||
|  |     source ~/cshrc.hydra.csh | ||||||
|  | else if ($host == "AC-Albatross") then  | ||||||
|  |     source ~/cshrc.ac-linux.csh | ||||||
|  | else  | ||||||
|  |     echo "Unknown system $host." | ||||||
|  | endif | ||||||
|  | 
 | ||||||
|  | if ( condition ) then # then must be on the same line! | ||||||
|  |     cmds | ||||||
|  | else if ( condition ) | ||||||
|  |     cmds | ||||||
|  | else | ||||||
|  |     cmds | ||||||
|  | endif | ||||||
							
								
								
									
										21
									
								
								script_nuance/addlibpath.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								script_nuance/addlibpath.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | # usage: source addlibpath.csh new_path | ||||||
|  | 
 | ||||||
|  | # this script requires a normalized $PATH:  | ||||||
|  | # 1. each path except the last one must be followed by ":" without any whitespace;  | ||||||
|  | # 2. each path is NOT finished by "/" | ||||||
|  | # besides, the input parameter $1 is NOT finished by "/". | ||||||
|  | # Purpose of the normalization is to match $ENV{NEWPATH}(:\|$) | ||||||
|  | 
 | ||||||
|  | # it must be explicitly exported because Perl only add environment variables to %ENV, not those shell variables: | ||||||
|  | setenv NEWPATH $1   | ||||||
|  | 
 | ||||||
|  | # on windows, we must use /usr/bin/perl from cygwin, because ActivePerl doesn't work on following line: | ||||||
|  | if ('no' == `/usr/bin/perl -e 'if ($ENV{LD_LIBRARY_PATH} =~ m|$ENV{NEWPATH}(:\|$)|) {exec "echo yes"} else {exec "echo no"}'`) then | ||||||
|  |     if (${?LD_LIBRARY_PATH} == 1) then # you must enclose {?LD_LIBRARY_PATH}, otherwise it checks LD instead of LD_LIBRARY_PATH | ||||||
|  | 	setenv LD_LIBRARY_PATH ${1}:${LD_LIBRARY_PATH}  # $1 must be enclosed with {}, otherwise it cannot be parsed. | ||||||
|  |     else | ||||||
|  | 	setenv LD_LIBRARY_PATH ${1} | ||||||
|  |     endif | ||||||
|  | endif | ||||||
							
								
								
									
										22
									
								
								script_nuance/addlibpath.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								script_nuance/addlibpath.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | # usage: . addlibpath.sh new_path | ||||||
|  | 
 | ||||||
|  | # this script requires a normalized $LD_LIBRARY_PATH:  | ||||||
|  | # 1. each path except the last one must be followed by ":" without any whitespace;  | ||||||
|  | # 2. each path is NOT finished by "/" | ||||||
|  | # besides, the input parameter $1 is NOT finished by "/". | ||||||
|  | # Purpose of the normalization is to match $ENV{NEWPATH}(:\|$) | ||||||
|  | 
 | ||||||
|  | # it must be explicitly exported because Perl only add environment variables to %ENV, not those shell variables: | ||||||
|  | export NEWPATH=$1   | ||||||
|  | # on windows, we must use /usr/bin/perl from cygwin, because ActivePerl doesn't work on following line: | ||||||
|  | if [ 'no' == `/usr/bin/perl -e 'if ($ENV{LD_LIBRARY_PATH} =~ m|$ENV{NEWPATH}(:\|$)|) {exec "echo yes"} else {exec "echo no"}'` ] | ||||||
|  | then | ||||||
|  |     if [ -z ${LD_LIBRARY_PATH} ] | ||||||
|  |     then | ||||||
|  | 	export LD_LIBRARY_PATH=$1 | ||||||
|  |     else | ||||||
|  | 	export LD_LIBRARY_PATH=$1:${LD_LIBRARY_PATH} | ||||||
|  |     fi | ||||||
|  | fi | ||||||
							
								
								
									
										16
									
								
								script_nuance/addpath.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								script_nuance/addpath.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,16 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | # usage: source addlibpath.csh new_path | ||||||
|  | 
 | ||||||
|  | # this script requires a normalized $PATH:  | ||||||
|  | # 1. each path except the last one must be followed by ":" without any whitespace;  | ||||||
|  | # 2. each path is NOT finished by "/" | ||||||
|  | # besides, the input parameter $1 is NOT finished by "/". | ||||||
|  | # Purpose of the normalization is to match $ENV{NEWPATH}(:\|$) | ||||||
|  | 
 | ||||||
|  | # it must be explicitly exported because Perl only add environment variables to %ENV, not those shell variables: | ||||||
|  | setenv NEWPATH $1   | ||||||
|  | # on windows, we must use /usr/bin/perl from cygwin, because ActivePerl doesn't work on following line: | ||||||
|  | if ('no' == `/usr/bin/perl -e 'if ($ENV{PATH} =~ m|$ENV{NEWPATH}(:\|$)|) {exec "echo yes"} else {exec "echo no"}'`) then | ||||||
|  |   setenv PATH ${1}:$PATH  # $1 must be enclosed with {}, otherwise it cannot be parsed. | ||||||
|  | endif | ||||||
							
								
								
									
										17
									
								
								script_nuance/addpath.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								script_nuance/addpath.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | # usage: . addpath.sh new_path | ||||||
|  | 
 | ||||||
|  | # this script requires a normalized $PATH:  | ||||||
|  | # 1. each path except the last one must be followed by ":" without any whitespace;  | ||||||
|  | # 2. each path is NOT finished by "/" | ||||||
|  | # besides, the input parameter $1 is NOT finished by "/". | ||||||
|  | # Purpose of the normalization is to match $ENV{NEWPATH}(:\|$) | ||||||
|  | 
 | ||||||
|  | # it must be explicitly exported because Perl only add environment variables to %ENV, not those shell variables: | ||||||
|  | export NEWPATH=$1   | ||||||
|  | # on windows, we must use /usr/bin/perl from cygwin, because ActivePerl doesn't work on following line: | ||||||
|  | if [ 'no' == `/usr/bin/perl -e 'if ($ENV{PATH} =~ m|$ENV{NEWPATH}(:\|$)|) {exec "echo yes"} else {exec "echo no"}'` ] | ||||||
|  | then | ||||||
|  |     export PATH=$1:$PATH | ||||||
|  | fi | ||||||
							
								
								
									
										48
									
								
								script_nuance/cvsroot.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								script_nuance/cvsroot.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,48 @@ | |||||||
|  | @ IF "%1" == "" GOTO EMPTY | ||||||
|  | @ IF "%1" == "p" GOTO PRODUCT | ||||||
|  | @ IF "%1" == "s" GOTO SOLUTION | ||||||
|  | @ IF "%1" == "a" GOTO ASR | ||||||
|  | @ IF "%1" == "o" GOTO OFFICE | ||||||
|  | @ IF "%1" == "h" GOTO HOME | ||||||
|  | 
 | ||||||
|  | :UNKNOWN | ||||||
|  | @ echo Unknown option! Nothing was configured. | ||||||
|  | @ GOTO USAGE | ||||||
|  | 
 | ||||||
|  | :EMPTY | ||||||
|  | @ echo Empty option! Nothing was configured. | ||||||
|  | @ GOTO USAGE | ||||||
|  | 
 | ||||||
|  | :USAGE | ||||||
|  | @ echo Usage: cvsroot [psaoh] | ||||||
|  | @ echo   p, s, a for Product/Solutions/AMR | ||||||
|  | @ echo   o, h for my Office/Home | ||||||
|  | @ echo Example: cvsroot o | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :PRODUCT | ||||||
|  | @ set CVSROOT=:pserver:llu@cvshost.speechworks.com:/swicvs/product | ||||||
|  | @ echo CVSROOT of Product was successfully configured. | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :SOLUTION | ||||||
|  | @ set CVSROOT=:pserver:llu@cvshost.speechworks.com:/swicvs/solutions | ||||||
|  | @ echo CVSROOT of Solutions was successfully configured. | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :ASR | ||||||
|  | @ set CVSROOT=:pserver:llu@wa-csr-cvs.wa.scansoft.com:/res/lvcsr/code/cvsroot | ||||||
|  | @ echo CVSROOT of AMR was successfully configured. | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :OFFICE | ||||||
|  | @ set CVSROOT=:ext:llu@ac-llu.nuance.com:/cygdrive/c/Home/cvsrep | ||||||
|  | @ echo CVSROOT of Office was successfully configured. | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :HOME | ||||||
|  | @ set CVSROOT=:ext:llu@nil.sytes.net:/cygdrive/r/cvsrep | ||||||
|  | @ echo CVSROOT of Home was successfully configured. | ||||||
|  | @GOTO END | ||||||
|  | 
 | ||||||
|  | :END | ||||||
							
								
								
									
										41
									
								
								script_nuance/cvsroot.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								script_nuance/cvsroot.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,41 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | if ("$1" == '') then | ||||||
|  |     echo "Which CVSROOT?" | ||||||
|  |     echo " p for Product at :pserver:llu@cvshost.speechworks.com:/swicvs/product" | ||||||
|  |     echo " s for Solution at :pserver:llu@cvshost.speechworks.com:/swicvs/solutions" | ||||||
|  |     echo " a for AMR at :pserver:llu@wa-csr-cvs.wa.scansoft.com:/res/lvcsr/code/cvsroot" | ||||||
|  |     echo " o for Office at :ext:llu@ac-llu.nuance.com:/cygdrive/c/Home/cvsrep" | ||||||
|  |     echo " h for Home at :ext:llu@nil.sytes.net:/cygdrive/r/cvsrep" | ||||||
|  |     echo -n ":" | ||||||
|  |     set selection=$< | ||||||
|  | else | ||||||
|  |     set selection=$1 | ||||||
|  | endif | ||||||
|  | 
 | ||||||
|  | switch ($selection)  | ||||||
|  | case p:  | ||||||
|  |     setenv CVSROOT ":pserver:llu@cvshost.speechworks.com:/swicvs/product" | ||||||
|  |     echo "CVSROOT of Product was successfully configured." | ||||||
|  |     breaksw | ||||||
|  | case s:  | ||||||
|  |     setenv CVSROOT ":pserver:llu@cvshost.speechworks.com:/swicvs/solutions" | ||||||
|  |     echo "CVSROOT of Solution was successfully configured." | ||||||
|  |     breaksw | ||||||
|  | case a:  | ||||||
|  |     setenv CVSROOT ":pserver:llu@wa-csr-cvs.wa.scansoft.com:/res/lvcsr/code/cvsroot" | ||||||
|  |     echo "CVSROOT of AMR was successfully configured." | ||||||
|  |     breaksw | ||||||
|  | case o:  | ||||||
|  |     setenv CVSROOT ":ext:llu@ac-llu.nuance.com:/cygdrive/c/Home/cvsrep" | ||||||
|  |     echo "CVSROOT of Office was successfully configured." | ||||||
|  |     breaksw | ||||||
|  | case h: | ||||||
|  |     setenv CVSROOT ":ext:llu@nil.sytes.net:/cygdrive/r/cvsrep" | ||||||
|  |     echo "CVSROOT of Home was successfully configured." | ||||||
|  |     breaksw | ||||||
|  | default: | ||||||
|  |     echo "Unknown option! Nothing was configured." | ||||||
|  |     echo "Usage: . cvsroot.sh [psaoh]" | ||||||
|  |     echo "Example: . ~/bin/cvsroot.csh o";; | ||||||
|  | endsw | ||||||
							
								
								
									
										31
									
								
								script_nuance/cvsroot.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								script_nuance/cvsroot.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,31 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | if [ "$1" == '' ] | ||||||
|  | then | ||||||
|  |     echo "Which CVSROOT?" | ||||||
|  |     echo " p for Product at :pserver:llu@cvshost.speechworks.com:/swicvs/product" | ||||||
|  |     echo " s for Solutions at :pserver:llu@cvshost.speechworks.com:/swicvs/solutions" | ||||||
|  |     echo " a for AMR at :pserver:llu@wa-csr-cvs.wa.scansoft.com:/res/lvcsr/code/cvsroot" | ||||||
|  |     echo " o for Office at :ext:llu@ac-llu.nuance.com:/cygdrive/c/Home/cvsrep" | ||||||
|  |     echo " h for Home at :ext:llu@nil.sytes.net:/cygdrive/r/cvsrep" | ||||||
|  |     echo -n ":" | ||||||
|  |     read selection | ||||||
|  | else | ||||||
|  |     selection=$1 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | case $selection in | ||||||
|  |     p) export CVSROOT=":pserver:llu@cvshost.speechworks.com:/swicvs/product" | ||||||
|  | 	echo "CVSROOT of Product was successfully configured.";; | ||||||
|  |     s) export CVSROOT=":pserver:llu@cvshost.speechworks.com:/swicvs/solutions" | ||||||
|  | 	echo "CVSROOT of Solution was successfully configured.";; | ||||||
|  |     a) export CVSROOT=":pserver:llu@wa-csr-cvs.wa.scansoft.com:/res/lvcsr/code/cvsroot" | ||||||
|  | 	echo "CVSROOT of AMR was successfully configured.";; | ||||||
|  |     o) export CVSROOT=":ext:llu@ac-llu.nuance.com:/cygdrive/c/Home/cvsrep" | ||||||
|  | 	echo "CVSROOT of Office was successfully configured.";; | ||||||
|  |     h) export CVSROOT="ext:llu@nil.sytes.net:/cygdrive/r/cvsrep" | ||||||
|  | 	echo "CVSROOT of Home was successfully configured.";; | ||||||
|  |     *) echo "Unknown option! Nothing was configured." | ||||||
|  | 	echo "Usage: . cvsroot.sh [psaoh]" | ||||||
|  | 	echo "Example: . ~/bin/cvsroot.sh o";; | ||||||
|  | esac | ||||||
							
								
								
									
										28
									
								
								script_nuance/exspeech.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								script_nuance/exspeech.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,28 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | source ~/bin/platform.csh | ||||||
|  | 
 | ||||||
|  | #if ("$1" == '') then | ||||||
|  | #    echo "Which ExSpeech?" | ||||||
|  | #    echo -n "Please enter a ExSpeech version, e.g. 2006-02-02: " | ||||||
|  | #    set selection=$< | ||||||
|  | #else | ||||||
|  | #    set selection=$1 | ||||||
|  | #endif  | ||||||
|  | 
 | ||||||
|  | echo "Use current ExSpeech version:" | ||||||
|  | set selection='current' | ||||||
|  | 
 | ||||||
|  | # todo: check existence of osr installation! | ||||||
|  | if ("$PLATFORM" == 'aachen_windows') then  | ||||||
|  |     echo "ExSpeech $selection isn't implemented on Aachen Windows." | ||||||
|  | else if ("$PLATFORM" == 'aachen_linux') then | ||||||
|  |     echo "ExSpeech $selection isn't implemented on Aachen Linux." | ||||||
|  | else if ("$PLATFORM" == 'burlington_linux') then | ||||||
|  |     source /res/tools/ExSpeech/current/setenv.csh  | ||||||
|  |     echo "ExSpeech $selection was successfully configured on Burlington Linux." | ||||||
|  | else if ("$PLATFORM" == 'home_windows') then | ||||||
|  |     echo "ExSpeech $selection isn't implemented on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown System! Nothing was configured." | ||||||
|  | endif | ||||||
							
								
								
									
										32
									
								
								script_nuance/exspeech.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								script_nuance/exspeech.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | . ~/bin/platform.sh | ||||||
|  | 
 | ||||||
|  | #if [ "$1" == '' ] then | ||||||
|  | #    echo "Which ExSpeech?" | ||||||
|  | #    echo -n "Please enter an ExSpeech version, e.g. 2006-02-02: " | ||||||
|  | #    read selection | ||||||
|  | #else | ||||||
|  | #    selection=$1 | ||||||
|  | #fi | ||||||
|  | 
 | ||||||
|  | echo "Use current ExSpeech version:" | ||||||
|  | selection='current' | ||||||
|  | 
 | ||||||
|  | # todo: check existence of osr installation! | ||||||
|  | if [ "$PLATFORM" == 'aachen_windows' ]  | ||||||
|  | then  | ||||||
|  |     echo "ExSpeech $selection isn't implemented on Aachen Windows." | ||||||
|  | elif [ "$PLATFORM" == 'aachen_linux' ]  | ||||||
|  | then | ||||||
|  |    echo "ExSpeech $selection isn't implemented on Aachen Linux." | ||||||
|  | elif [ "$PLATFORM" == 'burlington_linux' ]  | ||||||
|  | then | ||||||
|  |     . /res/tools/ExSpeech/current/setenv.sh  | ||||||
|  |     echo "ExSpeech $selection was successfully configured on Burlington Linux." | ||||||
|  | elif [ "$PLATFORM" == 'home_windows' ]  | ||||||
|  | then | ||||||
|  |    echo "ExSpeech $selection isn't implemented on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown System! Nothing was configured." | ||||||
|  | fi | ||||||
							
								
								
									
										31
									
								
								script_nuance/gcc.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								script_nuance/gcc.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,31 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | source ~/bin/platform.csh | ||||||
|  | 
 | ||||||
|  | #if ("$1" == '') then | ||||||
|  | #    echo "Which GCC?" | ||||||
|  | #    echo -n "Please enter a GCC version, e.g. 3.4.2: " | ||||||
|  | #    set selection=$< | ||||||
|  | #else | ||||||
|  | #    set selection=$1 | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
|  | echo "Assume GCC 4.1.0" | ||||||
|  | set selection='4.1.0' | ||||||
|  | 
 | ||||||
|  | # todo: check existence of osr installation! | ||||||
|  | if ($PLATFORM == 'aachen_windows') then  | ||||||
|  |     echo "GCC $selection is unavailable on Aachen Windows." | ||||||
|  | else if ($PLATFORM == 'aachen_linux') then  | ||||||
|  |     source ~/bin/addpath.csh /usr/localbin/gcc-$selection-posix-fPIC/bin | ||||||
|  |     source ~/bin/addlibpath.csh /usr/localbin/gcc-$selection-posix-fPIC/lib | ||||||
|  |     echo "GCC $selection was successfully configured on on Aachen Linux." | ||||||
|  | else if ($PLATFORM == 'burlington_linux') then  | ||||||
|  |     source ~/bin/addpath.csh /usr/local/gcc-$selection/bin | ||||||
|  |     source ~/bin/addlibpath.csh /usr/local/gcc-$selection/lib | ||||||
|  |     echo "GCC $selection was successfully configured on Burlington Linux." | ||||||
|  | else if ("$PLATFORM" == 'home_windows') then | ||||||
|  |     echo "GCC $selection is unavailable on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown system! Nothing was configured." | ||||||
|  | endif | ||||||
							
								
								
									
										36
									
								
								script_nuance/gcc.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								script_nuance/gcc.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,36 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | . ~/bin/platform.sh | ||||||
|  | 
 | ||||||
|  | #if [ "$1" == '' ]  | ||||||
|  | #then | ||||||
|  | #    echo "Which GCC?" | ||||||
|  | #    echo -n "Please enter a GCC version, e.g. 3.4.2: " | ||||||
|  | #    read selection | ||||||
|  | #else | ||||||
|  | #    selection=$1 | ||||||
|  | #fi | ||||||
|  | 
 | ||||||
|  | echo "Assume GCC 4.1.0" | ||||||
|  | selection='4.1.0' | ||||||
|  | 
 | ||||||
|  | # todo: check existence of osr installation! | ||||||
|  | if [ $PLATFORM == 'aachen_windows' ] | ||||||
|  | then  | ||||||
|  |     echo "GCC $selection is unavailable on Aachen Windows." | ||||||
|  | elif [ $PLATFORM == 'aachen_linux' ] | ||||||
|  | then  | ||||||
|  |     . ~/bin/addpath.sh /usr/localbin/gcc-$selection-posix-fPIC/bin | ||||||
|  |     . ~/bin/addlibpath.sh /usr/localbin/gcc-$selection-posix-fPIC/lib | ||||||
|  |     echo "GCC $selection was successfully configured on on Aachen Linux." | ||||||
|  | elif [ $PLATFORM == 'burlington_linux' ] | ||||||
|  | then  | ||||||
|  |     . ~/bin/addpath.sh /usr/local/gcc-$selection/bin | ||||||
|  |     . ~/bin/addlibpath.sh /usr/local/gcc-$selection/lib | ||||||
|  |     echo "GCC $selection was successfully configured on Burlington Linux." | ||||||
|  | elif [ "$PLATFORM" == 'home_windows' ] | ||||||
|  | then | ||||||
|  |     echo "GCC $selection is unavailable on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown system! Nothing was configured." | ||||||
|  | fi | ||||||
							
								
								
									
										45
									
								
								script_nuance/gotohost.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								script_nuance/gotohost.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,45 @@ | |||||||
|  | @ IF "%1" == "" GOTO EMPTY | ||||||
|  | @ IF "%1" == "home" GOTO HOME | ||||||
|  | @ IF "%1" == "office" GOTO OFFICE | ||||||
|  | @ IF "%1" == "aachen" GOTO AACHEN | ||||||
|  | @ IF "%1" == "xena" GOTO XENA | ||||||
|  | @ IF "%1" == "grid" GOTO GRID | ||||||
|  | @ IF "%1" == "menlo" GOTO MENLO | ||||||
|  | 
 | ||||||
|  | :UNKNOWN | ||||||
|  | @ echo Unknown target! | ||||||
|  | @ ssh -C -X %1 | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :EMPTY | ||||||
|  | @ echo Empty target! | ||||||
|  | @ echo Usage: gotohost [TARGET] | ||||||
|  | @ echo   TARGET = home, aachen, xena, grid, menlo | ||||||
|  | @ echo Example: gotohost grid | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :HOME | ||||||
|  | @ ssh -C -X Administrator@nil.sytes.net | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :OFFICE | ||||||
|  | @ ssh -C -X leiqin@leiqin.eu.scansoft.com | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :AACHEN | ||||||
|  | @ ssh -C -X leiqin@ac-green.eu.scansoft.com | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :XENA | ||||||
|  | @ ssh -C -X llu@xena.speechworks.com | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :GRID | ||||||
|  | @ ssh -C -X llu@grid-cnh8.grid.nuance.com | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :MENLO | ||||||
|  | @ ssh -C -X lleiqin@navy.nuance.com | ||||||
|  | @GOTO END | ||||||
|  | 
 | ||||||
|  | :END | ||||||
							
								
								
									
										40
									
								
								script_nuance/gotohost.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								script_nuance/gotohost.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,40 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | if ("$1" == '') then | ||||||
|  |     echo "Which target?" | ||||||
|  |     echo " home" | ||||||
|  |     echo " office for leiqin@leiqin.eu.scansoft.com" | ||||||
|  |     echo " aachen for leiqin@ac-green.eu.scansoft.com" | ||||||
|  |     echo " xena for llu@xena.speechworks.com" | ||||||
|  |     echo " grid for llu@grid-cnh8.grid.nuance.com" | ||||||
|  |     echo " menlo for lleiqin@navy.nuance.com" | ||||||
|  |     echo -n ":" | ||||||
|  |     set selection=$< | ||||||
|  | else | ||||||
|  |     set selection=$1 | ||||||
|  | endif | ||||||
|  | 
 | ||||||
|  | switch ($selection)  | ||||||
|  | case home:  | ||||||
|  |     ssh -C -X Administrator@nil.sytes.net | ||||||
|  |     breaksw | ||||||
|  | case office: | ||||||
|  |     ssh -C -X leiqin@leiqin.eu.scansoft.com | ||||||
|  |     breaksw | ||||||
|  | case aachen:  | ||||||
|  |     ssh -C -X leiqin@ac-green.eu.scansoft.com | ||||||
|  |     breaksw | ||||||
|  | case xena:  | ||||||
|  |     ssh -C -X llu@xena.speechworks.com | ||||||
|  |     breaksw | ||||||
|  | case grid:  | ||||||
|  |     ssh -C -X llu@grid-cnh8.grid.nuance.com | ||||||
|  |     breaksw | ||||||
|  | case menlo: | ||||||
|  |     ssh -C -X lleiqin@navy.nuance.com | ||||||
|  |     breaksw | ||||||
|  | default: | ||||||
|  |     echo "Unknown option!" | ||||||
|  |     ssh -C -X $selection | ||||||
|  | endsw | ||||||
							
								
								
									
										27
									
								
								script_nuance/gotohost.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								script_nuance/gotohost.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | if [ "$1" == '' ]  | ||||||
|  | then | ||||||
|  |     echo "Which target?" | ||||||
|  |     echo " home" | ||||||
|  |     echo " office for leiqin@leiqin.eu.scansoft.com" | ||||||
|  |     echo " aachen for leiqin@ac-green.eu.scansoft.com" | ||||||
|  |     echo " xena for llu@xena.speechworks.com" | ||||||
|  |     echo " grid for llu@grid-cnh8.grid.nuance.com" | ||||||
|  |     echo " menlo for lleiqin@navy.nuance.com" | ||||||
|  |     echo -n ":" | ||||||
|  |     read selection | ||||||
|  | else | ||||||
|  |     selection=$1 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | case $selection in | ||||||
|  |     home) ssh -C -X Administrator@nil.sytes.net;; | ||||||
|  |     office) ssh -C -X leiqin@leiqin.eu.scansoft.com;; | ||||||
|  |     aachen) ssh -C -X leiqin@ac-green.eu.scansoft.com;; | ||||||
|  |     xena) ssh -C -X llu@xena.speechworks.com;; | ||||||
|  |     grid) ssh -C -X llu@grid-cnh8.grid.nuance.com;; | ||||||
|  |     menlo) ssh -C -X lleiqin@navy.nuance.com;; | ||||||
|  |     *) echo Unknown target! | ||||||
|  | 	ssh -C -X $selection;; | ||||||
|  | esac | ||||||
							
								
								
									
										7
									
								
								script_nuance/lrtools.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								script_nuance/lrtools.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | |||||||
|  | @ REM set lrTools for my laptop, so that play.exe works. | ||||||
|  | 
 | ||||||
|  | @echo off | ||||||
|  | @set SPSHAREDCOMPDIR=%HOME%\products\philips\lrtools | ||||||
|  | @set SPTOOLSDIR=%HOME%\products\philips\lrtools | ||||||
|  | @set SOUNDEDITOR=play.exe | ||||||
|  | @set PATH=%HOME%\products\philips\lrtools\bin\x86\;%PATH%; | ||||||
							
								
								
									
										19
									
								
								script_nuance/osr.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								script_nuance/osr.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | |||||||
|  | @ REM Return if option is empty or invalid: | ||||||
|  | @ IF "%1" == "" GOTO EMPTY | ||||||
|  | @ IF NOT EXIST %HOME%\products\%1 GOTO EMPTY | ||||||
|  | 
 | ||||||
|  | @ set PATH=%HOME%\products\%1\bin;%PATH% | ||||||
|  | @ set PRODUCT_LIB_PREFIX=SR | ||||||
|  | @ set CORE_ROOT=%HOME%\products\%1 | ||||||
|  | @ set SWISDK=%HOME%\products\%1 | ||||||
|  | @ set SWISRSDK=%HOME%\products\%1 | ||||||
|  | @ set SWILicenseServerList=27000@ac-albatross;27000@juelich;27000@ac-birdie | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :EMPTY | ||||||
|  | @ echo Unknown option! Nothing was configured. | ||||||
|  | @ echo Usage: osr VERSION | ||||||
|  | @ echo Example: osr osr309 | ||||||
|  | @ GOTO END | ||||||
|  | 
 | ||||||
|  | :END | ||||||
							
								
								
									
										44
									
								
								script_nuance/osr.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								script_nuance/osr.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,44 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | source ~/bin/platform.csh | ||||||
|  | 
 | ||||||
|  | if ("$1" == '') then | ||||||
|  |     echo "Which OSR?" | ||||||
|  |     echo -n "Please enter an OSR version, e.g. osr309: " | ||||||
|  |     set selection=$< | ||||||
|  | else | ||||||
|  |     set selection=$1 | ||||||
|  | endif  | ||||||
|  | 
 | ||||||
|  | # todo: check existence of osr installation! | ||||||
|  | if ("$PLATFORM" == 'aachen_windows') then  | ||||||
|  |     source ~/bin/addpath.csh ~/products/$selection/bin | ||||||
|  |     setenv PRODUCT_LIB_PREFIX SR | ||||||
|  |     setenv CORE_ROOT ~/products/$selection | ||||||
|  |     setenv SWISDK ~/products/$selection | ||||||
|  |     setenv SWISRSDK ~/products/$selection | ||||||
|  |     setenv SWILicenseServerList "27000@ac-albatross:27000@juelich:27000@ac-birdie" | ||||||
|  |     echo "OSR $selection was successfully configured on Aachen Windows." | ||||||
|  | else if ("$PLATFORM" == 'aachen_linux') then | ||||||
|  |     source ~/bin/addlibpath.sh /u_grid/ac-green/llu/osr/$selection/lib | ||||||
|  |     source ~/bin/addpath.csh /u_grid/ac-green/llu/osr/$selection/bin | ||||||
|  |     setenv PRODUCT_LIB_PREFIX SR | ||||||
|  |     setenv CORE_ROOT /u_grid/ac-green/llu/osr/$selection | ||||||
|  |     setenv SWISDK /u_grid/ac-green/llu/osr/$selection | ||||||
|  |     setenv SWISRSDK /u_grid/ac-green/llu/osr/$selection | ||||||
|  |     setenv SWILicenseServerList "27000@ac-albatross:27000@juelich:27000@ac-birdie" | ||||||
|  |     echo "OSR $selection was successfully configured on Aachen Linux." | ||||||
|  | else if ("$PLATFORM" == 'burlington_linux') then | ||||||
|  |     source ~/bin/addlibpath.csh /scratch/res/scratch3/llu/osr/$selection/lib | ||||||
|  |     source ~/bin/addpath.csh /scratch/res/scratch3/llu/osr/$selection/bin | ||||||
|  |     setenv PRODUCT_LIB_PREFIX SR | ||||||
|  |     setenv CORE_ROOT /scratch/res/scratch3/llu/osr/$selection | ||||||
|  |     setenv SWISDK /scratch/res/scratch3/llu/osr/$selection | ||||||
|  |     setenv SWISRSDK /scratch/res/scratch3/llu/osr/$selection | ||||||
|  |     setenv SWILicenseServerList "27000@beeblebrox.speechworks.com:27000@gargravarr.speechworks.com:27000@asia2.pb.scansoft.com" | ||||||
|  |     echo "OSR $selection was successfully configured on Burlington Linux." | ||||||
|  | else if ("$PLATFORM" == 'home_windows') then | ||||||
|  |     echo "OSR $selection is unavaible on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown System! Nothing was configured." | ||||||
|  | endif | ||||||
							
								
								
									
										49
									
								
								script_nuance/osr.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								script_nuance/osr.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,49 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | . ~/bin/platform.sh | ||||||
|  | 
 | ||||||
|  | if [ "$1" == '' ]  | ||||||
|  | then | ||||||
|  |     echo "Which OSR?" | ||||||
|  |     echo -n "Please enter an OSR version, e.g. osr309: " | ||||||
|  |     read selection | ||||||
|  | else | ||||||
|  |     selection=$1 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | # todo: check existence of osr installation! | ||||||
|  | if [ "$PLATFORM" == 'aachen_windows' ]  | ||||||
|  | then  | ||||||
|  |     . ~/bin/addpath.sh ~/products/$selection/bin | ||||||
|  |     export PRODUCT_LIB_PREFIX=SR | ||||||
|  |     export CORE_ROOT=~/products/$selection | ||||||
|  |     export SWISDK=~/products/$selection | ||||||
|  |     export SWISRSDK=~/products/$selection | ||||||
|  |     export SWILicenseServerList="27000@ac-albatross:27000@juelich:27000@ac-birdie" | ||||||
|  |     echo "$selection was successfully configured on Aachen Windows." | ||||||
|  | elif [ "$PLATFORM" == 'aachen_linux' ] | ||||||
|  | then | ||||||
|  |     . ~/bin/addlibpath.sh /u_grid/ac-green/llu/osr/$selection/lib | ||||||
|  |     . ~/bin/addpath.sh /u_grid/ac-green/llu/osr/$selection/bin | ||||||
|  |     export PRODUCT_LIB_PREFIX=SR | ||||||
|  |     export CORE_ROOT=/u_grid/ac-green/llu/osr/$selection | ||||||
|  |     export SWISDK=/u_grid/ac-green/llu/osr/$selection | ||||||
|  |     export SWISRSDK=/u_grid/ac-green/llu/osr/$selection | ||||||
|  |     export SWILicenseServerList="27000@ac-albatross:27000@juelich:27000@ac-birdie" | ||||||
|  |     echo "$selection was successfully configured on Aachen Linux." | ||||||
|  | elif [ "$PLATFORM" == 'burlington_linux' ] | ||||||
|  | then | ||||||
|  |     . ~/bin/addlibpath.sh /scratch/res/scratch3/llu/osr/$selection/lib | ||||||
|  |     . ~/bin/addpath.sh /scratch/res/scratch3/llu/osr/$selection/bin | ||||||
|  |     export PRODUCT_LIB_PREFIX=SR | ||||||
|  |     export CORE_ROOT=/scratch/res/scratch3/llu/osr/$selection | ||||||
|  |     export SWISDK=/scratch/res/scratch3/llu/osr/$selection | ||||||
|  |     export SWISRSDK=/scratch/res/scratch3/llu/osr/$selection | ||||||
|  |     export SWILicenseServerList="27000@beeblebrox.speechworks.com:27000@gargravarr.speechworks.com:27000@asia2.pb.scansoft.com" | ||||||
|  |     echo "OSR $selection was successfully configured on Burlington Linux." | ||||||
|  | elif [ "$PLATFORM" == 'home_windows' ] | ||||||
|  | then | ||||||
|  |     echo "OSR $selection is unavaible on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown System! Nothing was configured." | ||||||
|  | fi | ||||||
							
								
								
									
										7
									
								
								script_nuance/platform.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								script_nuance/platform.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | set PLATFORM=`hostname | perl -ne 'if (/AC-/) {exec "echo aachen_linux"} elsif (/ac-llu/) {exec "echo aachen_windows"} elsif (/ac-nb-llu/) {exec "echo aachen_windows"} elsif (/xena|cvshost|bn-|wa-|grid-/) {exec "echo burlington_linux"} elsif (/neptune/) {exec "echo home_windows"} else {exec "echo unknown"}'` | ||||||
|  | # it must return some non-empty string for unknown hostnames,  | ||||||
|  | # otherwise it makes if statement be wrong for unknown hostnames: | ||||||
|  | # if ($PLATFORM == 'somename') | ||||||
|  | # when $PLATFORM is empty string, there would be nothing to the left of ==. | ||||||
							
								
								
									
										7
									
								
								script_nuance/platform.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								script_nuance/platform.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | PLATFORM=`hostname | perl -ne 'if (/AC-/) {exec "echo aachen_linux"} elsif (/ac-llu/) {exec "echo aachen_windows"} elsif (/ac-nb-llu/) {exec "echo aachen_windows"} elsif (/xena|cvshost|bn-|wa-|grid-/) {exec "echo burlington_linux"} elsif (/neptune/) {exec "echo home_windows"} else {exec "echo unknown"}'`  | ||||||
|  | # it must return some non-empty string for unknown hostnames,  | ||||||
|  | # otherwise it makes if statement be wrong for unknown hostnames: | ||||||
|  | # if [ $PLATFORM == 'somename' ] | ||||||
|  | # when $PLATFORM is empty string, there would be nothing to the left of ==. | ||||||
							
								
								
									
										29
									
								
								script_nuance/python.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								script_nuance/python.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,29 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | source ~/bin/platform.csh | ||||||
|  | 
 | ||||||
|  | #if ( "$1" == '' ) then | ||||||
|  | #    echo "Which Python?" | ||||||
|  | #    echo -n "Please enter a Python version, e.g. 2.4: " | ||||||
|  | #    set selection=$< | ||||||
|  | #else | ||||||
|  | #    set selection=$1 | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
|  | echo "Currently only Python 2.4 is supported." | ||||||
|  | echo "Assume Python 2.4" | ||||||
|  | set selection='2.4' | ||||||
|  | 
 | ||||||
|  | # todo: check existence of osr installation! | ||||||
|  | if ( $PLATFORM == 'aachen_windows' ) then  | ||||||
|  |     echo "Python $selection is unavailable on Aachen Windows." | ||||||
|  | else if ( $PLATFORM == 'aachen_linux' ) then  | ||||||
|  |     source ~/bin/addpath.csh /usr/localbin/python$selection/bin | ||||||
|  |     echo "Python $selection was successfully configured on on Aachen Linux." | ||||||
|  | else if ( $PLATFORM == 'burlington_linux' ) then  | ||||||
|  |     echo "Python $selection is unavailable on Burlington Linux." | ||||||
|  | else if ( "$PLATFORM" == 'home_windows' ) then | ||||||
|  |     echo "Python $selection is unavailable on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown system! Nothing was configured." | ||||||
|  | endif | ||||||
							
								
								
									
										34
									
								
								script_nuance/python.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								script_nuance/python.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,34 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | . ~/bin/platform.sh | ||||||
|  | 
 | ||||||
|  | #if [ "$1" == '' ]  | ||||||
|  | #then | ||||||
|  | #    echo "Which Python?" | ||||||
|  | #    echo -n "Please enter a Python version, e.g. 2.4: " | ||||||
|  | #    read selection | ||||||
|  | #else | ||||||
|  | #    selection=$1 | ||||||
|  | #fi | ||||||
|  | 
 | ||||||
|  | echo "Currently only Python 2.4 is supported." | ||||||
|  | echo "Assume Python 2.4" | ||||||
|  | selection='2.4' | ||||||
|  | 
 | ||||||
|  | # todo: check existence of osr installation! | ||||||
|  | if [ $PLATFORM == 'aachen_windows' ] | ||||||
|  | then  | ||||||
|  |     echo "Python $selection is unavailable on Aachen Windows." | ||||||
|  | elif [ $PLATFORM == 'aachen_linux' ] | ||||||
|  | then  | ||||||
|  |     . ~/bin/addpath.sh /usr/localbin/python$selection/bin | ||||||
|  |     echo "Python $selection was successfully configured on on Aachen Linux." | ||||||
|  | elif [ $PLATFORM == 'burlington_linux' ] | ||||||
|  | then  | ||||||
|  |     echo "Python $selection is unavailable on Burlington Linux." | ||||||
|  | elif [ "$PLATFORM" == 'home_windows' ] | ||||||
|  | then | ||||||
|  |     echo "Python $selection is unavailable on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown system! Nothing was configured." | ||||||
|  | fi | ||||||
							
								
								
									
										27
									
								
								script_nuance/sge.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								script_nuance/sge.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | # test my new version. | ||||||
|  | 
 | ||||||
|  | source ~/bin/platform.csh | ||||||
|  | 
 | ||||||
|  | if ("$PLATFORM" == 'aachen_windows') then  | ||||||
|  |     echo "SGE is unavailable on Aachen Windows." | ||||||
|  | elif ("$PLATFORM" == 'my_laptop') then  | ||||||
|  |     echo "SGE is unavailable on my laptop." | ||||||
|  | else if ("$PLATFORM" == 'aachen_linux') then  | ||||||
|  |     if  ( $?SGE_ROOT == 0 ) then  | ||||||
|  | 	source /opt/sge6/default/common/settings.csh | ||||||
|  |     endif | ||||||
|  |     echo "SGE was successfully configured on Aachen Linux." | ||||||
|  | else if ("$PLATFORM" == 'burlington_linux') then  | ||||||
|  |     if ( $?SGE_ROOT == 0 ) then  | ||||||
|  | 	source /usr/local/SGE/default/common/settings.csh | ||||||
|  |     endif | ||||||
|  |     # tools for Grid management: | ||||||
|  |     source ~/bin/addpath.csh /res/tools/contrib/script | ||||||
|  |     echo "SGE and Grid tools was successfully configured on Burlington Linux." | ||||||
|  | else if ("$PLATFORM" == 'home_windows') then | ||||||
|  |     echo "SGE is unavailable on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown system! Nothing was configured." | ||||||
|  | endif | ||||||
							
								
								
									
										32
									
								
								script_nuance/sge.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								script_nuance/sge.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | . ~/bin/platform.sh | ||||||
|  | 
 | ||||||
|  | if [ "$PLATFORM" == 'aachen_windows' ] | ||||||
|  | then  | ||||||
|  |     echo "SGE is unavailable on Aachen Windows." | ||||||
|  | elif [ "$PLATFORM" == 'my_laptop' ] | ||||||
|  | then  | ||||||
|  |     echo "SGE is unavailable on my laptop." | ||||||
|  | elif [ "$PLATFORM" == 'aachen_linux' ] | ||||||
|  | then  | ||||||
|  |     if  [ -z "$SGE_ROOT" ]  | ||||||
|  |     then  | ||||||
|  | 	. /opt/sge6/default/common/settings.sh | ||||||
|  |     fi | ||||||
|  |     echo "SGE was successfully configured on Aachen Linux." | ||||||
|  | elif [ "$PLATFORM" == 'burlington_linux' ] | ||||||
|  | then  | ||||||
|  |     if [ -z "$SGE_ROOT" ] | ||||||
|  |     then  | ||||||
|  | 	. /usr/local/SGE/default/common/settings.sh | ||||||
|  |     fi | ||||||
|  |     # tools for Grid management: | ||||||
|  |     . ~/bin/addpath.sh /res/tools/contrib/script | ||||||
|  |     echo "SGE and Grid tools was successfully configured on Burlington Linux." | ||||||
|  | elif [ "$PLATFORM" == 'home_windows' ] | ||||||
|  | then | ||||||
|  |     echo "SGE is unavailable on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown system! Nothing was configured." | ||||||
|  | fi | ||||||
							
								
								
									
										50
									
								
								script_nuance/tools/align.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								script_nuance/tools/align.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,50 @@ | |||||||
|  | #!C:/Perl/bin/perl | ||||||
|  | 
 | ||||||
|  | if ($#ARGV==-1) { | ||||||
|  |     printf "Usage: align.pl binary_alignment_filename\n"; | ||||||
|  |     exit (0); | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | system ("align_info -labels %SWISRSDK%/config/en.sg/models/SpeechPearl.hmmlabels $ARGV[0] > $ARGV[0].txt"); | ||||||
|  | printf ("$ARGV[0] -> $ARGV[0].txt\n"); | ||||||
|  | 
 | ||||||
|  | open(BINARY_ALIGN, "$ARGV[0].txt") or die "Cannot open file $ARGV[0].txt"; | ||||||
|  | 
 | ||||||
|  | $count=1; | ||||||
|  | 
 | ||||||
|  | while(<BINARY_ALIGN>){ | ||||||
|  | 
 | ||||||
|  |     s/\s+$//; | ||||||
|  | 
 | ||||||
|  |     if(/^uttname: $1/){ | ||||||
|  | 	close FD; | ||||||
|  | 	$lola = sprintf("alignments_%d.txt", $count++);  | ||||||
|  | 	print "$' => $lola\n"; | ||||||
|  | 	open(FD, ">$lola") || die "cannot open $lola"; | ||||||
|  | 	printf FD "$'\n"; | ||||||
|  | 	printf FD "MillisecondsPerFrame: 10\nEND OF HEADER\n"; | ||||||
|  | 	printf FD "start end   phoneme                  score     -sscore score/msec\n"; | ||||||
|  | 	$total_score=0; | ||||||
|  |     } elsif (/^ortho: /){ | ||||||
|  | 	printf FD "$'\n"; | ||||||
|  |     } elsif(/^ label index (.*)/){ | ||||||
|  | 	$label=$1; | ||||||
|  |     } elsif (/^ model score (.*)/){ | ||||||
|  | 	$score=$1; | ||||||
|  | 	$total_score += $score; | ||||||
|  |     } elsif (/^ from time (.*)/){ | ||||||
|  | 	$from_time=$1; | ||||||
|  |     } elsif (/^ to time (.*)/){ | ||||||
|  | 	$to_time=$1; | ||||||
|  |     } elsif (/^ segment type (.*)/){ | ||||||
|  | 	if (0){ | ||||||
|  | 	    next if $from_time == $to_time; | ||||||
|  | 	    printf FD "%5.3f %5.3f %-20s %10.2f %10.2f %.2f\n", $from_time*100, $to_time*100, $label,$score, -$total_score, $score/($to_time -$from_time)/100; | ||||||
|  | 	} else { | ||||||
|  | 	    $dscore = ($to_time==$from_time) ? 0 : $score/($to_time -$from_time)/1000; | ||||||
|  | 	    printf FD "%5.3f %5.3f %-20s %10.2f %10.2f %.2f\n", $from_time, $to_time, $label,$score, -$total_score, $dscore; | ||||||
|  | 	} | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | exit 0; | ||||||
							
								
								
									
										22
									
								
								script_nuance/tools/check_existence_of_listed_files.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								script_nuance/tools/check_existence_of_listed_files.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,22 @@ | |||||||
|  | if ($ARGV[0] =~ m|^\s*$|) | ||||||
|  | { | ||||||
|  |     print "Check existence of listed sound files.\n"; | ||||||
|  |     print "Usage: perl $0 FILE_LIST\n"; | ||||||
|  |     print "Example: perl $0 corpus.list\n"; | ||||||
|  |     exit 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | open LIST, "$ARGV[0]" or die; | ||||||
|  | 
 | ||||||
|  | open REPORT, ">$ARGV[0].inexistent" or die; | ||||||
|  | 
 | ||||||
|  | while (<LIST>) | ||||||
|  | { | ||||||
|  |     if (m|\s*([^\s]+\.(ulaw\|wav))\s*|) | ||||||
|  |     { | ||||||
|  | 	if (not (-e $1)) | ||||||
|  | 	{ | ||||||
|  | 	    print REPORT "$1\n"; | ||||||
|  | 	} | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										21
									
								
								script_nuance/tools/convert_summary_for_excel.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								script_nuance/tools/convert_summary_for_excel.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | |||||||
|  | 
 | ||||||
|  | open(SUM, "$ARGV[0]"); | ||||||
|  | open(EXCEL, ">". "$ARGV[0].excel"); | ||||||
|  | 
 | ||||||
|  | if ($ARGV[0] eq '') | ||||||
|  | { | ||||||
|  |     print "Converting summary file $ARGV[0] to excel format.\n"; | ||||||
|  |     print "Usage: perl $0 SUMMARY_FILE\n"; | ||||||
|  |     exit; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | while(<SUM>) | ||||||
|  | { | ||||||
|  | 	chomp($_); | ||||||
|  | 	$_ =~ s/^ +//g; | ||||||
|  | 	$_ =~ s/ +$//g; | ||||||
|  | 	$_ =~ s/ +/ /g; | ||||||
|  | 	$_ =~ s/ /\t/g; | ||||||
|  | 	$_ =~ s/%//g; | ||||||
|  | 	print EXCEL $_."\n"; | ||||||
|  | } | ||||||
| @ -0,0 +1,62 @@ | |||||||
|  | $scriptfile = $ARGV[0]; | ||||||
|  | open (SCR, $scriptfile); | ||||||
|  | while(<SCR>) | ||||||
|  | { | ||||||
|  | 	chomp($_); | ||||||
|  | 	$_ =~ s/ +$//; | ||||||
|  | 	$startwriting = 0; | ||||||
|  | 	if(($_ =~ /^recognize/)&&($_ =~ /\.wav/)) | ||||||
|  | 	{ | ||||||
|  | 		@parts = split(/ /, $_); | ||||||
|  | 		$soundFile = $parts[1]; | ||||||
|  | 		open(WAV,$soundFile) || next; | ||||||
|  | # die "cannot open $soundFile: $1"; | ||||||
|  | #                open(WAV,$soundFile) || die; | ||||||
|  | 		binmode WAV; | ||||||
|  | 	 | ||||||
|  | 		# get first 4 Bytes | ||||||
|  | 		read WAV,$rawstring, 4; | ||||||
|  | 		$signature = unpack("a4",$rawstring); | ||||||
|  | 	 | ||||||
|  | 		if ($signature eq "NIST") | ||||||
|  | 		{ | ||||||
|  | 	    	print "$soundFile has a sphere header and is converted to ulaw!\n"; | ||||||
|  | 			$input = $soundFile; | ||||||
|  | 			$input_base = substr($input, 0 ,-4); | ||||||
|  | 			open (INPUT, $input); | ||||||
|  | 			binmode INPUT; | ||||||
|  | 			while ($line = <INPUT>) | ||||||
|  | 			{ | ||||||
|  | 				if($startwriting == 1) | ||||||
|  | 				{ | ||||||
|  | 					$line =~ s/^ +//; #remove rest of header (spaces) | ||||||
|  | 					$startwriting = 2; | ||||||
|  | 					$output = $input_base . ".". $ext; | ||||||
|  | 					open(OUTPUT, ">". $output) or die; | ||||||
|  | 					binmode OUTPUT; | ||||||
|  | 				} | ||||||
|  | 				elsif($startwriting == 2) | ||||||
|  | 				{ | ||||||
|  | 					print OUTPUT $line; | ||||||
|  | 				} | ||||||
|  | 				elsif($line =~ /end_head/) | ||||||
|  | 				{ | ||||||
|  | 					$startwriting = 1; #read lines until end_head statement is found. | ||||||
|  | 				} | ||||||
|  | 				else | ||||||
|  | 				{ | ||||||
|  | 					if($line =~ /s4 alaw/) | ||||||
|  | 					{ | ||||||
|  | 						$ext = "alaw"; | ||||||
|  | 						print $ext."\n";	 | ||||||
|  | 					} | ||||||
|  | 					elsif($line =~ /s4 ulaw/) | ||||||
|  | 					{ | ||||||
|  | 						$ext = "ulaw"; | ||||||
|  | 						print $ext."\n";	 | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										27
									
								
								script_nuance/tools/differ_accuracy.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								script_nuance/tools/differ_accuracy.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | if ("$1" == '') then | ||||||
|  |     echo "Please enter the first absolute path with file prefix:" | ||||||
|  |     set first=$< | ||||||
|  | else | ||||||
|  |     set first=$1 | ||||||
|  | endif | ||||||
|  | 
 | ||||||
|  | if ("$2" == '') then | ||||||
|  |     echo "Please enter the second absolute path with file prefix:" | ||||||
|  |     set second=$< | ||||||
|  | else | ||||||
|  |     set second=$2 | ||||||
|  | endif | ||||||
|  | 
 | ||||||
|  | if ("$3" == '') then | ||||||
|  |     echo "Please enter the absolute path with file prefix of diff results:" | ||||||
|  |     set diff=$< | ||||||
|  | else | ||||||
|  |     set diff=$3 | ||||||
|  | endif | ||||||
|  | 
 | ||||||
|  | perl /users/llu/scratch/OSR_accuracy/diff_osr_sum.pl $first.sum $second.sum >! $diff.sum | ||||||
|  | echo "$first.sum vs. $second.sum => $diff.sum" | ||||||
|  | perl /users/llu/scratch/OSR_accuracy/diff_osr_wer.pl $first.wer $second.wer >! $diff.wer | ||||||
|  | echo "$first.wer vs. $second.wer => $diff.wer" | ||||||
							
								
								
									
										31
									
								
								script_nuance/tools/favorites2html.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								script_nuance/tools/favorites2html.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,31 @@ | |||||||
|  | use File::Find; | ||||||
|  | use File::Copy; | ||||||
|  | 
 | ||||||
|  | @files = glob "$ARGV[0]/*"; | ||||||
|  | 
 | ||||||
|  | open XML, ">Favorites.html" or die; | ||||||
|  | #print XML "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<resource>\n"; | ||||||
|  | 
 | ||||||
|  | foreach $file (@files) | ||||||
|  | { | ||||||
|  |     if (-f $file) | ||||||
|  |     { | ||||||
|  | 	open URL, "$file" or die; | ||||||
|  | 	$url = ''; | ||||||
|  | 	while (<URL>) | ||||||
|  | 	{ | ||||||
|  | 	    if (m|URL=(.*)|) | ||||||
|  | 	    { | ||||||
|  | 		$url = $1; | ||||||
|  | 		last; | ||||||
|  | 	    } | ||||||
|  | 	} | ||||||
|  | 	$file =~ s|Favorites/||; | ||||||
|  | 	$file =~ s|\.url||; | ||||||
|  | 	$url =~ s|&|&|g; | ||||||
|  | 	print XML "<a href=\"$url\">$file</a><br>\n"; | ||||||
|  | 	close URL; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | #print XML "</resource>\n</xml>\n"; | ||||||
							
								
								
									
										25
									
								
								script_nuance/tools/gather_transcription_from_listfile.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								script_nuance/tools/gather_transcription_from_listfile.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | |||||||
|  | print "Usage: perl $0 transcription_file path_prefix output_file\n"; | ||||||
|  | print "Example: perl $0 /direct/datadigest/en_sg/ives/000.txt /direct/datadigest/en_sg/ives/calls/ ~/ives.list\n"; | ||||||
|  | 
 | ||||||
|  | open TRAN, $ARGV[0] or die "Cannot open transcription file $ARGV[0] for read.\n"; | ||||||
|  | open CORPUS, ">>$ARGV[2]" or die "Cannot open corpus file $ARGV[1] for write.\n"; | ||||||
|  | 
 | ||||||
|  | if ($ARGV[1] =~ m|/$|) # the parameter "path_prefix" is ended with / | ||||||
|  | { | ||||||
|  |     $prefix = $ARGV[1]; | ||||||
|  | }else | ||||||
|  | { | ||||||
|  |     $prefix = "$ARGV[1]/"; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | while (<TRAN>) | ||||||
|  | { | ||||||
|  |     chomp; | ||||||
|  |     m|([^ ]+)\s+(.*)|; | ||||||
|  |     if ($1 =~ m|\.info$|)  | ||||||
|  |     { | ||||||
|  | 	print CORPUS "new_speaker\n"; | ||||||
|  | 	next;  | ||||||
|  |     } | ||||||
|  |     print CORPUS "$prefix$1.ulaw\t$2\n"; | ||||||
|  | } | ||||||
							
								
								
									
										35
									
								
								script_nuance/tools/gather_transcription_from_wordsfile.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								script_nuance/tools/gather_transcription_from_wordsfile.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,35 @@ | |||||||
|  | print "Usage: perl $0 transcription_dir path_prefix output_file\n"; | ||||||
|  | print "Example: perl $0 /direct/datadigest/read_English_SG/gitm/transcription /direct/datadigest/read_English_SG/gitm/calls/ ~/gitm.list\n"; | ||||||
|  | 
 | ||||||
|  | use File::Find; | ||||||
|  | use File::Copy; | ||||||
|  | 
 | ||||||
|  | open CORPUS, ">$ARGV[2]" or die "Cannot open corpus file $ARGV[1] for write.\n"; | ||||||
|  | 
 | ||||||
|  | if ($ARGV[1] =~ m|/$|) # the parameter "path_prefix" is ended with / | ||||||
|  | { | ||||||
|  |     $prefix = $ARGV[1]; | ||||||
|  | }else | ||||||
|  | { | ||||||
|  |     $prefix = "$ARGV[1]/"; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | @dirs = ($ARGV[0]); | ||||||
|  | 
 | ||||||
|  | find ( {wanted => \&wanted}, | ||||||
|  |        @dirs ); | ||||||
|  | 
 | ||||||
|  | sub wanted | ||||||
|  | { | ||||||
|  |     if (m|^([a-zA-Z0-9_]+)_(utt\d+)\.words$|) | ||||||
|  |     { | ||||||
|  | 	$folder = $1; | ||||||
|  | 	$utt = $2; | ||||||
|  | 	$folder =~ m|^[A-Za-z]+(\d\d\d)|; | ||||||
|  | 	$group = $1; # usually it's 000, but not always. So $group need be extracted. | ||||||
|  | 	open WORDS, "$_" or die "Cannot open words file $_\n"; | ||||||
|  | 	$words = <WORDS>; | ||||||
|  | 	chomp ($words); | ||||||
|  | 	print CORPUS "$prefix$group/$folder/${folder}_${utt}.ulaw\t$words\n"; | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										2
									
								
								script_nuance/tools/lyre.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								script_nuance/tools/lyre.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | |||||||
|  | set TCLLIBPATH=C:/Programs/Lyre/tclpkg | ||||||
|  | C:/Programs/Lyre/bin/wish80.exe C:/Programs/Lyre/bin/lyre.tcl %1 %2 %3 %4 %5 | ||||||
							
								
								
									
										3
									
								
								script_nuance/tools/lyrepipe.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								script_nuance/tools/lyrepipe.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | set TCLLIBPATH=C:/Programs/Lyre/tclpkg | ||||||
|  | C:/Programs/Lyre/bin/wish80.exe C:/Programs/Lyre/bin/lyrepipe.tcl | ||||||
|  | 
 | ||||||
							
								
								
									
										3
									
								
								script_nuance/tools/lyretest.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								script_nuance/tools/lyretest.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | set TCLLIBPATH=C:/Programs/Lyre/tclpkg | ||||||
|  | 
 | ||||||
|  | C:/Programs/Lyre/bin/wish80.exe C:/Programs/Lyre/bin/lyre.tcl C:/Programs/Lyre/examples/126-20040812084228.ulaw --l C:/Programs/Lyre/examples/126-20040812084228.1 --l C:/Programs/Lyre/examples/126-20040812084228.0 | ||||||
							
								
								
									
										29
									
								
								script_nuance/tools/nacc_summary.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								script_nuance/tools/nacc_summary.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,29 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | echo "Usage: source nacc_summary.csh lg.co 1st_result_set [2nd_result_set]" | ||||||
|  | 
 | ||||||
|  | setenv OSRACCDIR /scratch/res/work/Quantum/llu/nacc | ||||||
|  | setenv CFG $OSRACCDIR/$1/cfg/BASELINE.cfg | ||||||
|  | 
 | ||||||
|  | perl $OSRACCDIR/script/summarize_proton.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $CFG -output $2/summary.proton proton $2 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl $2/summary.proton  | ||||||
|  | echo Generated $2/summary.proton | ||||||
|  | perl $OSRACCDIR/script/proton_wer.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $CFG -output $2/summary.wer proton $2 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl $2/summary.wer | ||||||
|  | echo Generated $2/summary.wer | ||||||
|  | 
 | ||||||
|  | # for variable $3, it doesn't work to use $?3 for test existence. | ||||||
|  | if ($3 != '') then | ||||||
|  |     perl $OSRACCDIR/script/summarize_proton.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $CFG -output $3/summary.proton proton $3 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl $3/summary.proton | ||||||
|  |     echo Generated $3/summary.proton | ||||||
|  |     perl $OSRACCDIR/script/proton_wer.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $CFG -output $3/summary.wer proton $3 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl $3/summary.wer | ||||||
|  |     echo Generated $3/summary.wer | ||||||
|  | 
 | ||||||
|  |     perl $OSRACCDIR/script/summarize_proton.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $CFG -output ./compare.summary.proton proton1 $2 proton2 $3 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl ./compare.summary.proton | ||||||
|  |     echo Generated ./compare.summary.proton | ||||||
|  |     perl $OSRACCDIR/script/proton_wer.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $CFG -output ./compare.summary.wer proton1 $2 proton2 $3 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl ./compare.summary.wer | ||||||
|  |     echo Generated ./compare.summary.wer | ||||||
|  | 
 | ||||||
|  |     perl $OSRACCDIR/script/diff_osr_sum.pl $2/summary.proton $3/summary.proton >! ./diff.summary; perl ~/bin/tools/convert_summary_for_excel.pl ./diff.summary | ||||||
|  |     echo "Generated ./diff.summary from $2 vs $3 /summary.proton" | ||||||
|  |     perl $OSRACCDIR/script/diff_osr_wer.pl $2/summary.wer $3/summary.wer >! ./diff.wer; perl ~/bin/tools/convert_summary_for_excel.pl ./diff.wer | ||||||
|  |     echo "Generated ./diff.wer from $2 vs $3 /summary.wer" | ||||||
|  | endif | ||||||
							
								
								
									
										29
									
								
								script_nuance/tools/nacc_summary.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								script_nuance/tools/nacc_summary.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,29 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | echo "Usage: source nacc_summary.csh 1st_result_set [2nd_result_set]" | ||||||
|  | 
 | ||||||
|  | export LLUNACCDIR=/scratch/res/work/Quantum/llu/nacc | ||||||
|  | export LLUCFG=/scratch/res/work/Quantum/llu/nacc/zh.tw/cfg/BASELINE.cfg | ||||||
|  | 
 | ||||||
|  | perl $LLUNACCDIR/script/summarize_proton.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $LLUCFG -output $1/summary.proton proton $1 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl $1/summary.proton | ||||||
|  | echo Generated $1/summary.proton | ||||||
|  | perl $LLUNACCDIR/script/proton_wer.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $LLUCFG -output $1/summary.wer proton $1 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl $1/summary.wer | ||||||
|  | echo Generated $1/summary.wer | ||||||
|  | 
 | ||||||
|  | if [ ! -z "$2" ] | ||||||
|  | then | ||||||
|  |     perl $LLUNACCDIR/script/summarize_proton.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $LLUCFG -output $2/summary.proton proton $2 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl $2/summary.proton | ||||||
|  |     echo Generated $2/summary.proton | ||||||
|  |     perl $LLUNACCDIR/script/proton_wer.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $LLUCFG -output $2/summary.wer proton $2 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl $2/summary.wer | ||||||
|  |     echo Generated $2/summary.wer | ||||||
|  | 
 | ||||||
|  |     perl $LLUNACCDIR/script/summarize_proton.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $LLUCFG -output ./compare.summary.proton proton1 $1 proton2 $2 > /dev/null; perl ~/bin/tools/convert_summary_for_excel.pl ./compare.summary.proton | ||||||
|  |     echo Generated ./compare.summary.proton | ||||||
|  |     perl $LLUNACCDIR/script/proton_wer.pl -printinvocab -normalizeCpu -runtest proton -useGroup proton -meanByTestset -config $LLUCFG -output ./compare.summary.wer proton1 $1 proton2 $2 >/dev/null; perl ~/bin/tools/convert_summary_for_excel.pl ./compare.summary.wer | ||||||
|  |     echo Generated ./compare.summary.wer | ||||||
|  | 
 | ||||||
|  |     perl $LLUNACCDIR/script/diff_osr_sum.pl $1/summary.proton $2/summary.proton >! ./diff.summary; perl ~/bin/tools/convert_summary_for_excel.pl ./diff.summary | ||||||
|  |     echo "Generated ./diff.summary from $1 vs $2 /summary.proton" | ||||||
|  |     perl $LLUNACCDIR/script/diff_osr_wer.pl $1/summary.wer $2/summary.wer >! ./diff.wer; perl ~/bin/tools/convert_summary_for_excel.pl ./diff.wer | ||||||
|  |     echo "Generated ./diff.wer from $1 vs $2 /summary.wer" | ||||||
|  | fi | ||||||
							
								
								
									
										84
									
								
								script_nuance/tools/rem-token.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										84
									
								
								script_nuance/tools/rem-token.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,84 @@ | |||||||
|  | ##################################################################################################################################### | ||||||
|  | # Script to remove DM-related tokens that cause log not to load into OSI due to max nested levels. | ||||||
|  | # The SWIdmst and SWIphnd tokens will be replaced with SWIprst to print the relevant information | ||||||
|  | ##################################################################################################################################### | ||||||
|  | 
 | ||||||
|  | #!/usr/bin/perl -w | ||||||
|  | use strict; | ||||||
|  | use Getopt::Long; | ||||||
|  | 
 | ||||||
|  | my ($help, $inputfile, $outputfile); | ||||||
|  | GetOptions ('-help' => \$help,  | ||||||
|  | 			 '-h' => \$help, | ||||||
|  | 			 '-input=s' => \$inputfile, | ||||||
|  | 			 '-output=s' => \$outputfile | ||||||
|  | 	    ); | ||||||
|  | 
 | ||||||
|  | if ($help) { | ||||||
|  | 	die("\nUsage: perl $0 [-help] -input <i/p file> -output <o/p file> \n"); } | ||||||
|  | if ($inputfile eq "" || $outputfile eq "" ) { | ||||||
|  | 	die("\nUsage: perl $0 [-help] -input <i/p file> -output <o/p file> \n"); } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | open( INPUT_FILE, "< $inputfile" )									#open input file for reading; | ||||||
|  | 		or die( "Cannot open input file \"$inputfile\" : $!" ); | ||||||
|  | open( OUTPUT_FILE, ">$outputfile" )									#open output file  for writing; | ||||||
|  | 		or die( "Cannot open output file \"$outputfile\" : $!"); | ||||||
|  | 
 | ||||||
|  | #my $type = "APNM"; | ||||||
|  | #my $channum = ""; | ||||||
|  | #my $orgchantext = "phone.-1.mps.-1.chan"; | ||||||
|  | 
 | ||||||
|  | 	while ( my $string = <INPUT_FILE> ) { | ||||||
|  | 		chomp($string); | ||||||
|  | #		my $outputstring = $string; | ||||||
|  | # Replace the Problematic SWIdmst and SWIdmnd with SWIprst to print the relevant information | ||||||
|  | 	if ( $string =~ m/SWIdmst/ || $string =~ m/SWIdmnd/  | ||||||
|  | 	|| $string =~ m/SWIphst/ || $string =~ m/SWIphnd/ | ||||||
|  | 	|| $string =~ m/SWIstst/ || $string =~ m/SWIstnd/) { | ||||||
|  | #	print ("$string\n" ); | ||||||
|  | 	# SWIdmst | ||||||
|  | 		if ( $string =~ m/SWIdmst/ ) { | ||||||
|  | 			$string =~ s/SWIdmst/SWIprst/; | ||||||
|  | 			$string =~ s/DMTP=/PRNM=<DMTP>/; | ||||||
|  | 			$string =~ s/DMNM=/PRTX=<DMNM>/;			 | ||||||
|  | 		print (OUTPUT_FILE "$string\n" ); | ||||||
|  | 		} | ||||||
|  | 	# SWIphnd - use this instead of SWIdmnd since it has HYPO of DTMF | ||||||
|  | 		if ( $string =~ m/SWIphnd/ ) { | ||||||
|  | 			$string =~ s/SWIphnd/SWIprst/; | ||||||
|  | 			$string =~ s/TSTT=/PRNM=<TSTT>/; | ||||||
|  | 			$string =~ s/MODE=/PRTX=<MODE=/; | ||||||
|  | 		my ($pre, $mid) = split( /\|UCPU/ , $string); | ||||||
|  | 	my ($pre1, $pre2) = split( /MODE/ , $pre); | ||||||
|  | 	$pre2 =~ s/\|/\!/g; | ||||||
|  | 	my $newstring = $pre1."MODE".$pre2.">|UCPU".$mid;		 | ||||||
|  | #		my $newstring = $pre.">|UCPU".$mid; | ||||||
|  | 
 | ||||||
|  | 		print (OUTPUT_FILE "$newstring\n" ); | ||||||
|  | 		}	 | ||||||
|  | 	# SWIdmnd | ||||||
|  | #		if ( $string =~ m/SWIdmnd/ ) { | ||||||
|  | #			$string =~ s/SWIdmnd/SWIprst/; | ||||||
|  | #			$string =~ s/TSTT=/PRNM=<TSTT>/; | ||||||
|  | #			$string =~ s/TRTT=/PRTX=<TRTT>/;			 | ||||||
|  | #		print (OUTPUT_FILE "$string\n" ); | ||||||
|  | #		}	 | ||||||
|  | 	}  | ||||||
|  | 	else { | ||||||
|  | 		print (OUTPUT_FILE "$string\n" ); | ||||||
|  | 	} | ||||||
|  | #endif  | ||||||
|  | 
 | ||||||
|  | 	} #end of WHILE; | ||||||
|  | 
 | ||||||
|  | #close the Input and Output files; | ||||||
|  | close( INPUT_FILE ) | ||||||
|  | 	or die( "Cannot close \"$inputfile\" : $!" ); | ||||||
|  | close( OUTPUT_FILE ) | ||||||
|  | 	or die( "Cannot close \"$outputfile\" : $!" ); | ||||||
|  | 
 | ||||||
|  | print "COMPLETE\n\n\n\n"; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | ##################################################################################################################################### | ||||||
							
								
								
									
										32
									
								
								script_nuance/tools/script2xml.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								script_nuance/tools/script2xml.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | |||||||
|  | open SCRIPT, "$ARGV[0]" or die; | ||||||
|  | open XML, ">$ARGV[0].xml" or die; | ||||||
|  | 
 | ||||||
|  | print XML <<xmlhead; | ||||||
|  | <?xml version="1.0" encoding='UTF-8'?> | ||||||
|  | <grammar xml:lang="de-DE" version="1.0" root="_ROOT" xmlns="http://www.w3.org/2001/06/grammar"> | ||||||
|  |   <rule id="_ROOT" scope="public"> | ||||||
|  |     <ruleref uri="#ITEMS"/> | ||||||
|  |     <tag>SWI_meaning = ITEMS.V;</tag> | ||||||
|  |   </rule> | ||||||
|  |   <rule id="ITEMS"> | ||||||
|  |     <one-of> | ||||||
|  | xmlhead | ||||||
|  | 
 | ||||||
|  | while (<SCRIPT>) | ||||||
|  | { | ||||||
|  |     if (m|^transcription\s+(.*)\s*$|) | ||||||
|  |     { | ||||||
|  | 	$items{$1} ++; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | foreach $item (keys %items) | ||||||
|  | { | ||||||
|  |     print XML "      <item>$item<tag>V=\"$item\"</tag></item>\n"; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | print XML <<xmltail; | ||||||
|  |     </one-of> | ||||||
|  |   </rule> | ||||||
|  | </grammar> | ||||||
|  | xmltail | ||||||
							
								
								
									
										6
									
								
								script_nuance/tools/speechdebug.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								script_nuance/tools/speechdebug.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | #!/cygdrive/c/perl/bin/perl | ||||||
|  | 
 | ||||||
|  | # lyrepipe hangs if started by .bat file or without "start" | ||||||
|  | system ("start lyrepipe.bat"); | ||||||
|  | 
 | ||||||
|  | system ("start C:/Programs/SpeechDebug/speechdebug.exe"); | ||||||
							
								
								
									
										25
									
								
								script_nuance/tools/split_utd_by_500.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								script_nuance/tools/split_utd_by_500.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | |||||||
|  | open UTD, "$ARGV[0]" or die; | ||||||
|  | 
 | ||||||
|  | $nr_utt = 0; | ||||||
|  | 
 | ||||||
|  | $nr_block = 0; | ||||||
|  | 
 | ||||||
|  | $head = ""; | ||||||
|  | 
 | ||||||
|  | while (<UTD>) | ||||||
|  | { | ||||||
|  |     if (not m|/datadigest/|) | ||||||
|  |     { | ||||||
|  | 	$head = $head."$_"; | ||||||
|  |     }else | ||||||
|  |     { | ||||||
|  | 	if ($nr_utt % 500 == 0) | ||||||
|  | 	{ | ||||||
|  | 	    $nr_block ++; | ||||||
|  | 	    open FH, ">$ARGV[0].$nr_block" or die; | ||||||
|  | 	    print FH $head; | ||||||
|  | 	} | ||||||
|  | 	print FH; | ||||||
|  | 	$nr_utt ++; | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										32
									
								
								script_nuance/tools/summarize_accuracy.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								script_nuance/tools/summarize_accuracy.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | # Example: ~/bin/tools/summaryize_accuracy.csh ~/OSR_accuracy/en.sg/results/20060418_osr309 ~/mysum309 | ||||||
|  | 
 | ||||||
|  | if ("$1" == '') then | ||||||
|  |     echo "Where is the evaluation results directory?" | ||||||
|  |     echo -n "Please enter an absolute directory: " | ||||||
|  |     set resdir=$< | ||||||
|  | else | ||||||
|  |     set resdir=$1 | ||||||
|  | endif  | ||||||
|  | 
 | ||||||
|  | # You can enter a path with file name prefix, | ||||||
|  | # or just enter and the $resdir will be used by default. | ||||||
|  | if ("$2" == '') then | ||||||
|  |     echo "Where to save summary files?" | ||||||
|  |     echo -n "Please enter a absolute path with summary file prefix: " | ||||||
|  |     set summary=$< | ||||||
|  |     if ("$summary" == '') then | ||||||
|  | 	set summary=$resdir/summary | ||||||
|  |     endif | ||||||
|  | else | ||||||
|  |     set summary=$2 | ||||||
|  | endif | ||||||
|  | 
 | ||||||
|  | # overall summary | ||||||
|  | cd /users/llu/scratch/OSR_accuracy/en.sg; perl ../summarize_proton.pl -normalizeCpu -printinvocab -useGroup proton -meanByWords -meanByTestset -geomMean test $resdir >! $summary.sum; echo Generated $summary.sum | ||||||
|  | 
 | ||||||
|  | # wer summary | ||||||
|  | cd /users/llu/scratch/OSR_accuracy/en.sg; perl ../proton_wer.pl -normalizeCpu -printinvocab -useGroup proton -meanByWords -geomMean test $resdir >! $summary.wer; echo Generated $summary.wer | ||||||
|  | 
 | ||||||
|  | perl ~/bin/tools/convert_summary_for_excel.pl $summary.sum; echo Generated $summary.sum.excel | ||||||
							
								
								
									
										27
									
								
								script_nuance/tools/traverse_dir_list_ulaw.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								script_nuance/tools/traverse_dir_list_ulaw.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | |||||||
|  | use File::Find; | ||||||
|  | use File::Copy; | ||||||
|  | 
 | ||||||
|  | if ($ARGV[0] =~ m|^\s*$|) | ||||||
|  | { | ||||||
|  |     print "Traverse a directory recursively and list ulaw files.\n"; | ||||||
|  |     print "Usage: perl $0 TOP_DIR\n"; | ||||||
|  |     print "Example: perl $0 /bin\n"; | ||||||
|  |     exit 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | @dirs = ($ARGV[0]); | ||||||
|  | 
 | ||||||
|  | open LIST, ">$ARGV[0].ulawlist" or die; | ||||||
|  | 
 | ||||||
|  | find ( {wanted => \&wanted}, | ||||||
|  |        @dirs ); | ||||||
|  | 
 | ||||||
|  | sub wanted | ||||||
|  | { | ||||||
|  |     if (m|^ulaw$|) | ||||||
|  |     { | ||||||
|  | 	$file = $_; | ||||||
|  | 	# do something here. | ||||||
|  | 	print LIST "$file\n"; | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										39
									
								
								script_nuance/tools/traverse_dir_make_eventlog.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								script_nuance/tools/traverse_dir_make_eventlog.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,39 @@ | |||||||
|  | use File::Find; | ||||||
|  | use File::Copy; | ||||||
|  | 
 | ||||||
|  | if ($ARGV[0] =~ m|^\s*$|) | ||||||
|  | { | ||||||
|  |     print "Template to traverse a directory recursively.\n"; | ||||||
|  |     print "Usage: perl $0 TOP_DIR\n"; | ||||||
|  |     print "Example: perl $0 /bin\n"; | ||||||
|  |     exit 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | @dirs = ($ARGV[0]); | ||||||
|  | 
 | ||||||
|  | open LOG, ">$ARGV[0]/SWIevent.log" or die; | ||||||
|  | 
 | ||||||
|  | $time='20060101000000000'; | ||||||
|  | $defaultdm='Digits'; | ||||||
|  | $grammar='digits.xml'; | ||||||
|  | $language='en-GB'; | ||||||
|  | $meaning='0'; | ||||||
|  | $ortho=''; | ||||||
|  | 
 | ||||||
|  | find ( {wanted => \&wanted}, | ||||||
|  |        @dirs ); | ||||||
|  | 
 | ||||||
|  | sub wanted | ||||||
|  | { | ||||||
|  |     if (/\.(ulaw|wav)$/) | ||||||
|  |     { | ||||||
|  | 	$file = $_; | ||||||
|  | 	print LOG "TIME=$time|CHAN=0|EVNT=SWIclst|UCPU=0|SCPU=0\n"; | ||||||
|  | 	print LOG "TIME=$time|CHAN=0|EVNT=SWIdmst|DMTP=CUST|DMNM=$defaultdm|UCPU=0|SCPU=0\n"; | ||||||
|  | 	print LOG "TIME=$time|CHAN=0|EVNT=SWIrcst|GURI0=$grammar|GRNM=$grammar|LANG=$language|GRMT=application/srgs+xml|UCPU=0|SCPU=0\n"; | ||||||
|  | 	print LOG "TIME=$time|CHAN=0|EVNT=SWIrcnd|RSTT=ok|RSLT=$meaning|RAWT=$ortho|SPOK=$ortho|GRMR=GURI0|CONF=999|WVNM=$file|UCPU=0|SCPU=0\n"; | ||||||
|  | 	print LOG "TIME=$time|CHAN=0|EVNT=SWIdmnd|TSTT=Success|UCPU=0|SCPU=0\n"; | ||||||
|  | 	print LOG "TIME=$time|CHAN=0|EVNT=SWIclnd|UCPU=0|SCPU=0\n"; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
							
								
								
									
										25
									
								
								script_nuance/tools/traverse_dir_template.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								script_nuance/tools/traverse_dir_template.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | |||||||
|  | use File::Find; | ||||||
|  | use File::Copy; | ||||||
|  | 
 | ||||||
|  | if ($ARGV[0] =~ m|^\s*$|) | ||||||
|  | { | ||||||
|  |     print "Template to traverse a directory recursively.\n"; | ||||||
|  |     print "Usage: perl $0 TOP_DIR\n"; | ||||||
|  |     print "Example: perl $0 /bin\n"; | ||||||
|  |     exit 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | @dirs = ($ARGV[0]); | ||||||
|  | 
 | ||||||
|  | find ( {wanted => \&wanted}, | ||||||
|  |        @dirs ); | ||||||
|  | 
 | ||||||
|  | sub wanted | ||||||
|  | { | ||||||
|  |     if (m|^ulaw$|)  # check the current file name, if it contains ulaw then dome something on it. | ||||||
|  |     { | ||||||
|  | 	$file = $_; | ||||||
|  | 	# do something here. | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
							
								
								
									
										62
									
								
								script_nuance/tools/warez_extracter.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								script_nuance/tools/warez_extracter.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,62 @@ | |||||||
|  | # bug 1. final results as *.zip files are deleted by wrong | ||||||
|  | # bug 2. folders containing space cannot be correctly parsed. | ||||||
|  | 
 | ||||||
|  | use File::Find; | ||||||
|  | use File::Copy; | ||||||
|  | use Cwd; | ||||||
|  | 
 | ||||||
|  | if ($ARGV[0] =~ m|^\s*$|) | ||||||
|  | { | ||||||
|  |     print "Extract warez directories recursively.\n"; | ||||||
|  |     print "Usage: perl $0 TOP_DIR\n"; | ||||||
|  |     print "Example: perl $0 /temp/my0day\n"; | ||||||
|  |     exit 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | @dirs = ($ARGV[0]); | ||||||
|  | 
 | ||||||
|  | find ( {wanted => \&wanted}, | ||||||
|  |        @dirs ); | ||||||
|  | 
 | ||||||
|  | sub wanted | ||||||
|  | { | ||||||
|  |     if (-d $_) | ||||||
|  |     { | ||||||
|  | 	# We are in the containing folder of $_ | ||||||
|  | 	$folder = $_; | ||||||
|  | 	$folder =~ s| |_|g; # folders containing space in names cannot be extracted. | ||||||
|  | 	rename $_, $folder; | ||||||
|  | 
 | ||||||
|  | 	@zipfiles = glob "$folder/*.zip"; | ||||||
|  | 	foreach $zipfile (@zipfiles) | ||||||
|  | 	{ | ||||||
|  | 	    print "$zipfile\n"; | ||||||
|  | 	    system "unzip -n $zipfile -d $folder"; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	@rarfiles = glob "$folder/*.rar"; | ||||||
|  | 	if (scalar @rarfiles > 0) | ||||||
|  | 	{ | ||||||
|  | 	    $rarfile = $rarfiles[0]; # Only the first rar (which is the sole *.rar or *.part1.rar) is to be extracted.  | ||||||
|  | 	    print "$rarfile\n"; | ||||||
|  | 	    system "\"s:/Program Files/WinRAR/RAR.exe\" x -o- $rarfile $folder > $folder/unrar.info"; | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	############################# | ||||||
|  | 	##### WARNING ############### | ||||||
|  | 	# sometime a file extracted from *.rar is another *.zip! In this case it will be deleted by wrong! | ||||||
|  | 	open INFO, "$folder/unrar.info" or next; | ||||||
|  | 	while (<INFO>) | ||||||
|  | 	{ | ||||||
|  | 	    if (m|All OK|) | ||||||
|  | 	    { | ||||||
|  | 		unlink glob "$folder/*.zip"; | ||||||
|  | 		unlink glob "$folder/*.r??"; | ||||||
|  | 		unlink glob "$folder/*.DIZ"; | ||||||
|  | 		unlink glob "$folder/*.diz"; | ||||||
|  | 		unlink glob "$folder/unrar.info"; | ||||||
|  | 	    } | ||||||
|  | 	} | ||||||
|  | 	close INFO; | ||||||
|  |    } | ||||||
|  | } | ||||||
							
								
								
									
										15
									
								
								script_nuance/tools/warez_extracter.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								script_nuance/tools/warez_extracter.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | |||||||
|  | #!/bin/bash  | ||||||
|  | 
 | ||||||
|  | # Usage: this_script target_dir | ||||||
|  | 
 | ||||||
|  | for zipfile in $1/*.zip; do | ||||||
|  | unzip -n $zipfile -d $1; | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | for rarfile in $1/*.rar; do | ||||||
|  | /cygdrive/s/Program\ Files/WinRAR/RAR.exe x -o- $rarfile $1; | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | rm -f *.DIZ | ||||||
|  | rm -f *.diz | ||||||
|  | 
 | ||||||
							
								
								
									
										34
									
								
								script_nuance/tools/warez_rename.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								script_nuance/tools/warez_rename.pl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,34 @@ | |||||||
|  | # bug 1. final results as *.zip files are deleted by wrong | ||||||
|  | # bug 2. folders containing space cannot be correctly parsed. | ||||||
|  | 
 | ||||||
|  | use File::Find; | ||||||
|  | use File::Copy; | ||||||
|  | use Cwd; | ||||||
|  | 
 | ||||||
|  | if ($ARGV[0] =~ m|^\s*$|) | ||||||
|  | { | ||||||
|  |     print "Rename warez directories.\n"; | ||||||
|  |     print "Usage: perl $0 TOP_DIR\n"; | ||||||
|  |     print "Example: perl $0 /temp/my0day\n"; | ||||||
|  |     exit 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | @dirs = glob "$ARGV[0]/*"; | ||||||
|  | 
 | ||||||
|  | foreach $dir (@dirs) | ||||||
|  | { | ||||||
|  |     $org = $dir; | ||||||
|  |     $dir =~ s|\.| |g; | ||||||
|  |     $dir =~ s|_| |g; | ||||||
|  |     $dir =~ s|/||g; | ||||||
|  |     $dir =~ s|Wiley (Interscience)?||g; | ||||||
|  |     $dir =~ s|Wiley (IEEE Press)?||g; | ||||||
|  |     $dir =~ s|eBook-.*$||g; | ||||||
|  |     $dir =~ s|ebook-.*$||g; | ||||||
|  |     $dir =~ s|(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec) 200\d||g; | ||||||
|  |     $dir =~ s|^\s+||; | ||||||
|  |     $dir =~ s|\s+$||; | ||||||
|  |     print "$dir\n"; | ||||||
|  |     rename $org, "p{Wiley} t{$dir}"; | ||||||
|  | } | ||||||
|  | 
 | ||||||
							
								
								
									
										2
									
								
								script_nuance/tools/wedit.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								script_nuance/tools/wedit.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | |||||||
|  | set TCLLIBPATH=C:/Programs/Lyre/tclpkg | ||||||
|  | C:/Programs/Lyre/bin/wish80.exe C:/Programs/Lyre/bin/wedit.tcl %1 %2 %3 %4 %5 | ||||||
							
								
								
									
										46
									
								
								script_nuance/tracy.csh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								script_nuance/tracy.csh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,46 @@ | |||||||
|  | #!/bin/csh | ||||||
|  | 
 | ||||||
|  | source ~/bin/platform.csh | ||||||
|  | 
 | ||||||
|  | if ("$1" == '') then | ||||||
|  |     echo "Which TRACY?" | ||||||
|  |     echo -n "Please enter a TRACY version, e.g. 10/880 or 11/204: " | ||||||
|  |     set selection=$< | ||||||
|  | else | ||||||
|  |     set selection=$1 | ||||||
|  | endif  | ||||||
|  | 
 | ||||||
|  | # todo: check existence of osr installation! | ||||||
|  | if ("$PLATFORM" == 'aachen_windows') then  | ||||||
|  |     echo "Tracy $selection is unavailable on Aachen Windows." | ||||||
|  | else if ("$PLATFORM" == 'aachen_linux') then | ||||||
|  |     echo "In Aachen Linux only tracy 10/880 is supported." | ||||||
|  |     setenv TRACYDIR /u_grid/ac-green/llu/tracy/tracy10_880 | ||||||
|  |     if ( "" == "" ) then | ||||||
|  | 	set compdir="ilgi" | ||||||
|  |     else | ||||||
|  | 	set compdir="" | ||||||
|  |     endif | ||||||
|  |     source ~/bin/addpath.csh /usr/localbin/python2.4/bin:$TRACYDIR/bin/:$TRACYDIR/scripts:$TRACYDIR/scripts/build:$TRACYDIR/scripts/tools/osr | ||||||
|  |     if ( $?PYTHONPATH ) then | ||||||
|  | 	setenv PYTHONPATH $TRACYDIR/lib/python:$TRACYDIR/lib/${compdir}:${PYTHONPATH} | ||||||
|  |     else | ||||||
|  | 	setenv PYTHONPATH $TRACYDIR/lib/python:$TRACYDIR/lib/${compdir} | ||||||
|  |     endif | ||||||
|  | 	     | ||||||
|  |     if ( $?LD_LIBRARY_PATH ) then | ||||||
|  | 	setenv LD_LIBRARY_PATH $TRACYDIR/lib/${compdir}:${LD_LIBRARY_PATH} | ||||||
|  |     else | ||||||
|  | 	setenv LD_LIBRARY_PATH $TRACYDIR/lib/${compdir} | ||||||
|  |     endif | ||||||
|  | 
 | ||||||
|  |     setenv PERL5LIB $TRACYDIR/lib/perl | ||||||
|  |     echo "Tracy 10/880 was successfully configured on Aachen Linux." | ||||||
|  | else if ("$PLATFORM" == 'burlington_linux') then | ||||||
|  |     source /res/tools/tracy/release/tracy$selection/setenv.csh  | ||||||
|  |     echo "Tracy $selection was successfully configured on Burlington Linux." | ||||||
|  | else if ("$PLATFORM" == 'home_windows') then | ||||||
|  |     echo "Tracy $selection is unavaible on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown System! Nothing was configured." | ||||||
|  | endif | ||||||
							
								
								
									
										57
									
								
								script_nuance/tracy.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								script_nuance/tracy.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,57 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | . ~/bin/platform.sh | ||||||
|  | 
 | ||||||
|  | #if [ "$1" == '' ] then | ||||||
|  | #    echo "Which TRACY?" | ||||||
|  | #    echo -n "Please enter a TRACY version, e.g. 880: " | ||||||
|  | #    read selection | ||||||
|  | #else | ||||||
|  | #    selection=$1 | ||||||
|  | #fi | ||||||
|  | 
 | ||||||
|  | echo "Currently only TRACY 880 is supported." | ||||||
|  | echo "Assume TRACY 880" | ||||||
|  | selection='880' | ||||||
|  | 
 | ||||||
|  | # todo: check existence of osr installation! | ||||||
|  | if [ "$PLATFORM" == 'aachen_windows' ]  | ||||||
|  | then  | ||||||
|  |     echo "Tracy $selection is unavailable on Aachen Windows." | ||||||
|  | elif [ "$PLATFORM" == 'aachen_linux' ]  | ||||||
|  | then | ||||||
|  |     echo "In Aachen Linux only tracy 10/880 is supported:" | ||||||
|  |     export TRACYDIR=/u_grid/ac-green/llu/tracy/tracy10_880 | ||||||
|  |     if [ "" == "" ]  | ||||||
|  |     then | ||||||
|  | 	compdir="ilgi" | ||||||
|  |     else | ||||||
|  | 	compdir="" | ||||||
|  |     fi | ||||||
|  |     . ~/bin/addpath.sh /usr/localbin/python2.4/bin:$TRACYDIR/bin/:$TRACYDIR/scripts:$TRACYDIR/scripts/build:$TRACYDIR/scripts/tools/osr | ||||||
|  |     if [ -z PYTHONPATH ]  | ||||||
|  |     then | ||||||
|  | 	export PYTHONPATH=$TRACYDIR/lib/python:$TRACYDIR/lib/${compdir}:${PYTHONPATH} | ||||||
|  |     else | ||||||
|  | 	export PYTHONPATH=$TRACYDIR/lib/python:$TRACYDIR/lib/${compdir} | ||||||
|  |     fi | ||||||
|  | 	     | ||||||
|  |     if [ $?LD_LIBRARY_PATH ]  | ||||||
|  |     then | ||||||
|  | 	export LD_LIBRARY_PATH=$TRACYDIR/lib/${compdir}:${LD_LIBRARY_PATH} | ||||||
|  |     else | ||||||
|  | 	export LD_LIBRARY_PATH=$TRACYDIR/lib/${compdir} | ||||||
|  |     fi | ||||||
|  | 		 | ||||||
|  |     export PERL5LIB=$TRACYDIR/lib/perl | ||||||
|  |     echo "Tracy 10/880 was successfully configured on Aachen Linux." | ||||||
|  | elif [ "$PLATFORM" == 'burlington_linux' ]  | ||||||
|  | then | ||||||
|  |     . /res/tools/tracy/release/tracy$selection/setenv.sh  | ||||||
|  |     echo "Tracy $selection was successfully configured on Burlington Linux." | ||||||
|  | elif [ "$PLATFORM" == 'home_windows' ]  | ||||||
|  | then | ||||||
|  |     echo "Tracy $selection is unavaible on Home Windows." | ||||||
|  | else | ||||||
|  |     echo "Unknown System! Nothing was configured." | ||||||
|  | fi | ||||||
							
								
								
									
										
											BIN
										
									
								
								script_nuance/xterm.black.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								script_nuance/xterm.black.ico
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 2.2 KiB | 
							
								
								
									
										
											BIN
										
									
								
								script_nuance/xterm.black.lnk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								script_nuance/xterm.black.lnk
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								script_nuance/xterm.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								script_nuance/xterm.ico
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 2.2 KiB | 
							
								
								
									
										
											BIN
										
									
								
								script_nuance/xterm.lnk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								script_nuance/xterm.lnk
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user