相关代码 |
|
#!/usr/local/bin/gawk -f # # bytelog-to-log10 -- # convert bytelog scores to log-base-10 # # $Header: /home/srilm/devel/utils/src/RCS/bytelog-to-log10.gawk,v 1.1 1997/04/22 20:20:41 stolcke Exp stolcke $ # BEGIN { logscale = 2.30258509299404568402 * 10000.5 / 1024.0; scale = 1; } { for (i = 1; i if ($i ~ /^[-+]+[0-9][0-9]*$/) { $i = $i / scale / logscale; } } print; }
相关资源 |
|