Skip to content
Snippets Groups Projects
Commit 02ba6756 authored by Benoit Favre's avatar Benoit Favre
Browse files

fix jump without text

parent 8ba27038
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
......@@ -2,12 +2,6 @@
prefix=$1
dir=`dirname $0`/../../../
export LD_LIBRARY_PATH=$dir/libs:$dir/libs/fst:$dir/libs/atlas:$PWD/src
export PATH=$dir/bin:$PATH
set -e -u -o pipefail
WORDSYMB_I="--isymbols=""$prefix""_dico_word.txt"
WORDSYMB_O="--osymbols=""$prefix""_dico_word.txt"
......@@ -15,8 +9,10 @@ WORDSYMB_O="--osymbols=""$prefix""_dico_word.txt"
fstcompile $WORDSYMB_I $WORDSYMB_O "$prefix""_clean_tail.txt" > "$prefix""_clean_tail.fst"
# compile glouton
fstcompile $WORDSYMB_I "$prefix""_glouton.txt" > "$prefix""_glouton.fst"
# compile section 0
cat "$prefix""_section0.txt" | fstcompile $WORDSYMB_I | fstunion - "$prefix""_glouton.fst" | fstclosure > "$prefix""_section0.fst"
# compilte exit and change section
cat "$prefix""_section0.txt" | fstcompile $WORDSYMB_I > "$prefix""_section0.basic.fst"
nbsect=1
while [ "$nbsect" != 80 ]
......@@ -24,19 +20,23 @@ do
if [ -e "$prefix""_section""$nbsect"".txt" ]
then
rm -f "$prefix""_section""$nbsect".fst
if [ `cat "$prefix""_section""$nbsect""_exit.txt"| wc -l` == 0 ]
then
echo "Error: no $prefix""_section""$nbsect""_exit.txt file"
exit
fi
cat "$prefix""_section""$nbsect""_exit.txt" | fstcompile $WORDSYMB_I > "$prefix""_section""$nbsect"".exit.fst"
fstunion "$prefix""_section""$nbsect"".exit.fst" "$prefix""_section0.basic.fst" > "$prefix""_section""$nbsect"".exit.basic.fst"
if [ `cat "$prefix""_section""$nbsect"".txt" | wc -l` != 0 ]
then
cat "$prefix""_section""$nbsect"".txt" | fstcompile $WORDSYMB_I > "$prefix""_section""$nbsect"".fst"
cat "$prefix""_section0.txt" | fstcompile $WORDSYMB_I > "$prefix""_section""$nbsect"".fst.tmp"
cat "$prefix""_section""$nbsect""_exit.txt" | fstcompile $WORDSYMB_I > "$prefix""_section""$nbsect"".fst.tmp"2
fstunion "$prefix""_section""$nbsect"".fst.tmp" "$prefix""_section""$nbsect"".fst.tmp2" > "$prefix""_section""$nbsect"".fst.tmp4"
fstconcat "$prefix""_section""$nbsect"".fst" "$prefix""_section""$nbsect"".fst.tmp4" > "$prefix""_section""$nbsect"".fst.tmp6"
mv "$prefix""_section""$nbsect"".fst.tmp6" "$prefix""_section""$nbsect"".fst"
rm -f "$prefix""_section""$nbsect"".fst.tmp" "$prefix""_section""$nbsect"".fst.tmp2" "$prefix""_section""$nbsect"".fst.tmp4"
cat "$prefix""_section""$nbsect"".txt" | fstcompile $WORDSYMB_I > "$prefix""_section""$nbsect"".fst2"
fstconcat "$prefix""_section""$nbsect"".fst2" "$prefix""_section""$nbsect"".exit.basic.fst" > "$prefix""_section""$nbsect"".fst4"
fstunion "$prefix""_section""$nbsect"".fst4" "$prefix""_section""$nbsect"".exit.basic.fst" > "$prefix""_section""$nbsect"".fst"
else
cp "$prefix""_section""$nbsect"".exit.basic.fst" "$prefix""_section""$nbsect"".fst"
fi
rm -f "$prefix""_section""$nbsect"".exit.fst" -f "$prefix""_section""$nbsect"".exit.basic.fst" -f "$prefix""_section""$nbsect"".fst2" -f "$prefix""_section""$nbsect"".fst4"
fi
nbsect=$(($nbsect+1))
done
......@@ -57,7 +57,7 @@ class ScriptedASR(Gtk.Window):
# slu
self.fake_asr = Gtk.Entry()
self.fake_asr.connect('key-press-event', self.simulate_asr)
vbox.pack_start(self.fake_asr, False, True, 5)
#vbox.pack_start(self.fake_asr, False, True, 5)
slu_prefix = config_dict['slu_prefix']
slu_actions = config_dict['slu_actions']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment