diff options
author | Patrick Simianer <p@simianer.de> | 2017-12-14 22:47:21 +0000 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2017-12-14 22:47:21 +0000 |
commit | bda3b2633935b3e217b17406ed0a379ffb97c2a1 (patch) | |
tree | c48b020750d6f584268b52f8589d727d388351fa /length-ratio | |
parent | ab0f845d69b18905915863769facc238090a273c (diff) |
length-ratio
Diffstat (limited to 'length-ratio')
-rwxr-xr-x | length-ratio | 12 |
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 + |