-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
347 lines (222 loc) · 17 KB
/
Makefile
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
all: outputs/xsum_reference__report.csv \
outputs/xsum_pegasus__report.csv \
outputs/cnn_reference__report.csv \
outputs/cnn_pegasus__report.csv \
outputs/xsum_reference__corr.pdf \
outputs/xsum_pegasus__corr.pdf \
outputs/cnn_reference__corr.pdf \
outputs/cnn_pegasus__corr.pdf \
outputs/dataset_stats.csv \
outputs/xsum_sourcesentsumm__1__table.csv \
outputs/xsum_sourcesentsumm__2__table.csv \
outputs/cnn_sourcesentsumm__1__table.csv \
outputs/cnn_sourcesentsumm__2__table.csv \
outputs/xsum_reference__examples.csv \
outputs/xsum_pegasus__examples.csv \
outputs/cnn_reference__examples.csv \
outputs/cnn_pegasus__examples.csv \
outputs/main_table.tex
# Examples analysis
outputs/xsum_reference__examples.csv: outputs/xsum_reference__rouge1.json outputs/xsum_reference__bertscore.json outputs/xsum_reference__lexrank.json outputs/xsum_reference__perplexity.json
python scripts/analyze_examples.py --input xsum_reference
outputs/xsum_pegasus__examples.csv: outputs/xsum_pegasus__rouge1.json outputs/xsum_pegasus__bertscore.json outputs/xsum_pegasus__lexrank.json outputs/xsum_pegasus__perplexity.json outputs/xsum_pegasus__attention.json
python scripts/analyze_examples.py --input xsum_pegasus
outputs/cnn_reference__examples.csv: outputs/cnn_reference__rouge1.json outputs/cnn_reference__bertscore.json outputs/cnn_reference__lexrank.json outputs/cnn_reference__perplexity.json
python scripts/analyze_examples.py --input cnn_reference
outputs/cnn_pegasus__examples.csv: outputs/cnn_pegasus__rouge1.json outputs/cnn_pegasus__bertscore.json outputs/cnn_pegasus__lexrank.json outputs/cnn_pegasus__perplexity.json outputs/cnn_pegasus__attention.json
python scripts/analyze_examples.py --input cnn_pegasus
# Source sentence summarization experiments
## Aggregate
outputs/xsum_sourcesentsumm__1__table.csv: outputs/xsum_sourcesentsumm__lexrank__1__pred.csv outputs/xsum_sourcesentsumm__pegasus__1__pred.csv outputs/xsum_sourcesentsumm__bart__1__pred.csv
python scripts/aggregate_sourcesent.py --dataset xsum --label_threshold 1
outputs/xsum_sourcesentsumm__2__table.csv: outputs/xsum_sourcesentsumm__lexrank__2__pred.csv outputs/xsum_sourcesentsumm__pegasus__2__pred.csv outputs/xsum_sourcesentsumm__bart__2__pred.csv
python scripts/aggregate_sourcesent.py --dataset xsum --label_threshold 2
outputs/cnn_sourcesentsumm__1__table.csv: outputs/cnn_sourcesentsumm__lexrank__1__pred.csv outputs/cnn_sourcesentsumm__pegasus__1__pred.csv outputs/cnn_sourcesentsumm__bart__1__pred.csv
python scripts/aggregate_sourcesent.py --dataset cnn --label_threshold 1
outputs/cnn_sourcesentsumm__2__table.csv: outputs/cnn_sourcesentsumm__lexrank__2__pred.csv outputs/cnn_sourcesentsumm__pegasus__2__pred.csv outputs/cnn_sourcesentsumm__bart__2__pred.csv
python scripts/aggregate_sourcesent.py --dataset cnn --label_threshold 2
## Xsum
outputs/xsum_sourcesentsumm__lexrank__1__pred.csv: data/xsum_reference.json
python scripts/summarize_sourcesent_xsum.py --method lexrank --label_threshold 1
outputs/xsum_sourcesentsumm__pegasus__1__pred.csv: data/xsum_reference.json
python scripts/summarize_sourcesent_xsum.py --method pegasus --label_threshold 1
outputs/xsum_sourcesentsumm__bart__1__pred.csv: data/xsum_reference.json
python scripts/summarize_sourcesent_xsum.py --method bart --label_threshold 1
outputs/xsum_sourcesentsumm__lexrank__2__pred.csv: data/xsum_reference.json
python scripts/summarize_sourcesent_xsum.py --method lexrank --label_threshold 2
outputs/xsum_sourcesentsumm__pegasus__2__pred.csv: data/xsum_reference.json
python scripts/summarize_sourcesent_xsum.py --method pegasus --label_threshold 2
outputs/xsum_sourcesentsumm__bart__2__pred.csv: data/xsum_reference.json
python scripts/summarize_sourcesent_xsum.py --method bart --label_threshold 2
## CNN
outputs/cnn_sourcesentsumm__lexrank__1__pred.csv: data/cnn_reference.json
python scripts/summarize_sourcesent_cnn.py --method lexrank --label_threshold 1
outputs/cnn_sourcesentsumm__pegasus__1__pred.csv: data/cnn_reference.json
python scripts/summarize_sourcesent_cnn.py --method pegasus --label_threshold 1
outputs/cnn_sourcesentsumm__bart__1__pred.csv: data/cnn_reference.json
python scripts/summarize_sourcesent_cnn.py --method bart --label_threshold 1
outputs/cnn_sourcesentsumm__lexrank__2__pred.csv: data/cnn_reference.json
python scripts/summarize_sourcesent_cnn.py --method lexrank --label_threshold 2
outputs/cnn_sourcesentsumm__pegasus__2__pred.csv: data/cnn_reference.json
python scripts/summarize_sourcesent_cnn.py --method pegasus --label_threshold 2
outputs/cnn_sourcesentsumm__bart__2__pred.csv: data/cnn_reference.json
python scripts/summarize_sourcesent_cnn.py --method bart --label_threshold 2
# Dataset stats
outputs/dataset_stats.csv: data/cnn_pegasus.json data/cnn_reference.json data/xsum_pegasus.json data/xsum_reference.json
python scripts/calculate_dataset_stats.py
# Correlation
outputs/xsum_reference__corr.pdf: outputs/xsum_reference__rouge1.json outputs/xsum_reference__bertscore.json outputs/xsum_reference__lexrank.json outputs/xsum_reference__perplexity.json outputs/xsum_reference__simcse.json outputs/xsum_reference__gptpmi.json outputs/xsum_reference__text-davinci-003.json
python scripts/calculate_correlation.py --input xsum_reference
outputs/xsum_pegasus__corr.pdf: outputs/xsum_pegasus__rouge1.json outputs/xsum_pegasus__bertscore.json outputs/xsum_pegasus__lexrank.json outputs/xsum_pegasus__perplexity.json outputs/xsum_pegasus__attention.json outputs/xsum_pegasus__simcse.json outputs/xsum_pegasus__gptpmi.json outputs/xsum_pegasus__text-davinci-003.json
python scripts/calculate_correlation.py --input xsum_pegasus
outputs/cnn_reference__corr.pdf: outputs/cnn_reference__rouge1.json outputs/cnn_reference__bertscore.json outputs/cnn_reference__lexrank.json outputs/cnn_reference__perplexity.json outputs/cnn_reference__simcse.json outputs/cnn_reference__gptpmi.json outputs/cnn_reference__text-davinci-003.json
python scripts/calculate_correlation.py --input cnn_reference
outputs/cnn_pegasus__corr.pdf: outputs/cnn_pegasus__rouge1.json outputs/cnn_pegasus__bertscore.json outputs/cnn_pegasus__lexrank.json outputs/cnn_pegasus__perplexity.json outputs/cnn_pegasus__attention.json outputs/cnn_pegasus__simcse.json outputs/cnn_pegasus__gptpmi.json outputs/cnn_pegasus__text-davinci-003.json
python scripts/calculate_correlation.py --input cnn_pegasus
# Report
outputs/main_table.tex: outputs/main_table.csv
python scripts/csv2latex.py --num_header 2 --input outputs/main_table.csv > outputs/main_table.tex
outputs/main_table.csv: outputs/xsum_reference__report.csv outputs/xsum_pegasus__report.csv outputs/cnn_reference__report.csv outputs/cnn_pegasus__report.csv
python scripts/create_table.py --output outputs/main_table.csv
outputs/xsum_reference__report.csv: outputs/xsum_reference__rouge1__eval.csv outputs/xsum_reference__bertscore__eval.csv outputs/xsum_reference__lexrank__eval.csv outputs/xsum_reference__perplexity__eval.csv outputs/xsum_reference__simcse__eval.csv outputs/xsum_reference__gptpmi__eval.csv outputs/xsum_reference__text-davinci-003__eval.csv
python scripts/create_report.py --input xsum_reference
outputs/xsum_pegasus__report.csv: outputs/xsum_pegasus__rouge1__eval.csv outputs/xsum_pegasus__bertscore__eval.csv outputs/xsum_pegasus__lexrank__eval.csv outputs/xsum_pegasus__perplexity__eval.csv outputs/xsum_pegasus__attention__eval.csv outputs/xsum_pegasus__simcse__eval.csv outputs/xsum_pegasus__gptpmi__eval.csv outputs/xsum_pegasus__text-davinci-003__eval.csv
python scripts/create_report.py --input xsum_pegasus
outputs/cnn_reference__report.csv: outputs/cnn_reference__rouge1__eval.csv outputs/cnn_reference__bertscore__eval.csv outputs/cnn_reference__lexrank__eval.csv outputs/cnn_reference__perplexity__eval.csv outputs/cnn_reference__simcse__eval.csv outputs/cnn_reference__gptpmi__eval.csv outputs/cnn_reference__text-davinci-003__eval.csv
python scripts/create_report.py --input cnn_reference
outputs/cnn_pegasus__report.csv: outputs/cnn_pegasus__rouge1__eval.csv outputs/cnn_pegasus__bertscore__eval.csv outputs/cnn_pegasus__lexrank__eval.csv outputs/cnn_pegasus__perplexity__eval.csv outputs/cnn_pegasus__attention__eval.csv outputs/cnn_pegasus__simcse__eval.csv outputs/cnn_pegasus__gptpmi__eval.csv outputs/cnn_pegasus__text-davinci-003__eval.csv
python scripts/create_report.py --input cnn_pegasus
# Evaluation
## XSum
### Reference
outputs/xsum_reference__rouge1__eval.csv: outputs/xsum_reference__rouge1.json
python scripts/evaluate.py --input outputs/xsum_reference__rouge1.json --method rouge1
outputs/xsum_reference__bertscore__eval.csv: outputs/xsum_reference__bertscore.json
python scripts/evaluate.py --input outputs/xsum_reference__bertscore.json --method bertscore
outputs/xsum_reference__lexrank__eval.csv: outputs/xsum_reference__lexrank.json
python scripts/evaluate.py --input outputs/xsum_reference__lexrank.json --method lexrank
outputs/xsum_reference__perplexity__eval.csv: outputs/xsum_reference__perplexity.json
python scripts/evaluate.py --input outputs/xsum_reference__perplexity.json --method perplexity
outputs/xsum_reference__simcse__eval.csv: outputs/xsum_reference__simcse.json
python scripts/evaluate.py --input outputs/xsum_reference__simcse.json --method simcse
outputs/xsum_reference__gptpmi__eval.csv: outputs/xsum_reference__gptpmi.json
python scripts/evaluate.py --input outputs/xsum_reference__gptpmi.json --method gptpmi
outputs/xsum_reference__text-davinci-003__eval.csv: outputs/xsum_reference__text-davinci-003.json
python scripts/evaluate.py --input outputs/xsum_reference__text-davinci-003.json --method text-davinci-003
### PEGASUS
outputs/xsum_pegasus__rouge1__eval.csv: outputs/xsum_pegasus__rouge1.json
python scripts/evaluate.py --input outputs/xsum_pegasus__rouge1.json --method rouge1
outputs/xsum_pegasus__bertscore__eval.csv: outputs/xsum_pegasus__bertscore.json
python scripts/evaluate.py --input outputs/xsum_pegasus__bertscore.json --method bertscore
outputs/xsum_pegasus__lexrank__eval.csv: outputs/xsum_pegasus__lexrank.json
python scripts/evaluate.py --input outputs/xsum_pegasus__lexrank.json --method lexrank
outputs/xsum_pegasus__perplexity__eval.csv: outputs/xsum_pegasus__perplexity.json
python scripts/evaluate.py --input outputs/xsum_pegasus__perplexity.json --method perplexity
outputs/xsum_pegasus__attention__eval.csv: outputs/xsum_pegasus__attention.json
python scripts/evaluate.py --input outputs/xsum_pegasus__attention.json --method attention
outputs/xsum_pegasus__simcse__eval.csv: outputs/xsum_pegasus__simcse.json
python scripts/evaluate.py --input outputs/xsum_pegasus__simcse.json --method simcse
outputs/xsum_pegasus__gptpmi__eval.csv: outputs/xsum_pegasus__gptpmi.json
python scripts/evaluate.py --input outputs/xsum_pegasus__gptpmi.json --method gptpmi
outputs/xsum_pegasus__text-davinci-003__eval.csv: outputs/xsum_pegasus__text-davinci-003.json
python scripts/evaluate.py --input outputs/xsum_pegasus__text-davinci-003.json --method text-davinci-003
## CNN/DM
### Reference
outputs/cnn_reference__rouge1__eval.csv: outputs/cnn_reference__rouge1.json
python scripts/evaluate.py --input outputs/cnn_reference__rouge1.json --method rouge1
outputs/cnn_reference__bertscore__eval.csv: outputs/cnn_reference__bertscore.json
python scripts/evaluate.py --input outputs/cnn_reference__bertscore.json --method bertscore
outputs/cnn_reference__lexrank__eval.csv: outputs/cnn_reference__lexrank.json
python scripts/evaluate.py --input outputs/cnn_reference__lexrank.json --method lexrank
outputs/cnn_reference__perplexity__eval.csv: outputs/cnn_reference__perplexity.json
python scripts/evaluate.py --input outputs/cnn_reference__perplexity.json --method perplexity
outputs/cnn_reference__simcse__eval.csv: outputs/cnn_reference__simcse.json
python scripts/evaluate.py --input outputs/cnn_reference__simcse.json --method simcse
outputs/cnn_reference__gptpmi__eval.csv: outputs/cnn_reference__gptpmi.json
python scripts/evaluate.py --input outputs/cnn_reference__gptpmi.json --method gptpmi
outputs/cnn_reference__text-davinci-003__eval.csv: outputs/cnn_reference__text-davinci-003.json
python scripts/evaluate.py --input outputs/cnn_reference__text-davinci-003.json --method text-davinci-003
### PEGASUS
outputs/cnn_pegasus__rouge1__eval.csv: outputs/cnn_pegasus__rouge1.json
python scripts/evaluate.py --input outputs/cnn_pegasus__rouge1.json --method rouge1
outputs/cnn_pegasus__bertscore__eval.csv: outputs/cnn_pegasus__bertscore.json
python scripts/evaluate.py --input outputs/cnn_pegasus__bertscore.json --method bertscore
outputs/cnn_pegasus__lexrank__eval.csv: outputs/cnn_pegasus__lexrank.json
python scripts/evaluate.py --input outputs/cnn_pegasus__lexrank.json --method lexrank
outputs/cnn_pegasus__perplexity__eval.csv: outputs/cnn_pegasus__perplexity.json
python scripts/evaluate.py --input outputs/cnn_pegasus__perplexity.json --method perplexity
outputs/cnn_pegasus__attention__eval.csv: outputs/cnn_pegasus__attention.json
python scripts/evaluate.py --input outputs/cnn_pegasus__attention.json --method attention
outputs/cnn_pegasus__simcse__eval.csv: outputs/cnn_pegasus__simcse.json
python scripts/evaluate.py --input outputs/cnn_pegasus__simcse.json --method simcse
outputs/cnn_pegasus__gptpmi__eval.csv: outputs/cnn_pegasus__gptpmi.json
python scripts/evaluate.py --input outputs/cnn_pegasus__gptpmi.json --method gptpmi
outputs/cnn_pegasus__text-davinci-003__eval.csv: outputs/cnn_pegasus__text-davinci-003.json
python scripts/evaluate.py --input outputs/cnn_pegasus__text-davinci-003.json --method text-davinci-003
# Prediction
## XSUM
### Reference
outputs/xsum_reference__rouge1.json:
python scripts/evaluate_xsum.py --input data/xsum_reference.json --method rouge1
outputs/xsum_reference__bertscore.json:
python scripts/evaluate_xsum.py --input data/xsum_reference.json --method bertscore
outputs/xsum_reference__lexrank.json:
python scripts/evaluate_xsum.py --input data/xsum_reference.json --method lexrank
outputs/xsum_reference__perplexity.json:
python scripts/evaluate_xsum.py --input data/xsum_reference.json --method perplexity
outputs/xsum_reference__simcse.json:
python scripts/evaluate_xsum.py --input data/xsum_reference.json --method simcse
outputs/xsum_reference__gptpmi.json:
python scripts/evaluate_xsum.py --input data/xsum_reference.json --method gptpmi
outputs/xsum_reference__text-davinci-003.json:
python scripts/evaluate_gpt_xsum.py --input data/xsum_reference.json --method text-davinci-003
### Pegasus
outputs/xsum_pegasus__rouge1.json:
python scripts/evaluate_xsum.py --input data/xsum_pegasus.json --method rouge1
outputs/xsum_pegasus__bertscore.json:
python scripts/evaluate_xsum.py --input data/xsum_pegasus.json --method bertscore
outputs/xsum_pegasus__lexrank.json:
python scripts/evaluate_xsum.py --input data/xsum_pegasus.json --method lexrank
outputs/xsum_pegasus__perplexity.json:
python scripts/evaluate_xsum.py --input data/xsum_pegasus.json --method perplexity
outputs/xsum_pegasus__attention.json:
python scripts/evaluate_xsum.py --input data/xsum_pegasus.json --method attention
outputs/xsum_pegasus__simcse.json:
python scripts/evaluate_xsum.py --input data/xsum_pegasus.json --method simcse
outputs/xsum_pegasus__gptpmi.json:
python scripts/evaluate_xsum.py --input data/xsum_pegasus.json --method gptpmi
outputs/xsum_pegasus__text-davinci-003.json:
python scripts/evaluate_gpt_xsum.py --input data/xsum_pegasus.json --method text-davinci-003
## CNN/DM
### Reference
outputs/cnn_reference__rouge1.json:
python scripts/evaluate_cnn.py --input data/cnn_reference.json --method rouge1
outputs/cnn_reference__bertscore.json:
python scripts/evaluate_cnn.py --input data/cnn_reference.json --method bertscore
outputs/cnn_reference__lexrank.json:
python scripts/evaluate_cnn.py --input data/cnn_reference.json --method lexrank
outputs/cnn_reference__perplexity.json:
python scripts/evaluate_cnn.py --input data/cnn_reference.json --method perplexity
outputs/cnn_reference__simcse.json:
python scripts/evaluate_cnn.py --input data/cnn_reference.json --method simcse
outputs/cnn_reference__gptpmi.json:
python scripts/evaluate_cnn.py --input data/cnn_reference.json --method gptpmi
outputs/cnn_reference__text-davinci-003.json:
python scripts/evaluate_gpt_cnn.py --input data/cnn_reference.json --method text-davinci-003
### Pegasus
outputs/cnn_pegasus__rouge1.json:
python scripts/evaluate_cnn.py --input data/cnn_pegasus.json --method rouge1
outputs/cnn_pegasus__bertscore.json:
python scripts/evaluate_cnn.py --input data/cnn_pegasus.json --method bertscore
outputs/cnn_pegasus__lexrank.json:
python scripts/evaluate_cnn.py --input data/cnn_pegasus.json --method lexrank
outputs/cnn_pegasus__perplexity.json:
python scripts/evaluate_cnn.py --input data/cnn_pegasus.json --method perplexity
outputs/cnn_pegasus__attention.json:
python scripts/evaluate_cnn.py --input data/cnn_pegasus.json --method attention
outputs/cnn_pegasus__simcse.json:
python scripts/evaluate_cnn.py --input data/cnn_pegasus.json --method simcse
outputs/cnn_pegasus__gptpmi.json:
python scripts/evaluate_cnn.py --input data/cnn_pegasus.json --method gptpmi
outputs/cnn_pegasus__text-davinci-003.json:
python scripts/evaluate_gpt_cnn.py --input data/cnn_pegasus.json --method text-davinci-003