summaryrefslogtreecommitdiff
path: root/realtime/realtime.py
diff options
context:
space:
mode:
authorMichael Denkowski <mdenkows@cs.cmu.edu>2013-09-05 11:27:08 -0700
committerMichael Denkowski <mdenkows@cs.cmu.edu>2013-09-05 11:27:08 -0700
commit40688c6c8ac48c809e1b4f1fa10d93144620dead (patch)
tree4fc074e09e509969e348917ce13f55c82b2c15fa /realtime/realtime.py
parent65e999da12ea6d88e7703a89932b30b9ccbfcdb6 (diff)
Option for text normalization
Diffstat (limited to 'realtime/realtime.py')
-rwxr-xr-xrealtime/realtime.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/realtime/realtime.py b/realtime/realtime.py
index eeaca0f4..dff7e90c 100755
--- a/realtime/realtime.py
+++ b/realtime/realtime.py
@@ -17,6 +17,7 @@ def main():
parser = Parser(description='Real-time adaptive translation with cdec.')
parser.add_argument('-c', '--config', required=True, help='Config directory (see README.md)')
+ 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')
parser.add_argument('-v', '--verbose', help='Info to stderr', action='store_true')
@@ -25,7 +26,7 @@ def main():
if args.verbose:
logging.basicConfig(level=logging.INFO)
- rtd = rt.RealtimeDecoder(args.config, tmpdir=args.temp, cache_size=int(args.cache))
+ rtd = rt.RealtimeDecoder(args.config, tmpdir=args.temp, cache_size=int(args.cache), norm=args.normalize)
try:
while True: