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 | f4a3a2547316ca5d31366e6808858fe94981415c (patch) | |
tree | ab0e07bc2fde49d8a39236fb363395bc795b3fc8 /word-aligner | |
parent | af7e77d1273fa378ea19bb8607b9afbf77d41065 (diff) |
Be less dumb about parsing fields
Diffstat (limited to 'word-aligner')
-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()) |