o
    Þ­j¢  ã                   @   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   ó   t tjdd„ d�jS )zÓKeep 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   ó
   d  | ¡S )Nz(?<={}).©Úformat©Úx© r
   ú[/var/www/html/CropPilot/venv/lib/python3.10/site-packages/gtts/tokenizer/tokenizer_cases.pyÚ<lambda>   ó   
 ztone_marks.<locals>.<lambda>©Úpattern_argsÚpattern_func)r   r   Ú
TONE_MARKSÚregexr
   r
   r
   r   Ú
tone_marks   s
   
ÿþr   c                   C   r   )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   r   )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   r   )z�Colon 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   r   )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 )z‚Match other punctuation.

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

    Ú c                 S   r   ©Nz{}r   r   r
   r
   r   r   <   r   z#other_punctuation.<locals>.<lambda>r   )	ÚjoinÚsetr   ÚALL_PUNCr   r   r   r   r   ©Ú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   r   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)Úgtts.tokenizerr   r   r   r   r   r   r    r
   r
   r
   r   Ú<module>   s   