ok

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/chardet/
Upload File :
Current File : //usr/lib/python2.7/site-packages/chardet/chardistribution.pyo

�
۝�Rc@sOddlmZmZmZddlmZmZmZddlm	Z	m
Z
mZddlm
Z
mZmZddlmZmZmZddlmZdZdZd	Zd
Zddd��YZd
efd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZ dS(i(tEUCTWCharToFreqOrdertEUCTW_TABLE_SIZEt EUCTW_TYPICAL_DISTRIBUTION_RATIO(tEUCKRCharToFreqOrdertEUCKR_TABLE_SIZEt EUCKR_TYPICAL_DISTRIBUTION_RATIO(tGB2312CharToFreqOrdertGB2312_TABLE_SIZEt!GB2312_TYPICAL_DISTRIBUTION_RATIO(tBig5CharToFreqOrdertBIG5_TABLE_SIZEtBIG5_TYPICAL_DISTRIBUTION_RATIO(tJISCharToFreqOrdertJIS_TABLE_SIZEtJIS_TYPICAL_DISTRIBUTION_RATIO(twrap_ordig�G�z��?g{�G�z�?itCharDistributionAnalysiscBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs)d|_d|_d|_|j�dS(N(tNonet_mCharToFreqOrdert_mTableSizet_mTypicalDistributionRatiotreset(tself((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyt__init__/s			cCst|_d|_d|_dS(sreset analyser, clear any stateiN(tFalset_mDonet_mTotalCharst_mFreqChars(R((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR;s		cCs}|dkr|j|�}nd}|dkry|jd7_||jkryd|j|krv|jd7_qvqyndS(s"feed a character with known lengthii����iiiN(t	get_orderRRRR(RtaBuftaCharLentorder((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pytfeedDscCsi|jdks|jtkr"tS|j|jkre|j|j|j|j}|tkre|SntS(s(return confidence based on existing datai(RRtMINIMUM_DATA_THRESHOLDtSURE_NORtSURE_YES(Rtr((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pytget_confidenceRscCs
|jtkS(N(RtENOUGH_DATA_THRESHOLD(R((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pytgot_enough_databscCsdS(Ni����((RR((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyRgs(t__name__t
__module__RRR R%R'R(((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR.s						tEUCTWDistributionAnalysiscBseZd�Zd�ZRS(cCs,tj|�t|_t|_t|_dS(N(RRRRRRRR(R((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyRps
		cCsBt|d�}|dkr:d|dt|d�dSdSdS(Nii�i^ii�i����(R(RRt
first_char((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyRvs(R(R)RR(((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR*os	tEUCKRDistributionAnalysiscBseZd�Zd�ZRS(cCs,tj|�t|_t|_t|_dS(N(RRRRRRRR(R((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR�s
		cCsBt|d�}|dkr:d|dt|d�dSdSdS(Nii�i^ii�i����(R(RRR+((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR�s(R(R)RR(((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR,�s	tGB2312DistributionAnalysiscBseZd�Zd�ZRS(cCs,tj|�t|_t|_t|_dS(N(RRRRRRRR(R((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR�s
		cCsUt|d�t|d�}}|dkrM|dkrMd|d|dSdSdS(Niii�i�i^i����(R(RRR+tsecond_char((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR�s!(R(R)RR(((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR-�s	tBig5DistributionAnalysiscBseZd�Zd�ZRS(cCs,tj|�t|_t|_t|_dS(N(RRR	RR
RRR(R((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR�s
		cCspt|d�t|d�}}|dkrh|dkrQd|d|ddSd|d|dSndSdS(	Niii�i�i�i?i@i����(R(RRR+R.((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR�s!(R(R)RR(((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR/�s	tSJISDistributionAnalysiscBseZd�Zd�ZRS(cCs,tj|�t|_t|_t|_dS(N(RRRRR
RRR(R((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR�s
		cCs�t|d�t|d�}}|dkrJ|dkrJd|d}n1|dkrw|dkrwd|dd}nd	S||d
}|dkr�d	}n|S(Niii�i�i�i�i�ii����i@i(R(RRR+R.R((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR�s!	(R(R)RR(((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR0�s	tEUCJPDistributionAnalysiscBseZd�Zd�ZRS(cCs,tj|�t|_t|_t|_dS(N(RRRRR
RRR(R((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR�s
		cCsBt|d�}|dkr:d|dt|d�dSdSdS(Nii�i^i�ii����(R(RRtchar((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR�s(R(R)RR(((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyR1�s	N((!t	euctwfreqRRRt	euckrfreqRRRt
gb2312freqRRRtbig5freqR	R
RtjisfreqRR
RtcompatRR&R#R"R!RR*R,R-R/R0R1(((s</usr/lib/python2.7/site-packages/chardet/chardistribution.pyt<module>s A

Zerion Mini Shell 1.0