
    -i	              	          d dl mZ 	 d dlmZmZ d dlmZ n#  ddlmZmZ ddlmZ Y nxY w G d d          Zd Ze	dk    rd dl
Z
d d	lmZ g d
ZeD ]=\  ZZ ee          Zeek    r' ededede                    d                     > e e e                                  e e e                                  e e ed                                e e ed                                e e ed                                e e ed                               dS dS )    N)	STOPWORDSSTOPWORDS_INDEX)r      c                       e Zd ZdZi fdZd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd ZdS )stopwordsTupleze
    A object of stoword tuple to handle the stopword tuple in two types: classified, or stemmed
    c                     || _         dS )z&
        Init stopword tuples
        N	stop_dict)selfr
   s     \/var/www/html/speakWrite/venv/lib/python3.11/site-packages/arabicstopwords/stopwordstuple.py__init__zstopwordsTuple.__init__$   s     #    c                     | j         S )z:
         return the all features for  a stopword
        r	   r   s    r   get_features_dictz stopwordsTuple.get_features_dict5   s     ~r   c                 B    | j                             t          d          S )z<
         return the asked feature form  a stopword
         )r
   getfeaturer   s    r   get_featurezstopwordsTuple.get_feature<   s     ~!!'"---r   c                 8    | j                             dd          S )z:
         return the vocalized form fo a stopword
        	vocalizedr   r
   r   r   s    r   get_vocalizedzstopwordsTuple.get_vocalizedB        ~!!+b111r   c                 j    | j                             d| j                             dd                    S )z9
         return the wordtype form fo a stopword
        type	type_wordr   r   r   s    r   get_wordtypezstopwordsTuple.get_wordtypeI   s.    
 ~!!&););K)K)KLLLr   c                 8    | j                             dd          S )z>
        return the word sub class form fo a stopword
        
class_wordr   r   r   s    r   get_wordclasszstopwordsTuple.get_wordclassR   s     ~!!,r222r   c                 R    t          | j                            dd                    S )zc
         return True if the word  accept conjuctions, Asked only for classified stopwords
        has_conjuctionr   boolr
   r   r   s    r   accept_conjuctionz stopwordsTuple.accept_conjuctionf   %     DN&&'7::;;;r   c                 R    t          | j                            dd                    S )zb
        return True if the word  accept definitions, Asked only for classified stopwords
        has_definitionr   r%   r   s    r   accept_definitionz stopwordsTuple.accept_definitionm   r(   r   c                 R    t          | j                            dd                    S )zd
         return True if the word  accept prepositions, Asked only for classified stopwords
        has_prepositionr   r%   r   s    r   accept_prepositionz!stopwordsTuple.accept_prepositionu   %     DN&&'8;;<<<r   c                 R    t          | j                            dd                    S )z`
         return True if the word  accept pronouns, Asked only for classified stopwords
        has_pronounr   )boboolr
   r   r   s    r   accept_pronounzstopwordsTuple.accept_pronoun}   s$     dn((q99:::r   c                 R    t          | j                            dd                    S )za
         return True if the word  accept interrogs, Asked only for classified stopwords
        has_interrogr   r%   r   s    r   accept_interrogzstopwordsTuple.accept_interrog   $     DN&&~a88999r   c                 R    t          | j                            dd                    S )zd
         return True if the word  accept conjugations, Asked only for classified stopwords
        has_conjugationr   r%   r   s    r   accept_conjugationz!stopwordsTuple.accept_conjugation   r/   r   c                 R    t          | j                            dd                    S )z^
         return True if the word  accept qasams, Asked only for classified stopwords
        	has_qasamr   r%   r   s    r   accept_qasamzstopwordsTuple.accept_qasam   s$     DN&&{155666r   c                 R    t          | j                            dd                    S )z\
         return True if the word  is defined , Asked only for classified stopwords
        
is_definedr   r%   r   s    r   r?   zstopwordsTuple.is_defined   s$     DN&&|A66777r   c                 R    t          | j                            dd                    S )zc
         return True if the word  accept inflections, Asked only for classified stopwords
        is_inflectedr   r%   r   s    r   accept_inflectionz stopwordsTuple.accept_inflection   r7   r   c                 R    t          | j                            dd                    S )z_
         return True if the word  accept tanwins, Asked only for classified stopwords
        tanwinr   r%   r   s    r   accept_tanwinzstopwordsTuple.accept_tanwin   s$     DN&&x22333r   c                 8    | j                             dd          S )zJ
         return  get action, Asked only for classified stopwords
        actionr   r   r   s    r   
get_actionzstopwordsTuple.get_action   s     ~!!(2...r   c                 8    | j                             dd          S )zO
        return   get object_type, Asked only for classified stopwords
        object_typer   r   r   s    r   get_object_typezstopwordsTuple.get_object_type   s     ~!!-333r   c                 8    | j                             dd          S )zH
         return  get need, Asked only for classified stopwords
        needr   r   r   s    r   get_needzstopwordsTuple.get_need        ~!!&,,,r   c                 8    | j                             dd          S )z6
         return True if the word  get tags, 
        tagsr   r   r   s    r   get_tagszstopwordsTuple.get_tags   rO   r   c                 8    | j                             dd          S )z7
         return True if the word  get stems, 
        stemr   r   r   s    r   	get_stemszstopwordsTuple.get_stems   rO   r   c                 8    | j                             dd          S )z(
         return get encletic, 
        encleticr   r   r   s    r   get_encliticszstopwordsTuple.get_enclitics        ~!!*R000r   c                 8    | j                             dd          S )z*
         return  get procletic, 
        	procleticr   r   r   s    r   get_procleticszstopwordsTuple.get_procletics   r   r   c                 8    | j                             dd          S )z'
         return   get lemma, 
        originalr   r   )r   words     r   
get_lemmaszstopwordsTuple.get_lemmas   rY   r   N)__name__
__module____qualname____doc__r   r   r   r   r   r"   r'   r+   r.   r3   r6   r:   r=   r?   rB   rE   rH   rK   rN   rR   rU   rX   r\   r`    r   r   r   r       s         $& # # # #"  . . .2 2 2M M M3 3 3(< < << < <= = =; ; ;: : := = =7 7 78 8 8: : :4 4 4/ / /4 4 4- - -- - -- - -1 1 12 2 21 1 1 1 1r   r   c                 B    d}t          t          |                     dS )Nu
   لعلهمr   )print	stop_stem)argsr_   s     r   mainrj      s     D	)D//1r   __main__)arepr))u   منكمT)u   ممكنF)u
   عندماT)u
   حينئذTzError z is zwhere must be utf8u   حتىu   جميعu   لجميعهمu   لجم)pyarabic.arabyarabystopwordsallformsr   r   stopwords_classifiedclassed_STOPWORDSr   rj   ra   syspyarabic.arabreprrl   wordswrepis_stopresultrg   encodelenstopwords_listclassed_stopwords_liststopword_formsrh   re   r   r   <module>r      sC  0      E<<<<<<<<CCCCCCCE========DDDDDDDDB1 B1 B1 B1 B1 B1 B1 B1J  
 zJJJ''''''  E
  W W3S==EEaaaEMMfUUVVV	E##nn

   	E##$$&&
'
'(((	E%%y))
*
*+++	E%%{++
,
,---	E%%		+,,
-
-...	E%%		)$$
%
%&&&&&% s    )