summaryrefslogtreecommitdiff
path: root/realtime/realtime.py
diff options
context:
space:
mode:
authorMichael Denkowski <mdenkows@cs.cmu.edu>2013-10-01 14:08:05 -0700
committerMichael Denkowski <mdenkows@cs.cmu.edu>2013-10-01 14:08:05 -0700
commit51a83643d95ab0d7add9dd66b0b38044db10a797 (patch)
tree7413fc7a105c1a1f9a3d0a2fb2f25d34640d8c8c /realtime/realtime.py
parent4830491825f0c8740d505c192d60b388f64acf1b (diff)
Better logging, save/load to default context
Diffstat (limited to 'realtime/realtime.py')
-rwxr-xr-xrealtime/realtime.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/realtime/realtime.py b/realtime/realtime.py
index be02d486..6ee785f8 100755
--- a/realtime/realtime.py
+++ b/realtime/realtime.py
@@ -57,6 +57,7 @@ def main():
parser = Parser(description='Real-time adaptive translation with cdec. (See README.md)')
parser.add_argument('-c', '--config', required=True, help='Config directory')
+ parser.add_argument('-s', '--state', help='Load state file to default context (saved incremental data)')
parser.add_argument('-n', '--normalize', help='Normalize text (tokenize, translate, detokenize)', action='store_true')
parser.add_argument('-T', '--temp', help='Temp directory (default /tmp)', default='/tmp')
parser.add_argument('-a', '--cache', help='Grammar cache size (default 5)', default='5')
@@ -74,6 +75,10 @@ def main():
debug(translator, args.debug_test)
return
+ # Load state if given
+ if args.state:
+ rtd.load_state(state)
+
# Read lines and commands
while True:
line = sys.stdin.readline()