#!/bin/bash
#
# Une petite table pour visualiser les correspondances
# trouvées avec Unitex.
#
root=$(dirname $(dirname $0))/pages
templatehref='<a href="__1">__2</a>'
echo '<html><head></head><body><table
style="text-align: left; width: 100%;"
border="1" cellpadding="2"
cellspacing="2"><tbody><tr><th style="text-align:
center;" colspan="5" rowspan="1">Unitex</th></tr>'
for moteur in $(\ls -1 $root); do
echo '<td>'$moteur'</td>'
for motcle in $(\ls -1 ${root}/${moteur}); do
concord=$root/$moteur/$motcle/corpus_snt/concord.html
if [ -e $concord ]; then
url=$concord
txt=$motcle
else
url=""
txt="??"
fi
echo '<td>'$(echo $templatehref |sed -e
"s!__1!$url!g" -e "s!__2!$txt!g" )'</td>'
done
echo '</tr>'
done
echo '</table></body></html>'
exit