diff options
| author | Patrick Simianer <patrick@lilt.com> | 2026-02-26 10:05:59 +0000 |
|---|---|---|
| committer | Patrick Simianer <patrick@lilt.com> | 2026-02-26 10:05:59 +0000 |
| commit | b31ace79ea5f6b3f279c544cd3a443d6fbf2a24d (patch) | |
| tree | 31f2b599fa5f6996aeb134390d58deb63eefe04a /tf-idf | |
| parent | 8805e95ae94d798c6441f7e1b72c90e049563f17 (diff) | |
Diffstat (limited to 'tf-idf')
| -rwxr-xr-x | tf-idf | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 - |
