forked from utcompling/applied-nlp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommands
16 lines (11 loc) · 4.29 KB
/
commands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Atheism, Baseball, Cars, Hockey, Med --> 76.0, 78.0
echo "Creating training files"; for f in atheism baseball cars hockey med; do echo $f; anlp run appliednlp.classify.TopicFeatures --a $f --stop applied-nlp/data/stopwords.txt applied-nlp/test/$f > $NAK_DIR/data/classify/out/topic.$f.training; done; echo "Creating test files"; for f in atheism baseball cars hockey med; do echo $f; anlp run appliednlp.classify.TopicFeatures --a $f --stop applied-nlp/data/stopwords.txt applied-nlp/test/testdata/$f > $NAK_DIR/data/classify/out/topic.$f.test; done; cd $NAK_DIR/data/classify/out; for t in training test; do cat topic.atheism.$t topic.baseball.$t topic.cars.$t topic.hockey.$t topic.med.$t > topic.$t; done; cd ../../../; echo "Evaluating"; nak classify --train $NAK_DIR/data/classify/out/topic.training --eval $NAK_DIR/data/classify/out/topic.test --predictfile $NAK_DIR/data/classify/out/topic.predictions.txt; cd ../;
//Baseball, Cars, Hockey --> 80.0, 83.33333
echo "Creating training files"; for f in baseball cars hockey; do echo $f; anlp run appliednlp.classify.TopicFeatures --a $f --stop applied-nlp/data/stopwords.txt applied-nlp/test/$f > $NAK_DIR/data/classify/out/topic.$f.training; done; echo "Creating test files"; for f in baseball cars hockey; do echo $f; anlp run appliednlp.classify.TopicFeatures --a $f --stop applied-nlp/data/stopwords.txt applied-nlp/test/testdata/$f > $NAK_DIR/data/classify/out/topic.$f.test; done; cd $NAK_DIR/data/classify/out; for t in training test; do cat topic.baseball.$t topic.cars.$t topic.hockey.$t > topic.$t; done; cd ../../../; echo "Evaluating"; nak classify --train data/classify/out/topic.training --eval data/classify/out/topic.test --predictfile data/classify/out/topic.predictions.txt; cd ../;
//Atheism, Baseball, Hockey, Med --> 80.0, 85.0
echo "Creating training files"; for f in atheism baseball hockey med; do echo $f; anlp run appliednlp.classify.TopicFeatures --a $f --stop applied-nlp/data/stopwords.txt applied-nlp/test/$f > $NAK_DIR/data/classify/out/topic.$f.training; done; echo "Creating test files"; for f in atheism baseball hockey med; do echo $f; anlp run appliednlp.classify.TopicFeatures --a $f --stop applied-nlp/data/stopwords.txt applied-nlp/test/testdata/$f > $NAK_DIR/data/classify/out/topic.$f.test; done; cd $NAK_DIR/data/classify/out; for t in training test; do cat topic.atheism.$t topic.baseball.$t topic.hockey.$t topic.med.$t > topic.$t; done; cd ../../../; echo "Evaluating"; nak classify --train data/classify/out/topic.training --eval data/classify/out/topic.test --predictfile data/classify/out/topic.predictions.txt; cd ../;
//Atheism vs Baseball --> 85.0, 90.0
echo "Creating training files"; for f in atheism baseball; do echo $f; anlp run appliednlp.classify.TopicFeatures --a $f --stop applied-nlp/data/stopwords.txt applied-nlp/test/$f > $NAK_DIR/data/classify/out/topic.$f.training; done; echo "Creating test files"; for f in atheism baseball; do echo $f; anlp run appliednlp.classify.TopicFeatures --a $f --stop applied-nlp/data/stopwords.txt applied-nlp/test/testdata/$f > $NAK_DIR/data/classify/out/topic.$f.test; done; cd $NAK_DIR/data/classify/out; for t in training test; do cat topic.atheism.$t topic.baseball.$t > topic.AB.$t; done; cd ../../../; echo "Evaluating"; nak classify --train data/classify/out/topic.AB.training --eval data/classify/out/topic.AB.test --predictfile data/classify/out/topic.AB.predictions.txt; cd ../;
//Baseball vs Hockey --> 90.0, 95.0
echo "Creating training files"; for f in baseball hockey; do echo $f; anlp run appliednlp.classify.TopicFeatures --a $f --stop applied-nlp/data/stopwords.txt applied-nlp/test/$f > $NAK_DIR/data/classify/out/topic.$f.training; done; echo "Creating test files"; for f in baseball hockey; do echo $f; anlp run appliednlp.classify.TopicFeatures --a $f --stop applied-nlp/data/stopwords.txt applied-nlp/test/testdata/$f > $NAK_DIR/data/classify/out/topic.$f.test; done; cd $NAK_DIR/data/classify/out; for t in training test; do cat topic.hockey.$t topic.baseball.$t > topic.BH.$t; done; cd ../../../; echo "Evaluating"; nak classify --train data/classify/out/topic.BH.training --eval data/classify/out/topic.BH.test --predictfile data/classify/out/topic.BH.predictions.txt; cd ../;
anlp run appliednlp.classify.ConfidenceScorer $NAK_DIR/data/classify/out/topic.test $NAK_DIR/data/classify/out/topic.predictions.txt