summaryrefslogtreecommitdiff
path: root/length-ratio
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2017-12-14 22:47:21 +0000
committerPatrick Simianer <p@simianer.de>2017-12-14 22:47:21 +0000
commitbda3b2633935b3e217b17406ed0a379ffb97c2a1 (patch)
treec48b020750d6f584268b52f8589d727d388351fa /length-ratio
parentab0f845d69b18905915863769facc238090a273c (diff)
length-ratio
Diffstat (limited to 'length-ratio')
-rwxr-xr-xlength-ratio12
1 files changed, 12 insertions, 0 deletions
diff --git a/length-ratio b/length-ratio
new file mode 100755
index 0000000..4b4432d
--- /dev/null
+++ b/length-ratio
@@ -0,0 +1,12 @@
+#!/usr/bin/env ruby
+
+require 'zipf'
+
+a = ReadFile.new ARGV[0]
+b = ReadFile.new ARGV[1]
+
+while linea = a.gets
+ lineb = b.gets
+ puts linea.strip.split.size.to_f / lineb.strip.split.size.to_f
+end
+