File size: 2,926 Bytes
546a9ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import argparse

io_parser = argparse.ArgumentParser(add_help=False)
io_parser.add_argument(
    "-i",
    "--input-files-dir",
    help="Path of the directory containing the files to be converted.",
    type=str,
    action="store",
    dest="input_dir",
    required=True,
)
io_parser.add_argument(
    "-o",
    "--output-files-dir",
    help="Path of the directory in which the converted files will be saved.",
    type=str,
    action="store",
    dest="output_dir",
    required=True,
)

ss_parser = argparse.ArgumentParser(add_help=False)
ss_parser.add_argument(
    "-ss",
    "--split-sentences",
    help="ROUGE assumes one sentence per line as default summary format. Use "
    "this flag to split sentences using NLTK if the summary texts have "
    "another format.",
    action="store_true",
    dest="split_sents",
)

rouge_path_parser = argparse.ArgumentParser(add_help=False)
rouge_path_parser.add_argument(
    "-hd",
    "--home-dir",
    help="Path of the directory containing ROUGE-1.5.5.pl.",
    type=str,
    action="store",
    dest="rouge_home",
    required=True,
)

model_sys_parser = argparse.ArgumentParser(add_help=False)
model_sys_parser.add_argument(
    "-mfp",
    "--model-fn-pattern",
    help="Regexp matching model filenames.",
    type=str,
    action="store",
    dest="model_filename_pattern",
    required=True,
)
model_sys_parser.add_argument(
    "-sfp",
    "--system-fn-pattern",
    help="Regexp matching system filenames.",
    type=str,
    action="store",
    dest="system_filename_pattern",
    required=True,
)
model_sys_parser.add_argument(
    "-m",
    "--model-dir",
    help="Path of the directory containing model summaries.",
    type=str,
    action="store",
    dest="model_dir",
    required=True,
)
model_sys_parser.add_argument(
    "-s",
    "--system-dir",
    help="Path of the directory containing system summaries.",
    type=str,
    action="store",
    dest="system_dir",
    required=True,
)
model_sys_parser.add_argument(
    "-id",
    "--system-id",
    help="Optional system ID. This is useful when comparing several systems.",
    action="store",
    dest="system_id",
)

config_parser = argparse.ArgumentParser(add_help=False)
config_parser.add_argument(
    "-c",
    "--config-file-path",
    help="Path of configfile to be written, including file name.",
    type=str,
    action="store",
    dest="config_file_path",
    required=True,
)

main_parser = argparse.ArgumentParser(parents=[model_sys_parser], add_help=False)
main_parser.add_argument(
    "-hd",
    "--home-dir",
    help="Path of the directory containing ROUGE-1.5.5.pl.",
    type=str,
    action="store",
    dest="rouge_home",
)
main_parser.add_argument(
    "-rargs",
    "--rouge-args",
    help="Override pyrouge default ROUGE command line options with the "
    "ROUGE_ARGS string, enclosed in qoutation marks.",
    type=str,
    action="store",
    dest="rouge_args",
)