#!/bin/zsh -x CDEC=~/src/cdec_json_serialization/decoder/cdec CDEC_MINIMAL=~/src/cdec_json_serialization/decoder/minimal_decoder WEAVER_PROTOTYPE=../prototype/weaver_proto.rb FAST_WEAVER=../bin/fast_weaver CDEC2JSON=./cdec/cdec2json.py MAKE_PAK=../bin/make_pak # 1020 \ for example in \ 1391 \ 1495 \ 1570 \ 1889 \ 2002 \ 3 \ 429 \ 748 \ ; do OUT_DIR=$example/output mkdir -p $OUT_DIR # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # cdec # $CDEC \ -c cdec/default.ini \ -w weights/weights \ -g $example/grammar \ -O $OUT_DIR \ < $example/in \ > $OUT_DIR/cdec.out \ 2>$OUT_DIR/cdec.err mv $OUT_DIR/0.json.gz $OUT_DIR/cdec.json.gz # +passthrough $CDEC \ -c cdec/passthrough.ini \ -w weights/weights \ -g $example/grammar \ -O $OUT_DIR \ < $example/in \ > $OUT_DIR/cdec.passthrough.out \ 2>$OUT_DIR/cdec.passthrough.err mv $OUT_DIR/0.json.gz $OUT_DIR/cdec.passthrough.json.gz # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # cdec2json # $CDEC2JSON \ -c cdec/default.ini \ -w weights/weights \ -g $example/grammar \ < $example/in \ > $OUT_DIR/cdec2json.json \ 2>$OUT_DIR/cdec2json.err # +passthrough $CDEC2JSON \ -c cdec/passthrough.ini \ -w weights/weights \ -g $example/grammar \ < $example/in \ > $OUT_DIR/cdec2json.passthrough.json \ 2>$OUT_DIR/cdec2json.passthrough.err # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # cdec minimal_decoder # $CDEC_MINIMAL \ $OUT_DIR/cdec.json.gz \ weights/weights \ > $OUT_DIR/cdec_minimal.out \ 2>$OUT_DIR/cdec_minimal.err $CDEC_MINIMAL \ $OUT_DIR/cdec.passthrough.json.gz \ weights/weights \ > $OUT_DIR/cdec_minimal.passthrough.out \ 2>$OUT_DIR/cdec_minimal.passthrough.err # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # fast_weaver # # make pak files first $MAKE_PAK \ $OUT_DIR/cdec2json.json \ $OUT_DIR/weaver.pak $MAKE_PAK \ $OUT_DIR/cdec2json.passthrough.json \ $OUT_DIR/weaver.passthrough.pak $FAST_WEAVER \ $OUT_DIR/weaver.pak \ > $OUT_DIR/fast_weaver.out \ 2>$OUT_DIR/fast_weaver.err $FAST_WEAVER \ $OUT_DIR/weaver.passthrough.pak \ > $OUT_DIR/fast_weaver.passthrough.out \ 2>$OUT_DIR/fast_weaver.passthrough.err # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # weaver prototype # $WEAVER_PROTOTYPE \ -w weights/weights \ -g $example/grammar \ -i $example/in \ -l \ > $OUT_DIR/weaver_proto.out \ 2>$OUT_DIR/weaver_proto.err # +passthrough $WEAVER_PROTOTYPE \ -w weights/weights \ -g $example/grammar \ -i $example/in \ -l \ -p \ > $OUT_DIR/weaver_proto.passthrough.out \ 2>$OUT_DIR/weaver_proto.passthrough.err done