diff options
author | Michael Denkowski <mdenkows@cs.cmu.edu> | 2013-09-30 23:34:04 -0700 |
---|---|---|
committer | Michael Denkowski <mdenkows@cs.cmu.edu> | 2013-09-30 23:34:04 -0700 |
commit | a3e2bf2d32a0a227e04e26625c256f1d542ce39a (patch) | |
tree | db45d5849e8d1a748691ca509d83fa7d0369a37a /realtime | |
parent | ddbd0a5fb4a6edc6728e1ba8e9bd7c82186958ac (diff) |
Loading state moved to command, specific to context
Diffstat (limited to 'realtime')
-rwxr-xr-x | realtime/realtime.py | 1 | ||||
-rw-r--r-- | realtime/rt/rt.py | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/realtime/realtime.py b/realtime/realtime.py index af3a3aba..be02d486 100755 --- a/realtime/realtime.py +++ b/realtime/realtime.py @@ -57,7 +57,6 @@ 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 (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') diff --git a/realtime/rt/rt.py b/realtime/rt/rt.py index 40305f66..43cc43b4 100644 --- a/realtime/rt/rt.py +++ b/realtime/rt/rt.py @@ -56,7 +56,7 @@ class RealtimeDecoder: class RealtimeTranslator: '''Main entry point into API: serves translations to any number of concurrent users''' - def __init__(self, configdir, tmpdir='/tmp', cache_size=5, norm=False, state=None): + def __init__(self, configdir, tmpdir='/tmp', cache_size=5, norm=False): # name -> (method, set of possible nargs) self.COMMANDS = { @@ -117,11 +117,6 @@ class RealtimeTranslator: self.decoders = {} - # Load state if given - if state: - with open(state) as input: - self.load_state(input) - def __enter__(self): return self |