3

U'ícêã@s<ddlmZddlmZGdd„deƒZGdd„deƒZdS)é)ÚBaseStemmer)ÚAmongc(@sjeZdZdZeddQdƒedddƒedddƒedddƒed	ddƒed
dRdƒeddSdƒedd
dƒedd
dƒedd
dƒedd
dƒedd
dƒeddTdƒedddƒedddƒedddƒeddUdƒeddVdƒeddWdƒedddƒeddXdƒeddYdƒedddƒed d!dƒed"d!dƒed#d!dƒed$ddƒed%d&dƒed'd&dƒed(ddƒed)d*dƒed+d*dƒed,ddƒed-dZdƒed.d[dƒed/d\dƒed0d]dƒg%Zed1d^d_ƒed2d`daƒed3dbdcƒed4dddeƒed5dfdgƒed6dhdiƒed7djdkƒgZed8dldƒed9ddƒed:dmdƒed;dnd<ƒed=dodƒgZd>d?d@ddddddddddddddAddBgZdCdDdEgZ	dZ
dZdFdG„ZdHdI„Z
dJdK„ZdLdM„ZdNdO„ZdPS)pÚSwedishStemmerz
    This class implements the stemming algorithm defined by a snowball script.
    Generated by Snowball 2.2.0 - https://snowballstem.org/
    ÚarZarnaéZernaZheternaéZornaÚadÚeZadeéZandeZarneZareZasteÚenZandenéZarenZhetenZernÚarZerZheteréÚorÚsÚaséZarnaséZernasZornasÚesZadeséZandesZensZarenséZhetensZernsZatZandetZhetÚastÚddÚgdÚnnÚdtÚgtZktÚttZigZligZelsZfulltéulöstééAééé éwéé•cCs°|j|_|j}|jd}||jkr&dS||_|j|_||_|jtjddƒsNdS|jtjddƒsbdS|jd7_|j|_y|j|jksŒtƒ‚|j|_Wntk
rªYnXdS)NrFéaéörT)	ÚlimitÚI_p1ÚcursorÚI_xZgo_out_groupingrÚg_vZgo_in_groupingÚlab0)ÚselfÚv_1Úc©r2úJ/tmp/pip-build-gk9425m9/snowballstemmer/snowballstemmer/swedish_stemmer.pyZ__r_mark_regionsNs*

zSwedishStemmer.__r_mark_regionscCsŒ|j|jkrdS|j}|j|_|j|_|jtjƒ}|dkrD||_dS|j|_||_|dkrh|jƒsˆdSn |j	tj
ddƒs|dS|jƒsˆdSdS)NFrrébéyT)r+r*Úlimit_backwardÚketÚfind_among_brÚa_0ÚbraÚ	slice_delZ
in_grouping_bÚ
g_s_ending)r/Úv_2Ú	among_varr2r2r3Z__r_main_suffixds&zSwedishStemmer.__r_main_suffixcCsš|j|jkrdS|j}|j|_|j|j}|jtjƒdkrD||_dS|j||_|j|_|j|jkrn||_dS|jd8_|j|_|j	ƒsdS||_dS)NFrrT)
r+r*r6r)r8rÚa_1r7r:r;)r/r=Úv_3r2r2r3Z__r_consonant_pair|s&z!SwedishStemmer.__r_consonant_paircCs’|j|jkrdS|j}|j|_|j|_|jtjƒ}|dkrD||_dS|j|_|dkrb|jƒsˆdSn&|dkrz|j	dƒsˆdSn|j	dƒsˆdS||_dS)NFrrrulösÚfullT)
r+r*r6r7r8rÚa_2r:r;Z
slice_from)r/r=r>r2r2r3Z__r_other_suffix’s(

zSwedishStemmer.__r_other_suffixcCs|j}|jƒ||_|j|_|j|_|j|j}|jƒ|j||_|j|j}|jƒ|j||_|j|j}|jƒ|j||_|j|_dS)NT)r+Ú_SwedishStemmer__r_mark_regionsr6r)Ú_SwedishStemmer__r_main_suffixÚ!_SwedishStemmer__r_consonant_pairÚ_SwedishStemmer__r_other_suffix)r/r0r=r@Zv_4r2r2r3Ú_stemªs zSwedishStemmer._stemNéÿÿÿÿrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrHrH)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rr9r?rBr-r<r,r*rCrDrErFrGr2r2r2r3rsv













































*
rc@seZdZdS)r.N)rIrJrKr2r2r2r3r.½sr.N)ZbasestemmerrZamongrrÚ
BaseExceptionr.r2r2r2r3Ú<module>s7