Skip to content

Commit

Permalink
test script
Browse files Browse the repository at this point in the history
  • Loading branch information
sidaw committed Mar 14, 2016
1 parent bf05689 commit 94eafef
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions testPragmatics
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ SEMPATH=../semparse
GRAMMAR=../cubesem/grammar/stacks.grammar
cd $SEMPATH
# elif [ $1 = "cube" ]; then -FloatingParser.useSizeInsteadOfDepth true
LEARNOPTS="-Parser FloatingParser -FloatingParser.maxDepth 8 -FloatingParser.useSizeInsteadOfDepth true -Params.l1Reg lazy -Params.l1RegCoeff 0.001 -Parser.beamSize 100 -StacksWorldFeatureComputer.ngramN 2 -Params.initStepSize 0.1 -Params.adaptiveStepSize true"
LEARNOPTS="-Parser FloatingParser -FloatingParser.maxDepth 8 -FloatingParser.useSizeInsteadOfDepth true -Params.l1Reg lazy -Params.l1RegCoeff 0.001 -Parser.beamSize 100 -StacksWorldFeatureComputer.ngramN 3 -Params.initStepSize 0.1 -Params.adaptiveStepSize true"

SESSIONSTUFF="-Master.onlineLearnExamples false -Master.independentSessions true"

PRAG="-Master.bePragmatic true -PragmaticListener.addModelProb true -PragmaticListener.smoothAlpha 1.0 -PragmaticListener.uniformWeight 0.001 -PragmaticListener.lambda 3.0 -Learner.onlineEvaluation true -Derivation.comparePragmatically true"
PRAG="-Master.bePragmatic true -PragmaticListener.addModelProb true -PragmaticListener.smoothAlpha 1.0 -PragmaticListener.uniformWeight 0.001 -PragmaticListener.lambda 3.0 -Learner.onlineEvaluation true -Derivation.comparePragmatically true -PragmaticListener.skipSeen true"

# A2YJFCTJPPX66.lisp 70
# A1HKYY6XI2OHO1.lisp 63
Expand All @@ -26,24 +26,37 @@ OPTIONS="-JavaExecutor.convertNumberValues false -FeatureExtractor.featureDomain
DEBUG="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,suspend=n,address=8898"

if [ $1 = "analyze" ]; then
echo "accuracies\n"

for turkid in $(<../cubesem/data/topturker.txt)
do
egrep -e "(-train.correct.mean|-train.correctBaseline.mean)" _OUTPATH_/${turkid}/output.map | paste -d " " - -
egrep -e "(-train.pragBetter.mean|-train.pragWorse.mean)" _OUTPATH_stdprag/${turkid}/output.map | paste -d "\t" - - | sed -e "s/$/$(echo '\t')${turkid}/"
done

echo "top\n"
echo "\n\n"

for turkid in $(<../cubesem/data/topturker.txt)
do
egrep -e "(-train.Top3Prag.mean|-train.Top3Normal.mean)" _OUTPATH_/${turkid}/output.map | paste -d " " - -

egrep -e "(-train.correct.mean|-train.correctBaseline.mean)" _OUTPATH_/${turkid}/output.map | paste -d "\t" - - | sed -e "s/$/$(echo '\t')${turkid}/"
done

echo "top\n"
echo "\n\n"

for turkid in $(<../cubesem/data/topturker.txt)
do
egrep -e "(-train.Top5Prag.mean|-train.Top5Normal.mean)" _OUTPATH_/${turkid}/output.map | paste -d " " - -
egrep -e "(-train.correctIndexAfterParsePrag.mean|-train.correctIndexAfterParse.mean|-train.correctIndexAfterParse.count|-train.correctIndexAfterParsePrag.count)" _OUTPATH_stdprag/${turkid}/output.map | paste -d "\t" - - - - | sed -e "s/$/$(echo '\t')${turkid}/"
done

# echo "top\n"
# for turkid in $(<../cubesem/data/topturker.txt)
# do
# egrep -e "(-train.Top3Prag.mean|-train.Top3Normal.mean)" _OUTPATH_/${turkid}/output.map | paste -d "\t" - -

# done

# echo "top\n"
# for turkid in $(<../cubesem/data/topturker.txt)
# do
# egrep -e "(-train.Top5Prag.mean|-train.Top5Normal.mean)" _OUTPATH_/${turkid}/output.map | paste -d "\t" - -
# done
else
for turkid in $(<../cubesem/data/topturker.txt)
do
Expand Down

0 comments on commit 94eafef

Please sign in to comment.