
    $$}g                         d dl mZ d dl mZmZmZ d dlZd dlZd dlZd dlZ ej	        dej
                  Zd Zd Zd Zd Zd	 ZdS )
    )absolute_import)divisionprint_functionunicode_literalsNz\s+c                 B    t                               t          |           S )z
    Translates multiple whitespace into single space character.
    If there is at least one new line character chunk is replaced
    by single LF (Unix new line) character.
    )MULTIPLE_WHITESPACE_PATTERNsub_replace_whitespace)texts    M/var/www/py-google-trends/myenv/lib/python3.11/site-packages/justext/utils.pynormalize_whitespacer      s     '**+>EEE    c                 B    |                                  }d|v sd|v rdndS )zBNormalize all spacing characters that aren't a newline to a space.
 )group)matchr   s     r   r
   r
      s)    ;;==D4<<44<<44S8r   c                 0    |  p|                                  S )zw
    Returns `True` if string contains only white-space characters
    or is empty. Otherwise `False` is returned.
    )isspace)strings    r   is_blankr      s    
 :))))r   c                  t   t           j                            t          j        d         j                  } t           j                            | d          } g }t          j        |           D ]?}t           j                            |          \  }}|dk    r|	                    |           @t          |          S )z,Returns a collection of built-in stop-lists.justext	stoplistsz.txt)ospathdirnamesysmodules__file__joinlistdirsplitextappend	frozenset)path_to_stoplistsstoplist_namesfilenamename	extensions        r   get_stoplistsr,   %   s    I(>(GHH%6DDNJ011 ( ('**844i!!$'''^$$$r   c                    t           j                            dd| z            }	 t          j        d|          }n # t
          $ r t          d| z            w xY wt          d |                                D                       S )zAReturns an built-in stop-list for the language as a set of words.r   z%s.txtr   zStoplist for language '%s' is missing. Please use function 'get_stoplists' for complete list of stoplists and feel free to contribute by your own stoplist.c              3   d   K   | ]+}|                     d                                           V  ,dS )utf8N)decodelower).0ws     r   	<genexpr>zget_stoplist.<locals>.<genexpr>?   s:      NN!QXXf%%++--NNNNNNr   )	r   r   r"   pkgutilget_dataIOError
ValueErrorr&   
splitlines)language	file_path	stopwordss      r   get_stoplistr=   3   s    [(X*=>>I
$Y	::		 
 
 
@BJK
 
 	

 NNy7K7K7M7MNNNNNNs	   ; A)
__future__r   r   r   r   rer   r   r5   compileUNICODEr   r   r
   r   r,   r=    r   r   <module>rC      s    ' & & & & & A A A A A A A A A A 				 				 



 (bj<< F F F9 9 9* * *% % %O O O O Or   