o
    ªZhù  ã                   @   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__© úH/var/www/html/lang_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ÚindexZcharacter_arrayr   r   r   Úscan_for_replacements   s   z1Arabic.AbbreviationReplacer.scan_for_replacements)Ú__name__Ú
__module__Ú__qualname__Z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   ZABBREVIATIONSZPREPOSITIVE_ABBREVIATIONSZNUMBER_ABBREVIATIONSr   r   r   r   ÚAbbreviation    s    r&   N)r   r   r   Ziso_codeZPunctuationsZSENTENCE_BOUNDARY_REGEXr   ZReplaceColonBetweenNumbersRuleZ#ReplaceNonSentenceBoundaryCommaRuler   r   r&   r   r   r   r   r      s    

r   )	r   Zpysbd.abbreviation_replacerr   Zpysbd.lang.commonr   r   Zpysbd.utilsr   r   r   r   r   r   Ú<module>   s
   