
    i                     >    d dl mZ ddlmZ ddlmZ  G d de      Zy)    )List   )
Lemmatizer)Tokenc                   &    e Zd ZdZdedee   fdZy)GreekLemmatizera  
    Greek language lemmatizer applies the default rule based lemmatization
    procedure with some modifications for better Greek language support.

    The first modification is that it checks if the word for lemmatization is
    already a lemma and if yes, it just returns it.
    The second modification is about removing the base forms function which is
    not applicable for Greek language.
    tokenreturnc                 "   |j                   |j                  f}|| j                  v r| j                  |   S |j                  }|j                  j                         }|dv r|j                         gS | j
                  j                  di       }| j
                  j                  di       }| j
                  j                  di       }|j                  |i       }|j                  |i       }	|j                  |i       }
|j                         }g }||v r|j                  |       |S |j                  |	j                  |g              g }|ss|
D ]n  \  }}|j                  |      s|dt        |      t        |      z
   |z   }|s8||v s|j                         s|j                  |       ^|j                  |       p |s|j                  |       |s|j                  |       t        t        j                  |            }|| j                  |<   |S )zLemmatize using a rule-based approach.

        token (Token): The token to lemmatize.
        RETURNS (list): The available lemmas for the string.
        ) eolspacelemma_index	lemma_exclemma_rulesN)lowerposcachetextpos_lookups	get_tablegetappendextendendswithlenisalphalistdictfromkeys)selfr	   	cache_keystringuniv_posindex_table	exc_tablerules_tableindex
exceptionsrulesforms	oov_formsoldnewforms                   i/var/www/vps2.regionflexible.com/Desarrollo/venv/lib/python3.12/site-packages/spacy/lang/el/lemmatizer.pyrule_lemmatizezGreekLemmatizer.rule_lemmatize   s    [[%)),	

"::i((::##%++LLN##ll,,]B?LL**;;	ll,,]B?"-]]8R0
"-U?LL LZ^^FB/0	! /S??3'!":CK#c($:;cADdllnT*!((./ LL#LL T]]5)* %

9    N)__name__
__module____qualname____doc__r   r   strr2    r3   r1   r   r      s    ,E ,d3i ,r3   r   N)typingr   pipeliner   tokensr   r   r9   r3   r1   <module>r=      s     " 7j 7r3   