diff options
author | Michael Denkowski <michael.j.denkowski@gmail.com> | 2013-04-08 13:08:04 -0400 |
---|---|---|
committer | Michael Denkowski <michael.j.denkowski@gmail.com> | 2013-04-08 13:08:04 -0400 |
commit | 50bbf29fa49e695e721724a137ff4695eea87906 (patch) | |
tree | 505cbd82228b9baf1cd65f68f35b1308f946190e /python/pkg/cdec/sa/extract.py | |
parent | 2e11b28f7d739aad97e6db9507274c625d807ea9 (diff) |
online wasn't getting set
Diffstat (limited to 'python/pkg/cdec/sa/extract.py')
-rw-r--r-- | python/pkg/cdec/sa/extract.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python/pkg/cdec/sa/extract.py b/python/pkg/cdec/sa/extract.py index 782bed8b..bf39d080 100644 --- a/python/pkg/cdec/sa/extract.py +++ b/python/pkg/cdec/sa/extract.py @@ -62,6 +62,7 @@ def extract(inp): return '<seg grammar="{}" id="{}">{}</seg>{}'.format(grammar_file, i, sentence, suffix) def main(): + global online logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser(description='Extract grammars from a compiled corpus.') parser.add_argument('-c', '--config', required=True, @@ -88,6 +89,8 @@ def main(): ' should be a python module\n'.format(featdef)) sys.exit(1) + online = args.online + if args.jobs > 1: logging.info('Starting %d workers; chunk size: %d', args.jobs, args.chunksize) pool = mp.Pool(args.jobs, make_extractor, (args,)) |