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
commit074fa88375967adababc632ea763e9dea389831e (patch)
tree0c2e7ef5e2df8496f7b153f8d119414c3b096004 /realtime/rt
parenta1d78e9ba97af7d3b442a2b8759035a0c6f6b35a (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)