/opt/alt/python27/lib/python2.7/site-packages/chardet
Edit: /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyc (7863B)
ó
aËTc @ sO d d l m Z m Z m Z d d l m Z m Z m Z d d l m Z m
Z
m Z d d l m
Z
m Z m Z d d l m Z m Z m Z d d l m Z d Z d Z d Z d
Z d d d YZ d
e f d YZ d e f d YZ d e f d YZ d e f d YZ d e f d YZ d e f d YZ d S( i ( t EUCTWCharToFreqOrdert EUCTW_TABLE_SIZEt EUCTW_TYPICAL_DISTRIBUTION_RATIO( t EUCKRCharToFreqOrdert EUCKR_TABLE_SIZEt EUCKR_TYPICAL_DISTRIBUTION_RATIO( t GB2312CharToFreqOrdert GB2312_TABLE_SIZEt! GB2312_TYPICAL_DISTRIBUTION_RATIO( t Big5CharToFreqOrdert BIG5_TABLE_SIZEt BIG5_TYPICAL_DISTRIBUTION_RATIO( t JISCharToFreqOrdert JIS_TABLE_SIZEt JIS_TYPICAL_DISTRIBUTION_RATIO( t wrap_ordi gŽGázŽď?g{ŽGáz?i t CharDistributionAnalysisc B s> e Z d Z d Z d Z d Z d Z d Z RS( c C s) d | _ d | _ d | _ | j d S( N( t Nonet _mCharToFreqOrdert _mTableSizet _mTypicalDistributionRatiot reset( t self( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyt __init__/ s c C s t | _ d | _ d | _ d S( s reset analyser, clear any statei N( t Falset _mDonet _mTotalCharst _mFreqChars( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR ; s c C s} | d k r | j | } n d } | d k ry | j d 7_ | | j k ry d | j | k rv | j d 7_ qv qy n d S( s" feed a character with known lengthi i˙˙˙˙i i i N( t get_orderR R R R ( R t aBuft aCharLent order( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyt feedD s c C si | j d k s | j t k r" t S| j | j k re | j | j | j | j } | t k re | Sn t S( s( return confidence based on existing datai ( R R t MINIMUM_DATA_THRESHOLDt SURE_NOR t SURE_YES( R t r( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyt get_confidenceR s c C s
| j t k S( N( R t ENOUGH_DATA_THRESHOLD( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyt got_enough_datab s c C s d S( Ni˙˙˙˙( ( R R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR g s ( t __name__t
__module__R R R R% R' R ( ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR . s t EUCTWDistributionAnalysisc B s e Z d Z d Z RS( c C s, t j | t | _ t | _ t | _ d S( N( R R R R R R R R ( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR p s
c C sB t | d } | d k r: d | d t | d d Sd Sd S( Ni iÄ i^ i iĄ i˙˙˙˙( R ( R R t
first_char( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR v s ( R( R) R R ( ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR* o s t EUCKRDistributionAnalysisc B s e Z d Z d Z RS( c C s, t j | t | _ t | _ t | _ d S( N( R R R R R R R R ( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR s
c C sB t | d } | d k r: d | d t | d d Sd Sd S( Ni i° i^ i iĄ i˙˙˙˙( R ( R R R+ ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR s ( R( R) R R ( ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR, s t GB2312DistributionAnalysisc B s e Z d Z d Z RS( c C s, t j | t | _ t | _ t | _ d S( N( R R R R R R R R ( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR s
c C sU t | d t | d } } | d k rM | d k rM d | d | d Sd Sd S( Ni i i° iĄ i^ i˙˙˙˙( R ( R R R+ t second_char( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR s !( R( R) R R ( ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR- s t Big5DistributionAnalysisc B s e Z d Z d Z RS( c C s, t j | t | _ t | _ t | _ d S( N( R R R R R
R R R ( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR Š s
c C sp t | d t | d } } | d k rh | d k rQ d | d | d d Sd | d | d Sn d Sd S( Ni i i¤ iĄ i i? i@ i˙˙˙˙( R ( R R R+ R. ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR Ż s !( R( R) R R ( ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR/ ¨ s t SJISDistributionAnalysisc B s e Z d Z d Z RS( c C s, t j | t | _ t | _ t | _ d S( N( R R R R R
R R R ( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR ż s
c C s˘ t | d t | d } } | d k rJ | d k rJ d | d } n1 | d k rw | d k rw d | d d } n d S| | d
} | d k r d } n | S( Ni i i i iź iŕ iď i i˙˙˙˙i@ i ( R ( R R R+ R. R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR Ĺ s ! ( R( R) R R ( ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR0 ž s t EUCJPDistributionAnalysisc B s e Z d Z d Z RS( c C s, t j | t | _ t | _ t | _ d S( N( R R R R R
R R R ( R ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR Ř s
c C sB t | d } | d k r: d | d t | d d Sd Sd S( Ni i i^ iĄ i i˙˙˙˙( R ( R R t char( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR Ţ s ( R( R) R R ( ( ( sI /opt/alt/python27/lib/python2.7/site-packages/chardet/chardistribution.pyR1 × s N( (! t euctwfreqR R R t euckrfreqR R R t
gb2312freqR R R t big5freqR R
R t jisfreqR R
R t compatR R&