summaryrefslogtreecommitdiff
path: root/ng
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-06-10 14:48:34 +0200
committerPatrick Simianer <p@simianer.de>2015-06-10 14:48:34 +0200
commit8151031373c08ccd714a99f50783eafcb54d2010 (patch)
tree1bcf6e78392978f4ae972a5dcc936a4c266f3d78 /ng
parente137509a77e3a8c12af32852ebba893dacb53f85 (diff)
undo unfortunate variable naming: cfg -> conf!
Diffstat (limited to 'ng')
-rwxr-xr-xng6
1 files changed, 3 insertions, 3 deletions
diff --git a/ng b/ng
index 0a29898..7a3552f 100755
--- a/ng
+++ b/ng
@@ -3,7 +3,7 @@
require 'zipf'
require 'trollop'
-cfg = Trollop::options do
+conf = Trollop::options do
banner "ng < <input>"
opt :n, "n for Ngrams", :type => :int, :default => 4
opt :fix, "Don't output lower order Ngrams.", :type => :bool, :default => false
@@ -12,8 +12,8 @@ end
while line = STDIN.gets
a = []
- ngrams(line, cfg[:n], cfg[:fix]) { |ng| a << ng.join(' ') }
+ ngrams(line, conf[:n], conf[:fix]) { |ng| a << ng.join(' ') }
a.reject! { |i| i.strip.size==0 }
- puts a.join cfg[:separator] if a.size>0
+ puts a.join conf[:separator] if a.size>0
end