-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathrun
executable file
·172 lines (154 loc) · 4.79 KB
/
run
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#!/bin/bash
exec scala -cp qry.jar:test/src/test_client.jar:src/naturalli_client.jar "$0" "$@"
!#
import Qry._
val LOG_DIR = "logs/last_suite/"
using(LOG_DIR)
// A utility for creating a Java instance
def program(c:String):Task = ("java"
-('cp, cp)
-"Xmx5G"
-"Xss32m"
-"XX:MaxPermSize=256M"
-"Dwordnet.database.dir=etc/WordNet-3.1/dict"
-'server
-'ea
->c
).toList
// The classifier trainer
def classifier =
(program("edu.stanford.nlp.naturalli.entail.ClassifierTrainer")
-('classifier, "NATURALLI")
-('naturalli_search, "src/naturalli_search")
-("train.file", "etc/aristo/turk_90_trainset.tab")
-("train.cache.do", "true")
-("train.debugdoc", "/dev/null")
-("log.file", touch("redwood.log"))
)
// The multiple choice evaluator
def multchoice =
(program("edu.stanford.nlp.naturalli.entail.MultipleChoiceSolver")
-("naturalli.weight", "4.875")
-("log.file", touch("redwood.log"))
)
//
// Clear the log directory
// TODO why doesn't this work?
//
//if (new java.io.File(LOG_DIR).exists) {
// submit("rm" -'r ->LOG_DIR)
//}
//
// Train the classifiers
//
submit(classifier
-('features,
"KEYWORD_OVERLAP LUCENE_SCORE" &
"KEYWORD_OVERLAP" &
"LUCENE_SCORE")
-('model, touch("model.ser.gz"))
)
//
// Run the models (train; all corpora)
//
parallel(3) submit(multchoice
-("naturalli.incache", "logs/all.cache")
-("naturalli.outcache", touch("out.cache"))
-('data, "etc/aristo/eval_monarch_train_allcorpora.tab")
-('model,
(LOG_DIR + "/0/model.ser.gz") &
(LOG_DIR + "/1/model.ser.gz") &
(LOG_DIR + "/2/model.ser.gz"))
-("naturalli.use", "false")
)
parallel(2) submit(multchoice
-("naturalli.incache", "logs/all.cache")
-("naturalli.outcache", touch("out.cache"))
-('data, "etc/aristo/eval_monarch_train_allcorpora.tab")
-('model, (LOG_DIR + "/2/model.ser.gz"))
-("naturalli.use", "true")
-("naturalli.uselucene", "true" & "false")
)
//
////
//// Run the models (train; barrons)
////
//parallel(3) submit(multchoice
// -("naturalli.incache", "logs/barrons_4.cache")
// -('data, "etc/aristo/eval_train_barrons.tab")
// -('model,
// (LOG_DIR + "/0/model.ser.gz") &
// (LOG_DIR + "/1/model.ser.gz") &
// (LOG_DIR + "/2/model.ser.gz"))
// -("naturalli.use", "false")
//)
//parallel(2) submit(multchoice
// -("naturalli.incache", "logs/barrons_4.cache")
// -('data, "etc/aristo/eval_train_barrons.tab")
// -('model, (LOG_DIR + "/2/model.ser.gz"))
// -("naturalli.use", "true")
// -("naturalli.uselucene", "true" & "false")
//)
//
// Run the models (test; all corpora)
//
//parallel(3) submit(multchoice
// -("naturalli.incache", "logs/test_all_4.cache")
// -('data, "etc/aristo/eval_test_allcorpora.tab")
// -('model,
// (LOG_DIR + "/0/model.ser.gz") &
// (LOG_DIR + "/1/model.ser.gz") &
// (LOG_DIR + "/2/model.ser.gz"))
// -("naturalli.use", "false")
//)
//parallel(2) submit(multchoice
// -("naturalli.incache", "logs/test_all_4.cache")
// -('data, "etc/aristo/eval_test_allcorpora.tab")
// -('model, (LOG_DIR + "/2/model.ser.gz"))
// -("naturalli.use", "true")
// -("naturalli.uselucene", "true" & "false")
//)
//
// Run the models (test; barrons)
//
//parallel(3) submit(multchoice
// -("naturalli.incache", "logs/test_barrons_4.cache")
// -('data, "etc/aristo/eval_test_barrons.tab")
// -('model,
// (LOG_DIR + "/0/model.ser.gz") &
// (LOG_DIR + "/1/model.ser.gz") &
// (LOG_DIR + "/2/model.ser.gz"))
// -("naturalli.use", "false")
//)
//parallel(2) submit(multchoice
// -("naturalli.incache", "logs/test_barrons_4.cache")
// -('data, "etc/aristo/eval_test_barrons.tab")
// -('model, (LOG_DIR + "/2/model.ser.gz"))
// -("naturalli.use", "true")
// -("naturalli.uselucene", "true" & "false")
//)
//
// Dump Results
//
submit("logs/print_last_suite.sh")
def cp:String = {
val JAVANLP = List(
System.getenv("JAVANLP_HOME") + "/projects/core/classes",
System.getenv("JAVANLP_HOME") + "/projects/core/lib/joda-time.jar",
System.getenv("JAVANLP_HOME") + "/projects/core/lib/jollyday-0.4.7.jar",
System.getenv("JAVANLP_HOME") + "/projects/core/lib/protobuf.jar",
System.getenv("JAVANLP_HOME") + "/projects/more/classes",
System.getenv("JAVANLP_HOME") + "/projects/more/lib/BerkeleyParser.jar",
System.getenv("JAVANLP_HOME") + "/projects/research/classes",
System.getenv("JAVANLP_HOME") + "/projects/research/lib/reverb.jar",
System.getenv("JAVANLP_HOME") + "/projects/research/lib/postgresql.jar",
// "/home/gabor/staging/stanford-corenlp-models-current.jar",
// "/home/gabor/staging/openie_models.jar"
"/u/nlp/data/StanfordCoreNLPModels/stanford-corenlp-models-current.jar"
).mkString(":")
val CUSTOM = List(
"lib/gson-2.3.1.jar",
"lib/jaws.jar"
).mkString(":")
List("src/naturalli_preprocess.jar", JAVANLP, CUSTOM).mkString(":")
}