Improvement on download_dependencies.py
+import argparse
import os
import shutil
import sys
@@ -203,9 +204,18 @@ def copy_opennlp():
if __name__ == '__main__':
+ parser = argparse.ArgumentParser(description='Download all dependencies needed by ModernMT system.')
+ parser.add_argument('--skip-kafka', dest='skip_kafka', action='store_true', default=False,
+ help='skip Apache Kafka download')
+ parser.add_argument('--skip-cassandra', dest='skip_cassandra', action='store_true', default=False,
+ help='skip Apache Cassandra download')
+
+ args = parser.parse_args()
+
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) # reopen stdout in unbuffered mode
- args = sys.argv
+ if not args.skip_cassandra:
download_cassandra()
+ if not args.skip_kafka:
download_kafka()
copy_opennlp()
