#!/bin/bash #SBATCH --job-name=epe #SBATCH --account=nn9106k #SBATCH --time=1:00:00 #SBATCH --mail-type=FAIL #SBATCH --nodes=1 #SBATCH --ntasks-per-node=8 #SBATCH --mem-per-cpu=2048M . ${HOME}/.bashrc; if [ -n "${SLURM_JOB_NODELIST}" ]; then . /cluster/bin/jobsetup; . /projects/ltg/epe/abel/common; fi while [ $# -gt 0 -a "${1#-}" != "$1" ]; do case ${1} in -a|--append) tee="-a"; shift 1; ;; *) echo "parse: invalid option \`${1}'; exit."; exit 1; ;; esac done EPE="/projects/ltg/epe/2017"; BASE="/projects/ltg/epe/2018/submissions"; input="${1}"; cd ${BASE}; for file in $(cat ${BASE}/FILES); do if [ ! -s ${BASE}/${input}/${file}.conllu ]; then echo "missing parser output ‘${file}.conllu’; exit."; exit 1; fi done { for file in $(cat ${BASE}/FILES); do path=${BASE}/${input}/${file}; echo ${EPE}/logon/bin/epe --convert \ --raw ${EPE}/${file}.txt ${path}.conllu${i} ${path}.epe; done } | xargs -d \\n -n 1 -P 8 -t sh -c for file in $(cat ${BASE}/FILES); do if [ ! -s ${BASE}/${input}/${file}.epe ]; then echo "missing conversion result ‘${file}.epe’; exit."; exit 1; fi done for set in training development evaluation; do path=${BASE}/${input}/negation/${set}; ${EPE}/logon/bin/epe --project \ --gold ${EPE}/negation/${set}/gold.\*sem+ \ ${path}/raw.epe ${path}/raw.epe+; if [ ! -s ${path}/raw.epe+ ]; then echo "missing projection result for ‘${set}’; exit."; exit 1; fi done echo "EPE conversion and projection completed successfully."