Class: UniversalDetector::CharSetProber

Inherits:
Object
  • Object
show all
Defined in:
lib/CharSetProber.rb

Instance Method Summary collapse

Instance Method Details

#feed(data) ⇒ Object



42
43
# File 'lib/CharSetProber.rb', line 42

def feed(data)
end

#filter_high_bit_only(aBuf) ⇒ Object



53
54
55
56
# File 'lib/CharSetProber.rb', line 53

def filter_high_bit_only(aBuf)
    aBuf = aBuf.gsub(/([\x00-\x7F])+/, '')
    return aBuf
end

#filter_with_english_letters(aBuf) ⇒ Object



63
64
65
66
# File 'lib/CharSetProber.rb', line 63

def filter_with_english_letters(aBuf)
    # TODO
    return aBuf
end

#filter_without_english_letters(aBuf) ⇒ Object



58
59
60
61
# File 'lib/CharSetProber.rb', line 58

def filter_without_english_letters(aBuf)
    aBuf = aBuf.gsub(/([A-Za-z])+/, '')
    return aBuf
end

#get_charset_nameObject



38
39
40
# File 'lib/CharSetProber.rb', line 38

def get_charset_name
    return nil
end

#get_confidenceObject



49
50
51
# File 'lib/CharSetProber.rb', line 49

def get_confidence
    return 0.0
end

#get_stateObject



45
46
47
# File 'lib/CharSetProber.rb', line 45

def get_state
    return @_mState
end

#resetObject



34
35
36
# File 'lib/CharSetProber.rb', line 34

def reset
    @_mState = :Detecting
end