관리-도구
편집 파일: hebrewprober.cpython-38.pyc
U ʗRe_6 � @ s, d dl mZ d dlmZ G dd� de�ZdS )� )� CharSetProber)�ProbingStatec s� e Zd ZdZdZdZdZdZdZdZ dZ d Zd ZdZ dZd ZdZ� fdd�Zdd� Zdd� Zdd� Zdd� Zdd� Zedd� �Zedd� �Zedd � �Z� ZS )!�HebrewProber�� �� �� �� �� �� �� �� � � � g{�G�z�?z ISO-8859-8zwindows-1255c s: t � �� d | _d | _d | _d | _d | _d | _| �� d S �N) �super�__init__�_final_char_logical_score�_final_char_visual_score�_prev�_before_prev�_logical_prober�_visual_prober�reset��self�� __class__� ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/chardet/hebrewprober.pyr � s zHebrewProber.__init__c C s d| _ d| _d| _d| _d S )N� � )r r r r r r r r r � s zHebrewProber.resetc C s || _ || _d S r )r r )r �logical_prober� visual_proberr r r �set_model_probers� s zHebrewProber.set_model_probersc C s || j | j| j| j| jfkS r )� FINAL_KAF� FINAL_MEM� FINAL_NUN�FINAL_PE�FINAL_TSADI�r �cr r r �is_final� s �zHebrewProber.is_finalc C s || j | j| j| jfkS r )� NORMAL_KAF� NORMAL_MEM� NORMAL_NUN� NORMAL_PEr* r r r �is_non_final� s zHebrewProber.is_non_finalc C s� | j tjkrtjS | �|�}|D ]�}|dkrn| jdkr�| �| j�rR| jd7 _q�| �| j�r�| j d7 _ n,| jdkr�| �| j�r�|dkr�| j d7 _ | j| _|| _q tj S )Nr! r )�stater �NOT_ME�filter_high_byte_onlyr r, r r r1 r � DETECTING)r �byte_str�curr r r �feed� s( � ��zHebrewProber.feedc C sx | j | j }|| jkr| jS || j kr.| jS | j�� | j�� }|| jkrR| jS || j k rd| jS |dk rr| jS | jS )Ng ) r r �MIN_FINAL_CHAR_DISTANCE�LOGICAL_HEBREW_NAME�VISUAL_HEBREW_NAMEr �get_confidencer �MIN_MODEL_DISTANCE)r �finalsub�modelsubr r r �charset_name s � zHebrewProber.charset_namec C s dS )N�Hebrewr r r r r �language# s zHebrewProber.languagec C s( | j jtjkr"| jjtjkr"tjS tjS r )r r2 r r3 r r5 r r r r r2 ' s �zHebrewProber.state)�__name__� __module__�__qualname__r% r- r&