1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#!/bin/sh
TOOLDIR=../../tools/src
TOOL=
if [ "$1" = '--python' ]; then
TOOL="python3 ./hfst-reweight.py"
else
TOOL=$TOOLDIR/hfst-reweight
if ! test -x $TOOL; then
exit 0;
fi
fi
for i in "" .sfst .ofst .foma; do
if test -f heavycat$i ; then
if ! $TOOL -a 1 heavycat$i > test ; then
exit 1
fi
if ! $TOOL -b 3.141 heavycat$i > test ; then
exit 1
fi
if ! $TOOL -a 10 -b 0.001 heavycat$i > test ; then
exit 1
fi
if ! $TOOL -F cos heavycat$i > test ; then
exit 1
fi
if ! $TOOL -a 11 -b 0.5 -F sin heavycat$i > test ; then
exit 1
fi
if ! $TOOL -l 1000 -a 1 heavycat$i > test ; then
exit 1
fi
if ! $TOOL -u 100000 -a 1 heavycat$i > test ; then
exit 1
fi
if ! $TOOL -l 1000 -u 100000 -a 1 heavycat$i > test ; then
exit 1
fi
if ! $TOOL -S c -a 1 heavycat$i > test ; then
exit 1
fi
if ! $TOOL -I c -a 1 heavycat$i > test ; then
exit 1
fi
if ! $TOOL -O c -a 1 heavycat$i > test ; then
exit 1
fi
if ! $TOOL -I c -O c -a 1 heavycat$i > test ; then
exit 1
fi
fi
done
|