o
    Þ­j+  ã                   @   s@   d dl mZmZmZ d dlZdd„ Zdd„ Zdd„ Zd	d
„ ZdS )é    )ÚPreProcessorRegexÚPreProcessorSubÚsymbolsNc                 C   s   t tjdd„ dd� | ¡S )z¼Add a space after tone-modifying punctuation.

    Because the `tone_marks` tokenizer case will split after a tone-modifying
    punctuation mark, make sure there's whitespace after.

    c                 S   ó
   d  | ¡S )Nz(?<={})©Úformat©Úx© r
   úZ/var/www/html/CropPilot/venv/lib/python3.10/site-packages/gtts/tokenizer/pre_processors.pyÚ<lambda>   ó   
 ztone_marks.<locals>.<lambda>ú ©Úsearch_argsÚsearch_funcÚrepl)r   r   Ú
TONE_MARKSÚrun©Útextr
   r
   r   Ú
tone_marks   s   ýür   c                 C   s   t ddd„ dd� | ¡S )zPRe-form words cut by end-of-line hyphens.

    Remove "<hyphen><newline>".

    ú-c                 S   r   )Nz{}
r   r   r
   r
   r   r      r   zend_of_line.<locals>.<lambda>Ú r   )r   r   r   r
   r
   r   Úend_of_line   s
   
ÿþr   c                 C   s   t tjdd„ dtjd� | ¡S )aô  Remove periods after an abbreviation from a list of known
    abbreviations that can be spoken the same without that period. This
    prevents having to handle tokenization of that period.

    Note:
        Could potentially remove the ending period of a sentence.

    Note:
        Abbreviations that Google Translate can't pronounce without
        (or even with) a period should be added as a word substitution with a
        :class:`PreProcessorSub` pre-processor. Ex.: 'Esq.', 'Esquire'.

    c                 S   r   )Nz(?<={})(?=\.).r   r   r
   r
   r   r   /   r   zabbreviations.<locals>.<lambda>r   )r   r   r   Úflags)r   r   ÚABBREVIATIONSÚreÚ
IGNORECASEr   r   r
   r
   r   Úabbreviations   s   üûr   c                 C   s   t tjd� | ¡S )zWord-for-word substitutions.)Ú	sub_pairs)r   r   Ú	SUB_PAIRSr   r   r
   r
   r   Úword_sub5   s   r"   )	Úgtts.tokenizerr   r   r   r   r   r   r   r"   r
   r
   r
   r   Ú<module>   s   