o
    Âifù  ã                   @   sF   d dl 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)ÚCommonÚStandard)ÚRulec                   @   sR   e Zd ZdZg d¢ZdZeddƒZeddƒZG dd	„ d	e	ƒZ	G d
d„ de
jƒZdS )ÚArabicÚar)ú?ú!ú:Ú.u   ØŸu   ØŒu   .*?[:\.!\?ØŸØŒ]|.*?\Z|.*?$z(?<=\d):(?=\d)u   â™­u   ØŒ(?=\s\S+ØŒ)u   â™¬c                       s(   e Zd Zg Z‡ fdd„Zdd„ Z‡  ZS )zArabic.AbbreviationReplacerc                    s   t ƒ  ||¡ d S )N)ÚsuperÚ__init__)ÚselfÚtextÚlang©Ú	__class__© úJ/var/www/html/corbot_env/lib/python3.10/site-packages/pysbd/lang/arabic.pyr      s   z$Arabic.AbbreviationReplacer.__init__c                 C   s   t  d |¡d|¡}|S )Nz
(?<={0})\.u   âˆ¯)ÚreÚsubÚformat)r   ÚtxtÚamÚindexÚcharacter_arrayr   r   r   Úscan_for_replacements   s   z1Arabic.AbbreviationReplacer.scan_for_replacements)Ú__name__Ú
__module__Ú__qualname__ÚSENTENCE_STARTERSr   r   Ú__classcell__r   r   r   r   r      s    r   c                   @   s   e Zd Zg d¢Zg Zg ZdS )zArabic.Abbreviation)u   Ø§u   Ø§. Ø¯u   Ø§.Ø¯õ   Ø§.Ø´.Ø§r"   u   Ø¥Ù„Ø®õ   Øª.Ø¨r#   õ   Ø¬.Ø¨u   Ø¬Ù…r$   õ   Ø¬.Ù….Ø¹r%   õ   Ø³.Øªr&   u   Ø³Ù…u   Øµ.Ø¨.u   Øµ.Ø¨u   ÙƒØ¬.u   ÙƒÙ„Ù….u   Ù…õ   Ù….Ø¨r'   u   Ù‡N)r   r   r   ÚABBREVIATIONSÚPREPOSITIVE_ABBREVIATIONSÚNUMBER_ABBREVIATIONSr   r   r   r   ÚAbbreviation    s    r+   N)r   r   r   Úiso_codeÚPunctuationsÚSENTENCE_BOUNDARY_REGEXr   ÚReplaceColonBetweenNumbersRuleÚ#ReplaceNonSentenceBoundaryCommaRuler   r   r+   r   r   r   r   r      s    

r   )	r   Úpysbd.abbreviation_replacerr   Úpysbd.lang.commonr   r   Úpysbd.utilsr   r   r   r   r   r   Ú<module>   s
   