summaryrefslogtreecommitdiff
path: root/realtime/rt
diff options
context:
space:
mode:
authormjdenkowski <michael.j.denkowski@gmail.com>2013-10-30 23:37:39 -0400
committermjdenkowski <michael.j.denkowski@gmail.com>2013-10-30 23:37:39 -0400
commitdb0dcd780abea416cfdb2b2382152dbe11c35170 (patch)
tree17f629c1c3463d048d3d1dabb19ce94fbd1e5696 /realtime/rt
parent27b9d82c5ef261a313c6bbaaf838ad292b631d8b (diff)
Specify heuristic for force alignment
Diffstat (limited to 'realtime/rt')
-rw-r--r--realtime/rt/aligner.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/realtime/rt/aligner.py b/realtime/rt/aligner.py
index c34805eb..e1782496 100644
--- a/realtime/rt/aligner.py
+++ b/realtime/rt/aligner.py
@@ -10,7 +10,7 @@ logger = logging.getLogger('rt.aligner')
class ForceAligner:
- def __init__(self, fwd_params, fwd_err, rev_params, rev_err):
+ def __init__(self, fwd_params, fwd_err, rev_params, rev_err, heuristic='grow-diag-final-and'):
cdec_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
fast_align = os.path.join(cdec_root, 'word-aligner', 'fast_align')
@@ -21,7 +21,7 @@ class ForceAligner:
fwd_cmd = [fast_align, '-i', '-', '-d', '-T', fwd_T, '-m', fwd_m, '-f', fwd_params]
rev_cmd = [fast_align, '-i', '-', '-d', '-T', rev_T, '-m', rev_m, '-f', rev_params, '-r']
- tools_cmd = [atools, '-i', '-', '-j', '-', '-c', 'grow-diag-final-and']
+ tools_cmd = [atools, '-i', '-', '-j', '-', '-c', heuristic]
logger.info('Executing: {}'.format(' '.join(fwd_cmd)))
self.fwd_align = util.popen_io(fwd_cmd)