summaryrefslogtreecommitdiff
path: root/tf-idf
diff options
context:
space:
mode:
Diffstat (limited to 'tf-idf')
-rwxr-xr-xtf-idf8
1 files changed, 7 insertions, 1 deletions
diff --git a/tf-idf b/tf-idf
index 450de6b..dde2fd5 100755
--- a/tf-idf
+++ b/tf-idf
@@ -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