#!/bin/bash
# setup preclean
OUTDIR=$1
AGGDIR=$2
echo "section=word-order" > $OUTDIR/pre-clean-choices
cat "$OUTDIR/wo.out" >> $OUTDIR/pre-clean-choices
echo "
section=case" >> $OUTDIR/pre-clean-choices
cat "$OUTDIR/case.out" >> $OUTDIR/pre-clean-choices
echo "
section=lexicon" >> $OUTDIR/pre-clean-choices
cat "$OUTDIR/lex.out" >> $OUTDIR/pre-clean-choices
cat "$OUTDIR/merge.out" >> $OUTDIR/pre-clean-choices

# assemble the outputs into a choices file and do final cleaning
# needs to go in a POST script in the dag
#
$AGGDIR/scripts/cleanup-choices.py $OUTDIR/pre-clean-choices > $OUTDIR/choices-final
