fBayes 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.DS_Store +0 -0
- data/VERSION +1 -1
- data/fBayes.gemspec +1 -1
- data/lib/.DS_Store +0 -0
- data/lib/data/internalTurnk/.DS_Store +0 -0
- data/lib/data/internalTurnk/classifier.rb +8 -6
- data/lib/data/sr24/.DS_Store +0 -0
- metadata +2 -2
data/.DS_Store
CHANGED
Binary file
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.0
|
data/fBayes.gemspec
CHANGED
data/lib/.DS_Store
CHANGED
Binary file
|
Binary file
|
@@ -18,13 +18,15 @@ class InternalTurnk
|
|
18
18
|
|
19
19
|
def c(word)
|
20
20
|
result = sorted_classification(word)
|
21
|
-
value_of_classification = result.last
|
22
|
-
category_of_classification = result.first
|
21
|
+
value_of_classification = result.first.last
|
22
|
+
category_of_classification = result.first.first
|
23
23
|
|
24
|
-
if value_of_classification
|
25
|
-
return
|
26
|
-
|
24
|
+
if value_of_classification >= value_of_missing_info
|
25
|
+
return category_of_classification
|
26
|
+
elsif (result[0].last - result[1].last) >= 0.5
|
27
27
|
return category_of_classification
|
28
|
+
else
|
29
|
+
return "Unknown"
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
@@ -39,7 +41,7 @@ class InternalTurnk
|
|
39
41
|
end
|
40
42
|
|
41
43
|
def sorted_classification(word)
|
42
|
-
@classifier.classifications(word).sort_by { |_key, value| value }.reverse
|
44
|
+
@classifier.classifications(word).sort_by { |_key, value| value }.reverse
|
43
45
|
end
|
44
46
|
|
45
47
|
def categories_path
|
data/lib/data/sr24/.DS_Store
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fBayes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -199,7 +199,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
199
|
version: '0'
|
200
200
|
segments:
|
201
201
|
- 0
|
202
|
-
hash:
|
202
|
+
hash: 375197087193189777
|
203
203
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
204
|
none: false
|
205
205
|
requirements:
|