Newer
Older
dir=`dirname $0`/../../../
export LD_LIBRARY_PATH=$dir/libs:$dir/libs/fst:$dir/libs/atlas:$PWD/src
export PATH=$dir/bin:$PATH
WORDSYMB_I="--isymbols=""$prefix""_dico_word.txt"
WORDSYMB_O="--osymbols=""$prefix""_dico_word.txt"
# compile tail
fstcompile $WORDSYMB_I $WORDSYMB_O "$prefix""_clean_tail.txt" > "$prefix""_clean_tail.fst"
# compile glouton
fstcompile $WORDSYMB_I "$prefix""_glouton.txt" > "$prefix""_glouton.fst"
cat "$prefix""_section0.txt" | fstcompile $WORDSYMB_I | fstunion - "$prefix""_glouton.fst" | fstclosure > "$prefix""_section0.fst"
nbsect=1
while [ "$nbsect" != 80 ]
do
if [ -e "$prefix""_section""$nbsect"".txt" ]
then
rm -f "$prefix""_section""$nbsect".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"