summaryrefslogtreecommitdiff
path: root/python/pkg/cdec
diff options
context:
space:
mode:
authorMichael Denkowski <michael.j.denkowski@gmail.com>2013-04-08 13:08:04 -0400
committerMichael Denkowski <michael.j.denkowski@gmail.com>2013-04-08 13:08:04 -0400
commit5b4d7fd72b7662e38eccf9ff46192742128be7db (patch)
tree914ee3e49747c312bfe75f7cb058cae2d93d2969 /python/pkg/cdec
parent729a657afd23d772172540a9f7b22a756eccc960 (diff)
online wasn't getting set
Diffstat (limited to 'python/pkg/cdec')
-rw-r--r--python/pkg/cdec/sa/extract.py3
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,))