#!/bin/bash #SBATCH --job-name=sherlock #SBATCH --account=nn9106k #SBATCH --time=1:00:00 #SBATCH --mail-type=FAIL #SBATCH --nodes=1 #SBATCH --ntasks-per-node=4 #SBATCH --mem-per-cpu=2048M . ${HOME}/.bashrc; if [ -n "${SLURM_JOB_NODELIST}" ]; then . /cluster/bin/jobsetup; . /projects/ltg/epe/abel/common; fi SHERLOCK=/projects/ltg/epe/2018/sherlock; 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 id="${1}"; lemmas="${2:-lemma}"; poss="${3:-upos}"; input="/projects/ltg/epe/2018/submissions/${id}"; target="/projects/ltg/epe/2018/results/negation/${id}"; cd ${SHERLOCK}; { for lemma in $(echo ${lemmas} | tr "," " "); do for pos in $(echo ${poss} | tr "," " "); do for split in development evaluation; do echo /projects/ltg/python/bin/python -u sherlock.py \ --wapiti /projects/ltg/epe/wapiti/wapiti \ --pattern_scope patterns/scope.pattern \ --pattern_event patterns/event.pattern \ --parameters ${input}/negation/training/Sherlock.${pos} \ --target ${target}/${pos}/${split} \ --training ${input}/negation/training/raw.epe+ \ --testing ${input}/negation/${split}/raw.epe+ \ --pos ${pos} --lemma ${lemma} \ --score --force done done done } | xargs -d \\n -n 1 -P 4 -t sh -c exit 0;