rchardet 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e0a3b0bb7881776633855ef0a6790cfbdedf193
4
- data.tar.gz: 9b9cee498bfec199536fb893dc54fef5c243fa0c
3
+ metadata.gz: 6a05228d2887d6bc51cbd0140c74477a5198df33
4
+ data.tar.gz: f085062031d1d75d0bb7d2345d18367ba6107151
5
5
  SHA512:
6
- metadata.gz: 4390fbcd959d87f9980042fed4dd428e1824e624fbb6e52c1f95dccdba62bbc82a57eccb931db9ed36decc05391ba4cedb79a76de976b929f7a124fe90480a32
7
- data.tar.gz: 53855b2e3388241884a338068c556f7ccd5260d01406a3f76b3295bb7f5f0450fddedd2ebec4c1fd52e7f4d5835578ae346b48712547a254339baeca0089499d
6
+ metadata.gz: ecd22fbc48051db9e34e5bd97e8f0c2a6dc5fbc13c3704b27b6a33985a273697ef55af32afdafeeda554ee228cc58dc8e995aa16e5ea9a8c905823acb51966ac
7
+ data.tar.gz: 6ee7960a06a3d11885746a08c47421e2746e6c00b8f4642eca615716ef0ffec20b604f7b4ed971c703232274f298ca96bcb4b2ffdb9fdeeb458555877954f801
@@ -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 || @freqChars <= MINIMUM_DATA_THRESHOLD
72
72
  return SURE_NO
73
73
  end
74
74
 
@@ -31,7 +31,6 @@ module CharDet
31
31
  DONT_KNOW = -1
32
32
  ENOUGH_REL_THRESHOLD = 100
33
33
  MAX_REL_THRESHOLD = 1000
34
- MINIMUM_DATA_THRESHOLD = 4
35
34
 
36
35
  # This is hiragana 2-char sequence table, the number in each cell represents its frequency category
37
36
  JP2_CHAR_CONTEXT = [
@@ -29,6 +29,7 @@
29
29
  ######################### END LICENSE BLOCK #########################
30
30
 
31
31
  module CharDet
32
+ MINIMUM_DATA_THRESHOLD = 4
32
33
  MINIMUM_THRESHOLD = 0.20
33
34
  EPureAscii = 0
34
35
  EEscAscii = 1
@@ -1,3 +1,3 @@
1
1
  module CharDet
2
- VERSION = "1.5.0"
2
+ VERSION = "1.6.0"
3
3
  end
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.5.0
4
+ version: 1.6.0
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: 2014-11-26 00:00:00.000000000 Z
12
+ date: 2015-01-21 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: