summaryrefslogtreecommitdiff
path: root/word-aligner/force_align.py
diff options
context:
space:
mode:
authorMichael Denkowski <mdenkows@cs.cmu.edu>2013-08-01 13:03:20 -0700
committerMichael Denkowski <mdenkows@cs.cmu.edu>2013-08-01 13:03:20 -0700
commit3c495d2b8664f292aedda8235eb8bf375830700c (patch)
treec9a9464a94be05f75bd50d62adee094d0eca059f /word-aligner/force_align.py
parent8730f338e6bd0e361d9f6ff574a7000042e984d2 (diff)
Be less dumb about parsing fields
Diffstat (limited to 'word-aligner/force_align.py')
-rwxr-xr-xword-aligner/force_align.py4
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())