diff options
author | Patrick Simianer <p@simianer.de> | 2013-11-13 18:12:10 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2013-11-13 18:12:10 +0100 |
commit | d6e6babf2cfe49fed040b651624b7e34d1a9b507 (patch) | |
tree | 2a00ab18f10a7f93e7e172551c01b48cc9f20b8c /word-aligner/force_align.py | |
parent | 2d2d5eced93d58bc77894d8c328195cd9950b96d (diff) | |
parent | 8a24bb77bc2e9fd17a6f6529a2942cde96a6af49 (diff) |
merge w/ upstream
Diffstat (limited to 'word-aligner/force_align.py')
-rwxr-xr-x | word-aligner/force_align.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/word-aligner/force_align.py b/word-aligner/force_align.py index 6721dacb..b03d446e 100755 --- a/word-aligner/force_align.py +++ b/word-aligner/force_align.py @@ -5,18 +5,20 @@ import sys def main(): - if len(sys.argv[1:]) != 4: + if len(sys.argv[1:]) < 4: sys.stderr.write('run:\n') sys.stderr.write(' fast_align -i corpus.f-e -d -v -o -p fwd_params >fwd_align 2>fwd_err\n') sys.stderr.write(' fast_align -i corpus.f-e -r -d -v -o -p rev_params >rev_align 2>rev_err\n') sys.stderr.write('\n') sys.stderr.write('then run:\n') - sys.stderr.write(' {} fwd_params fwd_err rev_params rev_err <in.f-e >out.f-e.gdfa\n'.format(sys.argv[0])) + sys.stderr.write(' {} fwd_params fwd_err rev_params rev_err [heuristic] <in.f-e >out.f-e.gdfa\n'.format(sys.argv[0])) + sys.stderr.write('\n') + sys.stderr.write('where heuristic is one of: (intersect union grow-diag grow-diag-final grow-diag-final-and) default=grow-diag-final-and\n') sys.exit(2) # Hook into realtime sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'realtime')) - from rt import ForceAligner + from rt.aligner import ForceAligner aligner = ForceAligner(*sys.argv[1:]) |