summaryrefslogtreecommitdiff
path: root/word-aligner
diff options
context:
space:
mode:
authormjdenkowski <michael.j.denkowski@gmail.com>2013-12-04 14:43:50 -0500
committermjdenkowski <michael.j.denkowski@gmail.com>2013-12-04 14:43:50 -0500
commit45d094ed4520b87372ad6a4afb06e23d752129d7 (patch)
treea2ba54d81382c7f1579e871fe75ff12fac34b66a /word-aligner
parent52fcde1cdffbefee730bb90e535c54c9d426f6d3 (diff)
Flush each line
Diffstat (limited to 'word-aligner')
-rwxr-xr-xword-aligner/force_align.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/word-aligner/force_align.py b/word-aligner/force_align.py
index d5d59d11..8386e6a5 100755
--- a/word-aligner/force_align.py
+++ b/word-aligner/force_align.py
@@ -21,9 +21,13 @@ def main():
sys.exit(2)
aligner = ForceAligner(*sys.argv[1:])
-
- for line in sys.stdin:
+
+ while True:
+ line = sys.stdin.readline()
+ if not line:
+ break
sys.stdout.write('{}\n'.format(aligner.align_formatted(line.strip())))
+ sys.stdout.flush()
aligner.close()