⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rescore-acoustic

📁 这是一款很好用的工具包
💻
字号:
#!/bin/sh## rescore-acoustic --#       Replace acoustic Nbest scores with a weighted combination of#       old and new acoustic scores## $Header: /home/srilm/devel/utils/src/RCS/rescore-acoustic,v 1.6 2003/01/11 01:25:44 stolcke Exp $#if [ $# -lt 5 ]; then        echo "usage: $0 old-nbest-dir old-ac-weight new-score-dir1 new-ac-weight1 new-score-dir2 new-ac-weight2 ... new-nbest-dir [max-nbest]" >&2        echo "    or $0 old-file-list old-ac-weight new-score-dir1 new-ac-weight1 new-score-dir2 new-ac-weight2 ... new-nbest-dir [max-nbest]" >&2        exit 1fiold_nbest=${1}old_acw=${2}shift; shiftnew_scores=new_acw=while [ $# -ge 3 ]do	new_scores="$new_scores $1"	new_acw="$new_acw $2"	shift; shiftdonenew_nbest=${1}max_nbest=${2-0}set -ejoin1=/tmp/join1_$$join2=/tmp/join2_$$trap "rm -f $join1 $join2" 0 1 2 15echo "generating sentids ..." >&2if [ -d $old_nbest ]; then	find $old_nbest/. -follow -type f -printelse	cat $old_nbest fi | \sed -e 's,.*,& &,' -e 's,[^ ]*/,,' -e 's,\.gz , ,' -e 's,\.score , ,' | \sort +0 -1 > $join1echo "`wc -l < $join1` utterances" >&2for d in $new_scoresdo	echo "joining $d ..." >&2	find $d/. -follow -type f -print | \	sed -e 's,.*,& &,' -e 's,[^ ]*/,,' -e 's,\.gz , ,' |\	sort +0 -1 | \	/usr/local/gnu/bin/join $join1 - > $join2	mv $join2 $join1doneecho "`wc -l < $join1` utterances after joining" >&2mkdir -p $new_nbestcat $join1 | \while read sentid scorefilesdo	echo $sentid >&2	combine-acoustic-scores -v "weights=$old_acw $new_acw" \		-v max_nbest=$max_nbest $scorefiles | \		gzip > $new_nbest/$sentid.score.gz done

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -