Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/chardet/__pycache__/charsetprober.cpython-37.pyc

30 lines
3.3 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
#U<>]<5D><00>@s0ddlZddlZddlmZGdd<05>de<04>ZdS)<06>N<>)<01> ProbingStatec@sneZdZdZddd<04>Zdd<06>Zedd<08><00>Zd d
<EFBFBD>Zed d <0C><00>Z d d<0E>Z
e dd<10><00>Z e dd<12><00>Z e dd<14><00>ZdS)<16> CharSetProbergffffff<66>?NcCsd|_||_t<02>t<04>|_dS)N)<06>_state<74> lang_filter<65>logging<6E> getLogger<65>__name__<5F>logger)<02>selfr<00>r <00>:/tmp/pip-install-zuyyrlx8/chardet/chardet/charsetprober.py<70>__init__'szCharSetProber.__init__cCs tj|_dS)N)r<00> DETECTINGr)r r r r <00>reset,szCharSetProber.resetcCsdS)Nr )r r r r <00> charset_name/szCharSetProber.charset_namecCsdS)Nr )r <00>bufr r r <00>feed3szCharSetProber.feedcCs|jS)N)r)r r r r <00>state6szCharSetProber.statecCsdS)Ngr )r r r r <00>get_confidence:szCharSetProber.get_confidencecCst<00>dd|<00>}|S)Ns([-])+<2B> )<02>re<72>sub)rr r r <00>filter_high_byte_only=sz#CharSetProber.filter_high_byte_onlycCs`t<00>}t<01>d|<00>}xH|D]@}|<01>|dd<03><00>|dd<02>}|<04><04>sN|dkrNd}|<01>|<04>qW|S)u9
We define three types of bytes:
alphabet: english alphabets [a-zA-Z]
international: international characters [€-ÿ]
marker: everything else [^a-zA-Z€-ÿ]
The input buffer can be thought to contain a series of words delimited
by markers. This function works to filter all words that contain at
least one international character. All contiguous sequences of markers
are replaced by a single space ascii character.
This filter applies to all scripts which do not use English characters.
s%[a-zA-Z]*[<5B>-<2D>]+[a-zA-Z]*[^a-zA-Z<>-<2D>]?N<><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><00>r)<05> bytearrayr<00>findall<6C>extend<6E>isalpha)r<00>filtered<65>words<64>word<72> last_charr r r <00>filter_international_wordsBs
 z(CharSetProber.filter_international_wordscCs<>t<00>}d}d}x~tt|<00><01>D]n}|||d<00>}|dkr>d}n |dkrJd}|dkr|<05><03>s||kr<>|s<>|<01>|||<04><00>|<01>d<08>|d}qW|s<>|<01>||d <09><00>|S)
a<EFBFBD>
Returns a copy of ``buf`` that retains only the sequences of English
alphabet and high byte characters that are not between <> characters.
Also retains English alphabet and high byte characters immediately
before occurrences of >.
This filter can be applied to all scripts which contain both English
characters and extended ASCII characters, but is currently only used by
``Latin1Prober``.
Frr<00>><3E><TrrN)r<00>range<67>lenrr)rr <00>in_tag<61>prev<65>curr<72>buf_charr r r <00>filter_with_english_lettersgs"  
 z)CharSetProber.filter_with_english_letters)N)r <00>
__module__<EFBFBD> __qualname__<5F>SHORTCUT_THRESHOLDrr<00>propertyrrrr<00> staticmethodrr$r-r r r r r#s
    %r)rr<00>enumsr<00>objectrr r r r <00><module>s