3

U'ícWã@sŒddlmZddlmZGdd„deƒZGdd„deƒZGdd„deƒZGd	d
„d
eƒZGdd„deƒZ	Gd
d„deƒZ
Gdd„deƒZdS)é)ÚBaseStemmer)ÚAmongc@sJeZdZdZedd¦d§ƒedd¨d©ƒeddªd«ƒgZedd¬dƒedddƒed	d­dƒgZed
d®dƒedd¯d
ƒedddƒedddƒeddd°ƒeddd±ƒgZedd²d
ƒedddƒedddƒedddƒedddƒedddƒedddƒedddƒedddƒedddƒedddƒedddƒedddƒg
Zedd³dƒed ddƒed!d´dƒed"dµdƒed#d
dƒed$d¶dƒgZ	ed%d·d
ƒed&d¸dƒed'd¹d(ƒed)dºd*ƒed+d
d,ƒed-d.d.ƒed/d
d0ƒed1d
d2ƒed3d
d4ƒed5d
d6ƒed7d
d8ƒed9d»d0ƒed:d¼d,ƒed;d½d<ƒed=d¾dƒed>d4d?ƒed@d¿d0ƒedAdÀd?ƒedBdCdDƒedEdÁdDƒedFdÂd?ƒedGdÃd<ƒedHdÄd2ƒedIdÅd6ƒgZ
edJdÆd.ƒedKdÇdDƒedLdÈd
ƒedMdÉd.ƒedNdÊd.ƒed=dËdƒed>d8dƒedOdÌd8ƒedPdÍd8ƒg	ZedQdÎdƒedRdÏdƒedSdÐdƒedTdÑdƒedUdÒdƒedVdÓdƒedWdÔdƒedXdÕdƒedYdÖdƒedZd×dƒed[dØdƒed\dÙdƒed]dÚdƒed^dÛdƒed_dÜdƒed`dÝdƒedad*dƒedbdcdƒgZedddÞdƒededßdƒgZ
edfdàdáƒedgdâdãƒedhdädåƒedidædçƒedjdèdéƒedkdêdëƒedldìdíƒedmdîdïƒgZedndðdñƒedodòdóƒedpdôdõƒedqdöd÷ƒedrdød
ƒedsdùd2ƒedtdúd?ƒedudûdüƒedvdýdDƒedwdþd.ƒedxdÿdƒedydd6ƒedzdd<ƒed{ddƒed|ddƒed}ddƒed~dd8ƒeddd0ƒgZdCd€dcdgZddCd€ddgZd‚dƒdgZd„ZdZdZd…d†„Zd‡dˆ„Zd‰dŠ„Zd‹dŒ„ZddŽ„Zdd„Zd‘d’„Zd“d”„Zd•d–„Zd—d˜„Zd™dš„Z d›dœ„Z!ddž„Z"dŸd „Z#d¡d¢„Z$d£d¤„Z%d¥S(	ÚEnglishStemmerz
    This class implements the stemming algorithm defined by a snowball script.
    Generated by Snowball 2.2.0 - https://snowballstem.org/
    ZarsenrZcommunZgenerú'z's'éz'sZiedéÚséZiesZssesÚssÚusÚZbbÚddÚffZggÚblÚmmÚnnÚppZrrZatÚttZizZedZeedZingZedlyZeedlyZinglyZanciZenciZogié
ÚliéZbliéZabliéZalliéZfullié	ZlessliéZouslié
ZentliéZalitiZbilitiZivitiéZtionalZationaléZalismZationZizationééZizerZatorZivenessZfulnessZousnessZicateZativeZalizeZicitiZicalÚfulZnessÚicÚanceÚenceÚableZibleÚateÚiveÚizeZitiÚalZismZionZerÚousZantÚentZmentZementéÚeÚlZsucceedÚproceedZexceedZcanningZinningZearringZherringZoutingZandesZatlasZbiasZcosmosZdyingZearlyZgentlyZhoweZidlyZlyingÚnewsÚonlyZsinglyZskiesZskisÚskyZtyingZuglyéAéÐé7éFc-CsØd|_|j}y0|j|_|jdƒs&tƒ‚|j|_|jƒs:dSWntk
rPYnX||_|j}y8|j|_|jdƒsxtƒ‚|j|_|jdƒsŽdSd|_Wntk
rªYnX||_|j}yüxö|j}yÌy˜x’|j}yH|j	t
jddƒsètƒ‚|j|_|jdƒstƒ‚|j|_||_t
ƒ‚Wntk
r.YnX||_|j|jkrJtƒ‚|jd7_qÊWWnt
k
rtYnX|jdƒs†dSd|_w¾Wntk
r¦YnX||_Pq¾WWntk
rÌYnX||_dS)	NFrÚyÚYTéaéyr)Ú	B_Y_foundÚcursorÚbraÚeq_sÚlab0ÚketÚ	slice_delÚlab1Ú
slice_fromZin_groupingrÚg_vÚlab5Úlab4ÚlimitÚlab3Úlab2)ÚselfÚv_1Úv_2Úv_3Zv_4Úv_5©rPúJ/tmp/pip-build-gk9425m9/snowballstemmer/snowballstemmer/english_stemmer.pyZ__r_prelude¦sz





zEnglishStemmer.__r_preludecCs<|j|_|j|_|j}yyŽ|j}y |jtjƒdkr:tƒ‚tƒ‚Wntk
rVYnX||_|j	tj
ddƒsttƒ‚|jd7_|jtj
ddƒs˜tƒ‚|jd7_Wntk
r¼YnX|j|_|j	tj
ddƒsÜtƒ‚|jd7_|jtj
ddƒstƒ‚|jd7_|j|_Wntk
r0YnX||_dS)Nrr:r;rT)
rHÚI_p1ÚI_p2r=Ú
find_amongrÚa_0rJrCZgo_out_groupingrEr@Zgo_in_grouping)rKrLrMrPrPrQZ__r_mark_regionsàsB
zEnglishStemmer.__r_mark_regionscCsÐy¶|j|j}yL|jtjddƒs&tƒ‚|jtjddƒs<tƒ‚|jtjddƒsRtƒ‚tƒ‚Wntk
rnYnX|j||_|jtjddƒsdS|jtjddƒs¤dS|j|j	kr´dSWntk
rÊYnXdS)NéYr;r:FT)
rHr=Úout_grouping_brÚg_v_WXYrCÚ
in_grouping_brEr@Úlimit_backward)rKrLrPrPrQZ
__r_shortvs,
zEnglishStemmer.__r_shortvcCs|j|jksdSdS)NFT)rRr=)rKrPrPrQZ__r_R1szEnglishStemmer.__r_R1cCs|j|jksdSdS)NFT)rSr=)rKrPrPrQZ__r_R2szEnglishStemmer.__r_R2cCs¦|j|j}yB|j|_|jtjƒdkr8|j||_tƒ‚|j|_|jƒsLdSWntk
rbYnX|j|_|jtj	ƒ}|dkr„dS|j|_|dkr¦|j
dƒs¢dSnü|dkrFy||j|j}y8|jd}||jkrÚtƒ‚||_|j
dƒsîdSt
ƒ‚Wntk
rYnX|j||_|j
dƒs*dSWnt
k
rBYnXn\|dkr¢|j|jkrbdS|jd8_|jtjd	d
ƒs†dS|jd8_|jƒs¢dSdS)NrFrr
rÚiZier	r:r;T)rHr=rAÚfind_among_brÚa_1r@r>rBÚa_2rDrZrJrCÚgo_out_grouping_brE)rKrLÚ	among_varrMÚcrPrPrQZ__r_Step_1a s^







zEnglishStemmer.__r_Step_1acCs|j|_|jtjƒ}|dkr dS|j|_|dkrN|jƒs<dS|jdƒsJdSn>|j|j}|j	tj
ddƒsndS|jd8_|j||_|jƒs”dS|j|j}|jtjƒ}|dkr¸dS|j||_|dkrì|j}|j
|j|jdƒ||_n |dkr6|j|_|j|jkrdS|jd8_|j|_|jƒsŒdSnV|j|jkrHdS|j|j}|jƒsbdS|j||_|j}|j
|j|jdƒ||_d	S)
NrFrÚeer:r;r.rT)r=rAr\rÚa_4r>Ú_EnglishStemmer__r_R1rDrHr_rErBÚa_3ÚinsertrZrRÚ_EnglishStemmer__r_shortv)rKr`rLrMrarNrPrPrQZ__r_Step_1bPsX



zEnglishStemmer.__r_Step_1bcCsÒ|j|_yZ|j|j}y|jdƒs(tƒ‚tƒ‚Wntk
rDYnX|j||_|jdƒs`dSWntk
rvYnX|j|_|jtj	ddƒs”dSy|j|j
kr¨tƒ‚dStk
r¾YnX|jdƒsÎdSdS)Nr8r9Fr:r;r[T)
r=rArHÚeq_s_brCr@r>rWrrErZrJrD)rKrLrPrPrQZ__r_Step_1c‚s4



zEnglishStemmer.__r_Step_1ccCsæ|j|_|jtjƒ}|dkr dS|j|_|jƒs4dS|dkrN|jdƒsJdSn”|dkrh|jdƒsddSnz|dkr‚|jdƒs~dSn`|d	krœ|jd
ƒs˜dSnF|dkr¶|jdƒs²dSn,|d
krÐ|jdƒsÌdSn|dkrê|jdƒsædSnø|dkr|jdƒsâdSnÜ|dkr"|jdƒsâdSnÀ|dkr>|jdƒsâdSn¤|dkrZ|jdƒsâdSnˆ|dkrv|jdƒsâdSnl|dkr¢|jdƒsdS|jdƒsâdSn@|dkr¾|jdƒsâdSn$|j	tj
d d!ƒsÔdS|jƒsâdSd"S)#NrFrÚtionrr%r	r$rr&rr,r!r)rr'rr*rr"rr+rr(rZblerr/ZogrÚlessécétT)r=rAr\rÚa_5r>rdrDrhrYÚ
g_valid_LIrB)rKr`rPrPrQZ
__r_Step_2›sp














zEnglishStemmer.__r_Step_2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skirr3r	ZdierZlierZtier!ZidlrZgentlrZuglirZearlirZonlirZsinglT)r=r>rTrÚa_10rArHrD)rKr`rPrPrQZ__r_exception1CsR










zEnglishStemmer.__r_exception1cCsÞ|js
dSxÎ|j}y¦y|xv|j}y0|j|_|jdƒs8tƒ‚|j|_||_tƒ‚Wntk
rbYnX||_|j|jkr|tƒ‚|jd7_qWWntk
r¤YnX|j	dƒs´dSwWntk
rÌYnX||_PqWdS)NFr9rr8T)
r<r=r>r?rJrArCrHr@rD)rKrLrMrPrPrQZ__r_postludens>


zEnglishStemmer.__r_postludec
-CsRy4|j}y|jƒstƒ‚tƒ‚Wntk
r6YnX||_yV|j}y*|jd}||jkrbtƒ‚||_tƒ‚Wntk
r„YnX||_tƒ‚Wntk
r¨YnX||_|jƒ|jƒ|j|_	|j|_|j|j}|j
ƒ|j||_y|j|j}y|jƒstƒ‚t
ƒ‚Wntk
r0YnX|j||_|j|j}|jƒ|j||_|j|j}|jƒ|j||_|j|j}|jƒ|j||_|j|j}	|jƒ|j|	|_|j|j}
|jƒ|j|
|_|j|j}|jƒ|j||_Wnt
k
rYnX|j	|_|j}|jƒ||_Wntk
rLYnXdS)Nr	T)r=Ú_EnglishStemmer__r_exception1rCr@rHrIrJÚ_EnglishStemmer__r_preludeÚ_EnglishStemmer__r_mark_regionsrZÚ_EnglishStemmer__r_Step_1aÚ_EnglishStemmer__r_exception2rFrGÚ_EnglishStemmer__r_Step_1bÚ_EnglishStemmer__r_Step_1cÚ_EnglishStemmer__r_Step_2Ú_EnglishStemmer__r_Step_3Ú_EnglishStemmer__r_Step_4Ú_EnglishStemmer__r_Step_5Ú_EnglishStemmer__r_postlude)
rKrLrMrarOZv_6Zv_7Zv_8Zv_9Zv_10Zv_11Zv_12Zv_13rPrPrQÚ_stemŒs†







zEnglishStemmer._stemNéÿÿÿÿrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒrƒ)&Ú__name__Ú
__module__Ú__qualname__Ú__doc__rrUr]r^rercrmrorrrsrtrurErXrnr<rSrRrwrxrgrdrpryr{r|r}r~rr€rzrvrr‚rPrPrPrQrs





























































































: 02< &	+rc@seZdZdS)r@N)r„r…r†rPrPrPrQr@Ìsr@c@seZdZdS)rCN)r„r…r†rPrPrPrQrCÏsrCc@seZdZdS)rJN)r„r…r†rPrPrPrQrJÒsrJc@seZdZdS)rIN)r„r…r†rPrPrPrQrIÕsrIc@seZdZdS)rGN)r„r…r†rPrPrPrQrGØsrGc@seZdZdS)rFN)r„r…r†rPrPrPrQrFÛsrFN)ZbasestemmerrZamongrrÚ
BaseExceptionr@rCrJrIrGrFrPrPrPrQÚ<module>sJ