Class: CharDet::CharSetProber
- Inherits:
-
Object
- Object
- CharDet::CharSetProber
show all
- Defined in:
- lib/rchardet/charsetprober.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of CharSetProber.
33
34
|
# File 'lib/rchardet/charsetprober.rb', line 33
def initialize
end
|
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active.
32
33
34
|
# File 'lib/rchardet/charsetprober.rb', line 32
def active
@active
end
|
Instance Method Details
#feed(aBuf) ⇒ Object
44
45
|
# File 'lib/rchardet/charsetprober.rb', line 44
def feed(aBuf)
end
|
#filter_high_bit_only(aBuf) ⇒ Object
55
56
57
58
59
60
61
62
63
|
# File 'lib/rchardet/charsetprober.rb', line 55
def filter_high_bit_only(aBuf)
newBuf = aBuf.gsub(/([\x00-\x7F])+/, ' ')
return newBuf
end
|
#filter_with_english_letters(aBuf) ⇒ Object
70
71
72
73
|
# File 'lib/rchardet/charsetprober.rb', line 70
def filter_with_english_letters(aBuf)
return aBuf
end
|
#filter_without_english_letters(aBuf) ⇒ Object
65
66
67
68
|
# File 'lib/rchardet/charsetprober.rb', line 65
def filter_without_english_letters(aBuf)
newBuf = aBuf.gsub(/([A-Za-z])+/,' ')
return newBuf
end
|
#get_charset_name ⇒ Object
40
41
42
|
# File 'lib/rchardet/charsetprober.rb', line 40
def get_charset_name
return nil
end
|
#get_confidence ⇒ Object
51
52
53
|
# File 'lib/rchardet/charsetprober.rb', line 51
def get_confidence
return 0.0
end
|
#get_state ⇒ Object
47
48
49
|
# File 'lib/rchardet/charsetprober.rb', line 47
def get_state
return @_mState
end
|
#reset ⇒ Object
36
37
38
|
# File 'lib/rchardet/charsetprober.rb', line 36
def reset
@_mState = EDetecting
end
|