Stats flag
This commit is contained in:
parent
6a9ee516a3
commit
2387bd7cb7
9
wani.py
9
wani.py
|
@ -1024,16 +1024,17 @@ class Writer:
|
|||
@staticmethod
|
||||
def make_output_writer(args):
|
||||
return Writer(False, args.output, args.multiple_output,
|
||||
int(args.sort_by), args.sort_reversed)
|
||||
int(args.sort_by), args.sort_reversed, args.stats)
|
||||
|
||||
@staticmethod
|
||||
def make_all_writer(args):
|
||||
return Writer(True, args.all, False, -1, False)
|
||||
return Writer(True, args.all, False, -1, False, False)
|
||||
|
||||
def __init__(self, all, filename, multiple_output, sort_by, sort_reversed):
|
||||
def __init__(self, all, filename, multiple_output, sort_by, sort_reversed, stats):
|
||||
self.all = all
|
||||
self.output_file = filename
|
||||
self.multiple_output = multiple_output
|
||||
self.stats = stats
|
||||
|
||||
self.sort_by = sort_by
|
||||
self.sort_order = sort_reversed
|
||||
|
@ -1328,6 +1329,8 @@ if __name__ == '__main__':
|
|||
parser.add_argument('--multiple-output',
|
||||
help='Generate one output for each syntactic structure',
|
||||
action='store_true')
|
||||
parser.add_argument('--stats',
|
||||
help='Output file should contain statistics', action='store_true')
|
||||
|
||||
parser.add_argument('--sort-by',
|
||||
help="Sort by a this column (index)", type=int, default=-1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user