
    -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 Zd Zd Zd ZdS )stopwordTuplezT
    A object 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/stopwordtuple.py__init__zstopwordTuple.__init__$   s     #    c                     | j         S )z:
         return the all features for  a stopword
        r	   r   s    r   get_features_dictzstopwordTuple.get_features_dict5   s     ~r   c                 8    | j                             |d          S )z<
         return the asked feature form  a stopword
         r
   get)r   features     r   get_featurezstopwordTuple.get_feature<   s     ~!!'"---r   c                 8    | j                             dd          S )z:
         return the vocalized form fo a stopword
        	vocalizedr   r   r   s    r   get_vocalizedzstopwordTuple.get_vocalizedB        ~!!+b111r   c                 8    | j                             dd          S )z<
         return the unvocalized form fo a stopword
        wordr   r   r   s    r   get_unvocalizedzstopwordTuple.get_unvocalizedH        ~!!&,,,r   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stopwordTuple.get_wordtypeO   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stopwordTuple.get_wordclassX   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stopwordTuple.accept_conjuctionl   %     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stopwordTuple.accept_definitions   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 stopwordTuple.accept_preposition{   %     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   r)   r   s    r   accept_pronounzstopwordTuple.accept_pronoun   s$     DN&&}Q77888r   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stopwordTuple.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 stopwordTuple.accept_conjugation   r3   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stopwordTuple.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   rB   zstopwordTuple.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stopwordTuple.accept_inflection   r:   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stopwordTuple.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stopwordTuple.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stopwordTuple.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stopwordTuple.get_need   r   r   c                 8    | j                             dd          S )z6
         return True if the word  get tags, 
        tagsr   r   r   s    r   get_tagszstopwordTuple.get_tags   r   r   c                 8    | j                             dd          S )z7
         return True if the word  get stems, 
        stemr   r   r   s    r   get_stemzstopwordTuple.get_stem   r   r   c                 8    | j                             dd          S )z(
         return get encletic, 
        encleticr   r   r   s    r   get_encliticzstopwordTuple.get_enclitic        ~!!*R000r   c                 8    | j                             dd          S )z*
         return  get procletic, 
        	procleticr   r   r   s    r   get_procleticzstopwordTuple.get_procletic   r   r   c                 8    | j                             dd          S )z'
         return   get lemma, 
        originalr   r   r   s    r   	get_lemmazstopwordTuple.get_lemma   r[   r   c                 4    | j                                         S )z(
        return tuple as string
        )r
   __str__r   s    r   rc   zstopwordTuple.__str__   s     ~%%'''r   c                 8    | j                             |d          S )"
        return attribute
        Nr   )r   keys     r   __getitem__zstopwordTuple.__getitem__   s     ~!!#d+++r   c                 8    | j                             ||          S )re   r   )r   rf   defaults      r   r   zstopwordTuple.get   s     ~!!#g...r   N) __name__
__module____qualname____doc__r   r   r   r   r   r#   r&   r+   r/   r2   r6   r9   r=   r@   rB   rE   rH   rK   rN   rQ   rT   rW   rZ   r^   ra   rc   rg   r    r   r   r   r       s         $& # # # #"  . . .2 2 2- - -M M M3 3 3(< < << < <= = =9 9 9: : := = =7 7 78 8 8: : :4 4 4/ / /4 4 4- - -- - -- - -1 1 12 2 21 1 1( ( (, , ,/ / / / /r   r   c                 B    d}t          t          |                     dS )Nu
   لعلهمr   )print	stop_stem)argsr   s     r   mainrs      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   rs   rj   syspyarabic.arabreprru   wordswrepis_stopresultrp   encodelenstopwords_listclassed_stopwords_liststopword_formsrq   rn   r   r   <module>r      sC  0      E<<<<<<<<CCCCCCCE========DDDDDDDD[/ [/ [/ [/ [/ [/ [/ [/z  
 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    )