From 3c495d2b8664f292aedda8235eb8bf375830700c Mon Sep 17 00:00:00 2001 From: Michael Denkowski Date: Thu, 1 Aug 2013 13:03:20 -0700 Subject: Be less dumb about parsing fields --- word-aligner/force_align.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'word-aligner') diff --git a/word-aligner/force_align.py b/word-aligner/force_align.py index f404fb54..a0c1aad7 100755 --- a/word-aligner/force_align.py +++ b/word-aligner/force_align.py @@ -39,8 +39,8 @@ def main(): f_a.stdin.write(line) r_a.stdin.write(line) # f words ||| e words ||| links ||| score - f_line = f_a.stdout.readline().split(' ||| ')[2] - r_line = r_a.stdout.readline().split(' ||| ')[2] + f_line = f_a.stdout.readline().split('|||')[2].strip() + r_line = r_a.stdout.readline().split('|||')[2].strip() tools.stdin.write('{}\n'.format(f_line)) tools.stdin.write('{}\n'.format(r_line)) sys.stdout.write(tools.stdout.readline()) -- cgit v1.2.3