a
    Tg                     @   s<   d dl mZmZ dd Zdd Zdd Zdd	 Zd
d ZdS )    )RegexBuildersymbolsc                   C   s   t tjdd djS )zKeep tone-modifying punctuation by matching following character.

    Assumes the `tone_marks` pre-processor was run for cases where there might
    not be any space after a tone-modifying punctuation mark.
    c                 S   s
   d | S )Nz(?<={}).formatx r   \/var/www/html/texto_audio/venv/lib/python3.9/site-packages/gtts/tokenizer/tokenizer_cases.py<lambda>       ztone_marks.<locals>.<lambda>Zpattern_argsZpattern_func)r   r   
TONE_MARKSregexr   r   r   r	   
tone_marks   s    
r   c                   C   s   t tjdd djS )aJ  Period and comma case.

    Match if not preceded by ".<letter>" and only if followed by space.
    Won't cut in the middle/after dotted abbreviations; won't cut numbers.

    Note:
        Won't match if a dotted abbreviation ends a sentence.

    Note:
        Won't match the end of a sentence if not followed by a space.

    c                 S   s
   d | S )Nz(?<!\.[a-z]){} r   r   r   r   r	   r
      r   zperiod_comma.<locals>.<lambda>r   )r   r   PERIOD_COMMAr   r   r   r   r	   period_comma   s    r   c                   C   s   t tjdd djS )zColon case.

    Match a colon ":" only if not preceded by a digit.
    Mainly to prevent a cut in the middle of time notations e.g. 10:01

    c                 S   s
   d | S )Nz	(?<!\d){}r   r   r   r   r	   r
   +   r   zcolon.<locals>.<lambda>r   )r   r   COLONr   r   r   r   r	   colon#   s    
r   c                  C   s@   d ttjttj ttj ttj } t| dd djS )zMatch other punctuation.

    Match other punctuation to split on; punctuation that naturally
    inserts a break in speech.

     c                 S   s
   d | S Nz{}r   r   r   r   r	   r
   <   r   z#other_punctuation.<locals>.<lambda>r   )	joinsetr   ALL_PUNCr   r   r   r   r   Zpuncr   r   r	   other_punctuation/   s    r   c                  C   s   t j} t| dd djS )z[Match all punctuation.

    Use as only tokenizer case to mimic gTTS 1.x tokenization.
    c                 S   s
   d | S r   r   r   r   r   r	   r
   E   r   z(legacy_all_punctuation.<locals>.<lambda>r   )r   r   r   r   r   r   r   r	   legacy_all_punctuation?   s    r   N)Zgtts.tokenizerr   r   r   r   r   r   r   r   r   r   r	   <module>   s
   