usr/lib/python2.7/site-packages/pip/_vendor/chardet/sjisprober.pyc000064400000005773147205624600021172 0ustar00 abc@sddlmZddlmZddlmZddlmZddlm Z ddl m Z m Z defdYZ d S( i(tMultiByteCharSetProber(tCodingStateMachine(tSJISDistributionAnalysis(tSJISContextAnalysis(t SJIS_SM_MODEL(t ProbingStatet MachineStatet SJISProbercBsJeZdZdZedZedZdZdZRS(cCsHtt|jtt|_t|_t|_ |j dS(N( tsuperRt__init__RRt coding_smRtdistribution_analyzerRtcontext_analyzertreset(tself((sB/usr/lib/python2.7/site-packages/pip/_vendor/chardet/sjisprober.pyR %s   cCs$tt|j|jjdS(N(RRR R (R((sB/usr/lib/python2.7/site-packages/pip/_vendor/chardet/sjisprober.pyR ,scCs |jjS(N(R t charset_name(R((sB/usr/lib/python2.7/site-packages/pip/_vendor/chardet/sjisprober.pyR0scCsdS(NtJapanese((R((sB/usr/lib/python2.7/site-packages/pip/_vendor/chardet/sjisprober.pytlanguage4scCsxNtt|D]:}|jj||}|tjkrm|jjd|j|j |t j |_ Pq|tj krt j|_ Pq|tjkr|jj}|dkr|d|jd<|jj|jd|||jj|j|qM|jj||d||d|!||jj||d|d!|qqW|d|jd<|jt jkr|jjr|j|jkrt j|_ qn|jS(Ns!%s %s prober hit error at byte %siiiii(trangetlenR t next_stateRtERRORtloggertdebugRRRtNOT_MEt_statetITS_MEtFOUND_ITtSTARTtget_current_charlent _last_charR tfeedR tstatet DETECTINGtgot_enough_datatget_confidencetSHORTCUT_THRESHOLD(Rtbyte_strtit coding_statetchar_len((sB/usr/lib/python2.7/site-packages/pip/_vendor/chardet/sjisprober.pyR8s6    cCs+|jj}|jj}t||S(N(R R#R tmax(Rt context_conft distrib_conf((sB/usr/lib/python2.7/site-packages/pip/_vendor/chardet/sjisprober.pyR#Ys( t__name__t __module__R R tpropertyRRRR#(((sB/usr/lib/python2.7/site-packages/pip/_vendor/chardet/sjisprober.pyR$s    !N(tmbcharsetproberRtcodingstatemachineRtchardistributionRtjpcntxRtmbcssmRtenumsRRR(((sB/usr/lib/python2.7/site-packages/pip/_vendor/chardet/sjisprober.pyts