Class: UniversalDetector::SBCSGroupProber

Inherits:
CharSetGroupProber show all
Defined in:
lib/SBCSGroupProber.rb

Instance Attribute Summary collapse

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.



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/SBCSGroupProber.rb', line 45

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 = @mProbers + [hebrewProber, logicalHebrewProber, visualHebrewProber]

    reset()
end

Instance Attribute Details

#mProbersObject (readonly)

Returns the value of attribute mProbers.



43
44
45
# File 'lib/SBCSGroupProber.rb', line 43

def mProbers
  @mProbers
end