summaryrefslogtreecommitdiff
path: root/python/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'python/pkg')
-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,))