You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cjvt-srl-tagging/tools/srl-20131216/tag_all.gigafida.sh

30 lines
633 B

#!/bin/bash
# parsing tools.cfg values
IN_FOLDER="$(sed -n -e 's/^\s*giga_tsv\s*=\s*//p' ../tools.cfg)"
echo "input folder: $IN_FOLDER"
OUT_FOLDER="$(sed -n -e 's/^\s*giga_srl\s*=\s*//p' ../tools.cfg)"
echo "output folder: $OUT_FOLDER"
SUFFIX="srl.tsv"
mkdir -p "$OUT_FOLDER"
rm "$OUT_FOLDER/*${SUFFIX}" &> /dev/null
for infile in "$IN_FOLDER/*"; do
echo "Tagging: ${infile}"
base=$(basename $infile | cut -d'.' -f1)
outfile="${OUT_FOLDER}/${base}.${SUFFIX}"
# mate-tools tagger
./scripts/parse_srl_only_mod.sh "$infile" "$outfile"
if [ $? -eq 0 ]; then
echo "Saved as ${outfile}"
else
echo "ERR"
exit 1
fi
done