-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·43 lines (30 loc) · 1.46 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cd SProj
#clear all files
./clean.sh
#run java code in SProj folder
echo "Running SProj code"
./run.sh
cd ..
cp SProj/output*.txt Mallet/
cd Mallet
#import data into mallet data
echo "Importing data into Mallet"
bin/mallet import-file --input output_features_tagged.txt --output linguistic_causal_train.mallet
bin/mallet import-file --input output_event_training.txt --output linguistic_event_train.mallet
bin/mallet import-file --input output_features_tagged_cause_effect.txt --output cause_effect_train.mallet
#train classifiers
echo "Training classifiers"
bin/mallet train-classifier --input linguistic_causal_train.mallet --output-classifier linguistic_causal.classifier --trainer MaxEnt
bin/mallet train-classifier --input linguistic_event_train.mallet --output-classifier linguistic_event.classifier --trainer NaiveBayes
bin/mallet train-classifier --input cause_effect_train.mallet --output-classifier cause_effect.classifier
#classify on test data
echo "Classifying test data"
bin/csv2classify --input output_features.txt --classifier linguistic_causal.classifier --output ling_causal_res.txt
bin/csv2classify --input output_event_features.txt --classifier linguistic_event.classifier --output ling_event_res.txt
bin/csv2classify --input output_features_cause_effect.txt --classifier cause_effect.classifier --output cause_effect_res.txt
cd ..
echo "Moving results to SProj"
cp Mallet/*res.txt SProj/
echo "Running postprocess classification"
cd SProj
./postprocess.sh