From b31ace79ea5f6b3f279c544cd3a443d6fbf2a24d Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Thu, 26 Feb 2026 10:05:59 +0000 Subject: overhaul --- tf-idf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tf-idf') diff --git a/tf-idf b/tf-idf index 22c3dac..02f4c7b 100755 --- a/tf-idf +++ b/tf-idf @@ -1,7 +1,7 @@ #!/usr/bin/env ruby -require 'zipf' -require 'optimist' +require "zipf" +require "optimist" def main conf = Optimist::options do @@ -15,8 +15,8 @@ def main stopwords = [] if conf[:filter_stopwords] stopwords = ReadFile.readlines(conf[:filter_stopwords]).map{ |i| - i.split('|').first.strip - }.reject{ |i| i=='' } + i.split("|").first.strip + }.reject{ |i| i=="" } end docs = {} @@ -54,4 +54,3 @@ def main end main - -- cgit v1.2.3