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 | 5b4d7fd72b7662e38eccf9ff46192742128be7db (patch) | |
tree | 914ee3e49747c312bfe75f7cb058cae2d93d2969 | |
parent | 729a657afd23d772172540a9f7b22a756eccc960 (diff) |
online wasn't getting set
-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,)) |