Class: CharDet::SBCSGroupProber

Inherits:
CharSetGroupProber show all
Defined in:
lib/rchardet/sbcsgroupprober.rb

Instance Attribute Summary

Attributes inherited from CharSetGroupProber

#_mProbers

Attributes inherited from CharSetProber

#active

Instance Method Summary collapse

Methods inherited from CharSetGroupProber

#feed, #get_charset_name, #get_confidence, #reset

Methods inherited from CharSetProber

#feed, #filter_high_bit_only, #filter_with_english_letters, #filter_without_english_letters, #get_charset_name, #get_confidence, #get_state, #reset

Constructor Details

#initializeSBCSGroupProber

Returns a new instance of SBCSGroupProber.



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/rchardet/sbcsgroupprober.rb', line 32

def initialize
  super
  @_mProbers = [ 
	SingleByteCharSetProber.new(Win1251CyrillicModel),
	SingleByteCharSetProber.new(Koi8rModel),
	SingleByteCharSetProber.new(Latin5CyrillicModel),
	SingleByteCharSetProber.new(MacCyrillicModel),
	SingleByteCharSetProber.new(Ibm866Model),
	SingleByteCharSetProber.new(Ibm855Model),
	SingleByteCharSetProber.new(Latin7GreekModel),
	SingleByteCharSetProber.new(Win1253GreekModel),
	SingleByteCharSetProber.new(Latin5BulgarianModel),
	SingleByteCharSetProber.new(Win1251BulgarianModel),
	SingleByteCharSetProber.new(Latin2HungarianModel),
	SingleByteCharSetProber.new(Win1250HungarianModel),
	SingleByteCharSetProber.new(TIS620ThaiModel),
  ]
  hebrewProber = HebrewProber.new()
  logicalHebrewProber = SingleByteCharSetProber.new(Win1255HebrewModel, false, hebrewProber)
  visualHebrewProber = SingleByteCharSetProber.new(Win1255HebrewModel, true, hebrewProber)
  hebrewProber.set_model_probers(logicalHebrewProber, visualHebrewProber)
  @_mProbers += [hebrewProber, logicalHebrewProber, visualHebrewProber]

  reset()
end