summaryrefslogtreecommitdiff
path: root/tf-idf
diff options
context:
space:
mode:
Diffstat (limited to 'tf-idf')
-rwxr-xr-xtf-idf9
1 files changed, 4 insertions, 5 deletions
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
-