o
    ªZhl  ã                   @   sR   d dl Z d dlmZ d dlmZ d dlmZmZ d dlm	Z	 G dd„ deeƒZ
dS )é    N)ÚAbbreviationReplacer)ÚBetweenPunctuation)ÚCommonÚStandard)Úreplace_punctuationc                   @   s0   e Zd ZdZG dd„ deƒZG dd„ deƒZdS )ÚChineseÚzhc                   @   s   e Zd Zg ZdS )zChinese.AbbreviationReplacerN)Ú__name__Ú
__module__Ú__qualname__ZSENTENCE_STARTERS© r   r   úI/var/www/html/lang_env/lib/python3.10/site-packages/pysbd/lang/chinese.pyr      s    r   c                       s<   e Zd Z‡ fdd„Zdd„ Zdd„ Zdd„ Zd	d
„ Z‡  ZS )zChinese.BetweenPunctuationc                    s   t ƒ  |¡ d S ©N)ÚsuperÚ__init__)ÚselfÚtext©Ú	__class__r   r   r      s   z#Chinese.BetweenPunctuation.__init__c                 C   s   |   ¡  | jS r   )Ú)sub_punctuation_between_quotes_and_parensr   ©r   r   r   r   Úreplace   s   z"Chinese.BetweenPunctuation.replacec                 C   ó   d}t  |t| j¡| _d S )Nu/   ã€Š(?=(?P<tmp>[^ã€‹\\]+|\\{2}|\\.)*)(?P=tmp)ã€‹©ÚreÚsubr   r   )r   Z)BETWEEN_DOUBLE_ANGLE_QUOTATION_MARK_REGEXr   r   r   Ú5sub_punctuation_between_double_angled_quotation_marks   ó   
ÿzPChinese.BetweenPunctuation.sub_punctuation_between_double_angled_quotation_marksc                 C   r   )Nu/   ã€Œ(?=(?P<tmp>[^ã€\\]+|\\{2}|\\.)*)(?P=tmp)ã€r   )r   ZBETWEEN_L_BRACKET_REGEXr   r   r   Ú!sub_punctuation_between_l_bracket   r   z<Chinese.BetweenPunctuation.sub_punctuation_between_l_bracketc                 C   s   |   ¡  |  ¡  d S r   )r   r   r   r   r   r   r   "   s   zDChinese.BetweenPunctuation.sub_punctuation_between_quotes_and_parens)	r	   r
   r   r   r   r   r   r   Ú__classcell__r   r   r   r   r      s    r   N)r	   r
   r   Ziso_coder   r   r   r   r   r   r      s    r   )r   Zpysbd.abbreviation_replacerr   Zpysbd.between_punctuationr   Zpysbd.lang.commonr   r   Zpysbd.punctuation_replacerr   r   r   r   r   r   Ú<module>   s   