Files
INTUIA/Programa final/spacy/lang/el/__pycache__/lemmatizer.cpython-312.pyc
T

28 lines
3.0 KiB
Plaintext
Raw Normal View History

2026-03-15 13:27:50 +00:00
Ë
=û gÑãó>ddlmZddlmZddlmZGdde«Zy)é)ÚListé)Ú
Lemmatizer)ÚTokencó&eZdZdZdedeefdZy)Ú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|jf}||jvr|j|S|j}|jj«}|dvr|j«gS|j
j
di«}|j
j
di«}|j
j
di«}|j|i«}|j|i«} |j|i«}
|j«}g} ||vr| j|«| S| j| j|g««g} | ss|
D]n\}
}|j|
«sŒ|dt|«t|
«z
|z}|sŒ8||vs|j«s| j|«Œ^| j|«Œp| s| j| «| s| j|«ttj| ««} | |j|<| S)zœLemmatize 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 úYC:\Users\garci\AppData\Roaming\Python\Python312\site-packages\spacy/lang/el/lemmatizer.pyÚrule_lemmatizezGreekLemmatizer.rule_lemmatizeð —[‘[ %§)¡)Ð,ˆ Ø ˜Ÿ