summaryrefslogtreecommitdiff
path: root/split-lines
diff options
context:
space:
mode:
Diffstat (limited to 'split-lines')
-rwxr-xr-xsplit-lines14
1 files changed, 14 insertions, 0 deletions
diff --git a/split-lines b/split-lines
new file mode 100755
index 0000000..14b3a0f
--- /dev/null
+++ b/split-lines
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+
+require 'zipf'
+
+dir = ARGV[0]
+i = 0
+while line = STDIN.gets
+ src, tgt = line.split " ||| "
+ f = WriteFile.new "#{dir}/#{i}.src"
+ f.write line
+ f.close
+ i += 1
+end
+