From 50bbf29fa49e695e721724a137ff4695eea87906 Mon Sep 17 00:00:00 2001 From: Michael Denkowski Date: Mon, 8 Apr 2013 13:08:04 -0400 Subject: online wasn't getting set --- python/pkg/cdec/sa/extract.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python/pkg') 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 '{}{}'.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,)) -- cgit v1.2.3