
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
ó
•�abc           @   sB   d  d l  Z  d  d l Z d d l m Z d e f d „  ƒ  YZ d S(   iÿÿÿÿNi   (   t   ProbingStatet   CharSetProberc           B   s€   e  Z d  Z d
 d „ Z d „  Z e d „  ƒ Z d „  Z e d „  ƒ Z	 d „  Z
 e d „  ƒ Z e d „  ƒ Z e d	 „  ƒ Z RS(   gffffffî?c         C   s(   d  |  _ | |  _ t j t ƒ |  _ d  S(   N(   t   Nonet   _statet   lang_filtert   loggingt	   getLoggert   __name__t   logger(   t   selfR   (    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyt   __init__'   s    		c         C   s   t  j |  _ d  S(   N(   R    t	   DETECTINGR   (   R	   (    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyt   reset,   s    c         C   s   d  S(   N(   R   (   R	   (    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyt   charset_name/   s    c         C   s   d  S(   N(    (   R	   t   buf(    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyt   feed3   s    c         C   s   |  j  S(   N(   R   (   R	   (    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyt   state6   s    c         C   s   d S(   Ng        (    (   R	   (    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyt   get_confidence:   s    c         C   s   t  j d d |  ƒ }  |  S(   Ns   ([ -])+t    (   t   ret   sub(   R   (    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyt   filter_high_byte_only=   s    c         C   sz   t  ƒ  } t j d |  ƒ } xX | D]P } | j | d  ƒ | d } | j ƒ  re | d k  re d } n  | j | ƒ q" W| S(   s5  
        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]*[€-ÿ]+[a-zA-Z]*[^a-zA-Z€-ÿ]?iÿÿÿÿs   €R   (   t	   bytearrayR   t   findallt   extendt   isalpha(   R   t   filteredt   wordst   wordt	   last_char(    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyt   filter_international_wordsB   s    			
	c         C   sè   t  ƒ  } t } d } x² t t |  ƒ ƒ D]ž } |  | | d !} | d k rT t } n | d k ri t } n  | d k  r( | j ƒ  r( | | k r¹ | r¹ | j |  | | !ƒ | j d ƒ n  | d } q( q( W| sä | j |  | ƒ n  | S(   sÈ  
        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``.
        i    i   t   >t   <s   €R   (   R   t   Falset   ranget   lent   TrueR   R   (   R   R   t   in_tagt   prevt   currt   buf_char(    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyt   filter_with_english_lettersg   s"    			N(   R   t
   __module__t   SHORTCUT_THRESHOLDR   R
   R   t   propertyR   R   R   R   t   staticmethodR   R   R)   (    (    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyR   #   s   			%(   R   R   t   enumsR    t   objectR   (    (    (    sE   /usr/lib/python2.7/site-packages/pip/_vendor/chardet/charsetprober.pyt   <module>   s   