diff options
author | Chris Dyer <cdyer@Chriss-MacBook-Air.local> | 2013-04-19 17:06:46 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@Chriss-MacBook-Air.local> | 2013-04-19 17:06:46 -0400 |
commit | bf210ed85173c3934a6042ce3ceff0bbe1048354 (patch) | |
tree | f030b78bb03d4c59f6989a2a0356e171a240dd59 /python/pkg | |
parent | a42fa0eb8b75ebac19b1c3c68f4b435b949bf184 (diff) | |
parent | 8908a545eedb59d771f0a4f964035b829e486b10 (diff) |
Merge branch 'master' of https://github.com/redpony/cdec
Diffstat (limited to 'python/pkg')
-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,)) |