From 8151031373c08ccd714a99f50783eafcb54d2010 Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Wed, 10 Jun 2015 14:48:34 +0200
Subject: undo unfortunate variable naming: cfg -> conf!
---
norm_german | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'norm_german')
diff --git a/norm_german b/norm_german
index ef0408e..cf9c060 100755
--- a/norm_german
+++ b/norm_german
@@ -7,7 +7,7 @@ STDIN.set_encoding 'utf-8'
STDOUT.set_encoding 'utf-8'
-cfg = Trollop::options do
+conf = Trollop::options do
banner "norm_german < "
opt :upper, "uppercase", :type => :bool, :default => false
opt :threads, "#threads", :type => :int, :default => 1, :short => '-h'
@@ -18,7 +18,7 @@ end
pairs_lower = [ ['ß','ss'], ['ue', 'ü'], ['ae','ä'], ['oe', 'ö'] ]
pairs_upper = [ ['Ä', 'Ae'], ['Ö', 'Oe'], ['Ü', 'Ue'] ]
-if cfg[:upper]
+if conf[:upper]
PAIRS = pairs_lower
else
PAIRS = pairs_lower+pairs_upper
@@ -58,7 +58,7 @@ while tok = STDIN.gets
token_stock << [] if !token_stock[thread_n]
token_stock[thread_n] << tok.strip!
counter += 1
- if token_stock[thread_n].size%cfg[:shard_size]==0
+ if token_stock[thread_n].size%conf[:shard_size]==0
STDERR.write "Starting thread ##{thread_n}\n"
threads << Thread.new(token_stock[thread_n]) { |tokens|
th = build_partial tokens
@@ -71,7 +71,7 @@ while tok = STDIN.gets
else
next
end
- if thread_n==cfg[:threads]
+ if thread_n==conf[:threads]
threads.each { |i| i.join }
token_stock.each { |i| i.clear }
thread_n = 0
--
cgit v1.2.3