rchardet 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rchardet/chardistribution.rb +9 -1
- data/lib/rchardet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ac135771ad7fdcd19002eecbcc41ff1dbc561a1
|
4
|
+
data.tar.gz: 4fe1aae4676d0b89095cc8132f500be8f04cf65f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3346de92a1674175a08c7bc4098c8ad7e703ad352535015ea22dcaf50a4198d310d7889990411a7e9353f3e8f400342d40264c5e3d5ab91d41b5607e5b7870b
|
7
|
+
data.tar.gz: 7b89ed96df682956a90b8c7ffd72573dcd1fde4c03fb2196bbd808a34dd98124fac940dbe7216c1169908b0a306747c84cf51caa29bc6aaef85369751cdede0f
|
@@ -68,7 +68,7 @@ module CharDet
|
|
68
68
|
def get_confidence
|
69
69
|
# """return confidence based on existing data"""
|
70
70
|
# if we didn't receive any character in our consideration range, return negative answer
|
71
|
-
if @totalChars <= 0
|
71
|
+
if @totalChars <= 0
|
72
72
|
return SURE_NO
|
73
73
|
end
|
74
74
|
|
@@ -117,6 +117,14 @@ module CharDet
|
|
117
117
|
return -1
|
118
118
|
end
|
119
119
|
end
|
120
|
+
|
121
|
+
def get_confidence
|
122
|
+
if @freqChars <= MINIMUM_DATA_THRESHOLD
|
123
|
+
return SURE_NO
|
124
|
+
end
|
125
|
+
|
126
|
+
super
|
127
|
+
end
|
120
128
|
end
|
121
129
|
|
122
130
|
class EUCKRDistributionAnalysis < CharDistributionAnalysis
|
data/lib/rchardet/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rchardet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-06-15 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|