diff options
author | Patrick Simianer <p@simianer.de> | 2015-05-29 09:20:12 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2015-05-29 09:20:12 +0200 |
commit | 79ffc2ecbe7fb47ceac1143f81f9d3311f02fcc6 (patch) | |
tree | 4ed1b5b8569ba59f534fc1948ad7d903be9e2663 /tf-idf | |
parent | 181c0bd79b0e7db2891047305dc87d20ca04097b (diff) |
tf-idf: glob handling
Diffstat (limited to 'tf-idf')
-rwxr-xr-x | tf-idf | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -20,7 +20,13 @@ def main end docs = {} - cfg[:documents].each { |i| + a = [] + if cfg[:documents].strip[0] == "*" + ad = Dir.glob(cfg[:documents]) + else + ad = cfg[:documents].split + end + ad.each { |i| if cfg[:one_item_per_line] docs[i] = ReadFile.readlines_strip i else |