
    h                     >    S SK Jr  SSKJr  SSKJr   " S S\5      rg)    )List   )
Lemmatizer)Tokenc                   0    \ rS rSrSrS\S\\   4S jrSr	g)GreekLemmatizer   av  
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                 n   UR                   UR                  4nX R                  ;   a  U R                  U   $ UR                  nUR                  R                  5       nUS;   a  UR                  5       /$ U R
                  R                  S0 5      nU R
                  R                  S0 5      nU R
                  R                  S0 5      nUR                  U0 5      nUR                  U0 5      n	UR                  U0 5      n
UR                  5       n/ nX8;   a  UR                  U5        U$ UR                  U	R                  U/ 5      5        / nU(       d  U
 H  u  pUR                  U5      (       d  M  US[        U5      [        U5      -
   U-   nU(       d  MC  X;   d  UR                  5       (       d  UR                  U5        Mp  UR                  U5        M     U(       d  UR                  U5        U(       d  UR                  U5        [        [        R                  U5      5      nXR                  U'   U$ )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                   R/home/james-whalen/.local/lib/python3.13/site-packages/spacy/lang/el/lemmatizer.pyrule_lemmatizeGreekLemmatizer.rule_lemmatize   s    [[%)),	

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

9     N)
__name__
__module____qualname____firstlineno____doc__r   r   strr3   __static_attributes__r6   r5   r2   r   r      s    ,E ,d3i ,r5   r   N)typingr   pipeliner   tokensr   r   r6   r5   r2   <module>rA      s     " 7j 7r5   