#!/bin/bash
#
# Fabrique les patterns unitex pour la reconnaissance
#
#
export UNITEX=/home/yan/usr/local/Unitex
export PATH=${UNITEX}/App:${PATH}
export YANTEX=/home/yan/unitex
export YANTEXFR=${YANTEX}/French
alphabet=${YANTEXFR}/Alphabet.txt
#
#
# Syntaxe : string2patt '<DET>' file
#
# Crée le fichier file contenant le graphe de la regexp
# Note : Bien mettre la regexp entre quote.
#
function string2patt () {
pattern=$1
file=$2
echo "$pattern" > pattwrk.txt
Convert LATIN -ps=TMP pattwrk.txt
\mv pattwrk.txt $file
\rm -f TMPpattwrk.txt
}
mkdir -p `pwd`/../unitex/patterns/
string2patt
'<barrage.N>'
`pwd`/../unitex/patterns/barrage-hydraulique.txt
string2patt '<match.N><DET><barrage>'
`pwd`/../unitex/patterns/barrage-sport.txt
string2patt '<tir.N><DET><barrage>'
`pwd`/../unitex/patterns/tir-de-barrage.txt
string2patt
'<faire.V>barrage'
`pwd`/../unitex/patterns/faire-barrage.txt
exit