
     h                     ,    d dl Zd ZdefdZd Zd ZdS )    Nc                     t           j                            t           j                            t                              }t           j                            ||           S )z?Join the path of the current directory with the input filename.)ospathabspathdirname__file__join)filenameroots     R/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/better_profanity/utils.pyget_complete_path_of_filer      s9    7??27??84455D7<<h'''    r
   c              #      K   t          | d          5 }t          |          D ] }|                                }|dk    r|V  !	 ddd           dS # 1 swxY w Y   dS )z"Return words from a wordlist file.zutf-8)encoding N)openiterstrip)r
   wordlist_filerows      r   read_wordlistr      s      	h	)	)	) ]&& 	 	C))++Cbyy				                 s   1AAAc                     | dz  S )N    )censor_chars    r   get_replacement_for_swear_wordr      s    ?r   c                 n   |                                  }|                                  }t          t          dt          |          d                    D ]`}||         \  }}||dz            \  }}	|dk    r"||                                 }||                                 }||v s||v rd|fc S adS )z
    Return True, and the end index of the word in the text,
    if any word formed in words_indices is in `CENSOR_WORDSET`.
    r         r   T)F)lowerr   rangelen)
cur_wordwords_indicescensor_words	full_wordfull_word_with_separatorsindexsingle_word	end_indexword_with_separators_s
             r   any_next_words_form_swear_wordr.      s    
   I ( 0 0 eAs=1115566 # #!.u!5Y"/	":a"'i):):)<)<)<=	%% &&(((%
! $$(A\(Q(Q?""" )R9r   )os.pathr   r   strr   r   r.   r   r   r   <module>r1      sb    ( ( (C          r   