rubyplb 0.2.4.1 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/rubyplb +1 -0
- data/lib/rubyplb.rb +8 -3
- data/rubyplb.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/bin/rubyplb
CHANGED
data/lib/rubyplb.rb
CHANGED
@@ -4,10 +4,15 @@
|
|
4
4
|
## Copyright:: Copyright 2009 Kow Kuroda and Yoichiro Hasebe
|
5
5
|
## License:: GNU GPL version 3
|
6
6
|
|
7
|
-
|
7
|
+
# -*- coding: utf-8 -*-
|
8
8
|
|
9
9
|
require 'ruby_graphviz'
|
10
10
|
|
11
|
+
## load ary_with_combination if not Ruby 1.9.x
|
12
|
+
unless Array.instance_methods.index("combination")
|
13
|
+
require 'ary_with_combination'
|
14
|
+
end
|
15
|
+
|
11
16
|
def showerror(sentence, severity)
|
12
17
|
if severity == 0
|
13
18
|
puts "Warning: #{sentence} The output may not be meaningful."
|
@@ -255,12 +260,12 @@ class PatLattice
|
|
255
260
|
end
|
256
261
|
end
|
257
262
|
end
|
258
|
-
zscore = ((zscore * 100).round / 100.0)
|
263
|
+
zscore = ((zscore * 100).round / 100.0).to_s
|
259
264
|
border = "0"
|
260
265
|
pat_str = node.data.collect{|td|"<td color='black'>#{td}</td>"}.join
|
261
266
|
pat_str = " " * 5 if pat_str == ""
|
262
267
|
label = "<<table bgcolor='#{color}' border='#{border}' cellborder='1' cellspacing='0' cellpadding='5'>" +
|
263
|
-
"<tr>#{pat_str}</tr>"
|
268
|
+
"<tr>#{pat_str}(#{zscore})</tr>"
|
264
269
|
if !@opts[:simple]
|
265
270
|
label += "<tr><td color='black' colspan='#{node.data.size.to_s}'> "
|
266
271
|
if node.level != 0 and node.children_instances > 0
|
data/rubyplb.gemspec
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rubyplb}
|
8
|
-
s.version = "0.2.
|
9
|
-
s.required_ruby_version = ">=1.8.
|
8
|
+
s.version = "0.2.5"
|
9
|
+
s.required_ruby_version = ">=1.8.6"
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kow Kuroda", "Yoichiro Hasebe"]
|
12
12
|
s.date = %q{2009-09-05}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyplb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kow Kuroda
|
@@ -60,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.8.
|
63
|
+
version: 1.8.6
|
64
64
|
version:
|
65
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|