From b31ace79ea5f6b3f279c544cd3a443d6fbf2a24d Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 26 Feb 2026 10:05:59 +0000 Subject: overhaul --- repetition-rate | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'repetition-rate') diff --git a/repetition-rate b/repetition-rate index 87938ae..12e0fab 100755 --- a/repetition-rate +++ b/repetition-rate @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require 'zipf' +require "zipf" windows = [] cur = [] @@ -9,7 +9,7 @@ while line = STDIN.gets if cur_sz >= 1000 windows << cur cur = [] - cur_sz = 0 + cur_sz = 0 end cur << line.strip cur_sz += cur.last.split.size @@ -37,8 +37,7 @@ windows.each { |w| rr = 1.0 enums.each_with_index { |i,j| - rr *= i/denoms[j] + rr *= i/denoms[j] } puts ((rr**0.25)*100).round 2 - -- cgit v1.2.3