summaryrefslogtreecommitdiff
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
commit6fb6d64e8191912ed80a652175ccf4e7ce9c0b00 (patch)
tree57fee2735bcc7674f33227e64aef65a1f24e089f
parent901e9d8e96a03d8998cf3732b90296156e233751 (diff)
Flush each line
-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()