diff options
author | Michael Denkowski <mdenkows@cs.cmu.edu> | 2013-08-01 13:03:20 -0700 |
---|---|---|
committer | Michael Denkowski <mdenkows@cs.cmu.edu> | 2013-08-01 13:03:20 -0700 |
commit | 3c495d2b8664f292aedda8235eb8bf375830700c (patch) | |
tree | c9a9464a94be05f75bd50d62adee094d0eca059f /word-aligner/force_align.py | |
parent | 8730f338e6bd0e361d9f6ff574a7000042e984d2 (diff) |
Be less dumb about parsing fields
Diffstat (limited to 'word-aligner/force_align.py')
-rwxr-xr-x | word-aligner/force_align.py | 4 |
1 files changed, 2 insertions, 2 deletions
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()) |