3

U'íc¼2ã@sÜddlmZddlmZGdd„deƒZGdd„deƒZGdd„deƒZGd	d
„d
eƒZGdd„deƒZ	Gd
d„deƒZ
Gdd„deƒZGdd„deƒZGdd„deƒZ
Gdd„deƒZGdd„deƒZGdd„deƒZdS)é)ÚBaseStemmer)ÚAmongc@s¶eZdZdZedd5dƒedddƒedddƒed	dd
ƒedddƒed
ddƒgZedd6dƒedd7dƒedd8dƒedd9dƒedd:dƒedd;d
ƒedddƒgZedd<dƒedd=dƒedd>dƒedddƒgZedd?dƒedd@dƒgZeddAdƒeddBdƒeddCdƒeddDd
ƒeddEdƒeddFdƒeddGd
ƒeddHdƒgZ	dd d!dddddddddddddd"dd#d"gZ
d$d%dgZd$d%dgZdZ
dZdZd&d'„Zd(d)„Zd*d+„Zd,d-„Zd.d/„Zd0d1„Zd2d3„Zd4S)IÚ
GermanStemmerz
    This class implements the stemming algorithm defined by a snowball script.
    Generated by Snowball 2.2.0 - https://snowballstem.org/
    ÚréÚUééÚYõäéõöéõüÚeÚemÚenZernÚerÚsÚesÚstZestÚigZlichÚendZungZischZikZheitZkeitééAééé éuéc$Csv|j}xÂ|j}yšy~|j}y8|j|_|jdƒs2tƒ‚|j|_|jdƒsHdStƒ‚Wntk
rdYnX||_|j|jkr~tƒ‚|jd7_Wntk
r¢YnXwWntk
r¼YnX||_PqW||_xž|j}yryRxJ|j}yþ|j	t
jddƒstƒ‚|j|_y¶|j}yL|jdƒs,t
ƒ‚|j|_|j	t
jddƒsLt
ƒ‚|jdƒs\dStƒ‚Wnt
k
rzYnX||_|jd	ƒs”tƒ‚|j|_|j	t
jddƒs´tƒ‚|jd
ƒsÄdSWntk
rÜYnX||_tƒ‚Wntk
rYnX||_|j|jkrtƒ‚|jd7_qæWWntk
rHYnXwÔWntk
rdYnX||_PqÔWdS)NõßÚssFréaéüÚurÚyr
T)ÚcursorÚbraZeq_sÚlab2ÚketÚ
slice_fromÚlab1ÚlimitÚlab0Zin_groupingrÚg_vÚlab5Úlab7Úlab6Úlab4Úlab3)ÚselfÚv_1Úv_2Úv_3Úv_4Úv_5Úv_6©r;úI/tmp/pip-build-gk9425m9/snowballstemmer/snowballstemmer/german_stemmer.pyZ__r_preludeAsš




zGermanStemmer.__r_preludecCs|j|_|j|_|j}|jd}||jkr.dS||_|j|_||_|jtjddƒsVdS|jd7_|jtjddƒsxdS|jd7_|j|_y|j|jks¢t	ƒ‚|j|_Wnt	k
rÀYnX|jtjddƒsÖdS|jd7_|jtjddƒsúdS|jd7_|j|_dS)NrFr"r#rT)
r,ÚI_p1ÚI_p2r&ÚI_xZgo_out_groupingrr.Zgo_in_groupingr-)r4r5Úcr;r;r<Z__r_mark_regionsˆs<

zGermanStemmer.__r_mark_regionscCsÞxØ|j}y°|j|_|jtjƒ}|dkr,tƒ‚|j|_|dkrL|jdƒs´dSnh|dkrd|jdƒs´dSnP|dkr||jdƒs´dSn8|d	kr”|jd
ƒs´dSn |j|jkr¦tƒ‚|jd7_wWntk
rÌYnX||_PqWdS)Nrrr%Fr	r$rÚarÚoT)	r&r'Z
find_amongrÚa_0r-r)r*r,)r4r5Ú	among_varr;r;r<Z__r_postlude§s:



zGermanStemmer.__r_postludecCs|j|jksdSdS)NFT)r=r&)r4r;r;r<Z__r_R1ÆszGermanStemmer.__r_R1cCs|j|jksdSdS)NFT)r>r&)r4r;r;r<Z__r_R2ËszGermanStemmer.__r_R2c
3Cst|j|j}y|j|_|jtjƒ}|dkr2tƒ‚|j|_|jƒsHtƒ‚|dkr^|j	ƒs\dSn¶|dkrî|j	ƒsrdS|j|j}yX|j|_|j
dƒs¤|j||_tƒ‚|j|_|j
dƒsÈ|j||_tƒ‚|j	ƒsÔdSWntk
rêYnXn&|jtj
ddƒstƒ‚|j	ƒsdSWntk
r,YnX|j||_|j|j}y¢|j|_|jtjƒ}|dkrltƒ‚|j|_|jƒs„tƒ‚|dkrž|j	ƒsædSnH|jtjddƒs¶tƒ‚|jd	}||jkrÒtƒ‚||_|j	ƒsædSWntk
rþYnX|j||_|j|j}y2|j|_|jtjƒ}|dkr@tƒ‚|j|_|jƒsXtƒ‚|dkrL|j	ƒspdS|j|j}y´|j|_|j
d
ƒs¤|j||_tƒ‚|j|_|j|j}y(|j
dƒsÌtƒ‚|j||_tƒ‚Wntk
röYnX|j||_|jƒs |j||_tƒ‚|j	ƒs.dSWntk
rFYnXnþ|dkr´|j|j}	y|j
dƒsvtƒ‚tƒ‚Wntk
r”YnX|j|	|_|j	ƒsJdSn–|d	kr¶|j	ƒsÌdS|j|j}
yÄ|j|_yn|j|j}y|j
dƒstƒ‚tƒ‚Wntk
r"YnX|j||_|j
d
ƒsN|j|
|_tƒ‚Wntk
rfYnX|j|_|jƒsŒ|j|
|_tƒ‚|j	ƒsšdSWntk
r²YnXn”|j	ƒsÄdS|j|j}yb|j|_|jtjƒdkrþ|j||_tƒ‚|j|_|jƒs"|j||_tƒ‚|j	ƒs0dSWntk
rHYnXWntk
rbYnX|j||_dS)NrrFr	rZnisébétrrrrrT)r,r&r)Zfind_among_brÚa_1r-r'Ú_GermanStemmer__r_R1Z	slice_delZeq_s_br+Z
in_grouping_bÚ
g_s_endingÚa_2r(Úg_st_endingÚlimit_backwardÚa_4r3Ú_GermanStemmer__r_R2r2r/r1Úlab9Úlab8r0Úa_3Úlab10)
r4r5rDr6r7r@r8r9r:Zv_7Zv_8Zv_9Zv_10r;r;r<Z__r_standard_suffixÐs2





























z!GermanStemmer.__r_standard_suffixcCs`|j}|jƒ||_|j}|jƒ||_|j|_|j|_|jƒ|j|_|j}|jƒ||_dS)NT)r&Ú_GermanStemmer__r_preludeÚ_GermanStemmer__r_mark_regionsrLr,Ú!_GermanStemmer__r_standard_suffixÚ_GermanStemmer__r_postlude)r4r5r6r8r;r;r<Ú_stempszGermanStemmer._stemNéÿÿÿÿrXrXrXrXrXrXrXrXrXrXrXrXrXrXrXrXrXrXrX)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rrCrGrJrQrMr.rIrKr?r>r=rSrTrVrHrNrUrWr;r;r;r<rsT





















,

G!rc@seZdZdS)r-N)rYrZr[r;r;r;r<r-sr-c@seZdZdS)r+N)rYrZr[r;r;r;r<r+„sr+c@seZdZdS)r(N)rYrZr[r;r;r;r<r(‡sr(c@seZdZdS)r3N)rYrZr[r;r;r;r<r3Šsr3c@seZdZdS)r2N)rYrZr[r;r;r;r<r2sr2c@seZdZdS)r/N)rYrZr[r;r;r;r<r/sr/c@seZdZdS)r1N)rYrZr[r;r;r;r<r1“sr1c@seZdZdS)r0N)rYrZr[r;r;r;r<r0–sr0c@seZdZdS)rPN)rYrZr[r;r;r;r<rP™srPc@seZdZdS)rON)rYrZr[r;r;r;r<rOœsrOc@seZdZdS)rRN)rYrZr[r;r;r;r<rRŸsrRN)ZbasestemmerrZamongrrÚ
BaseExceptionr-r+r(r3r2r/r1r0rPrOrRr;r;r;r<Ú<module>s|