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
+