o
    Mi                     @   s  d dl mZ d dlmZ G dd deZG dd deZG dd deZG d	d
 d
eZG dd deZ	G dd deZ
G dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd  d eZG d!d" d"eZG d#d$ d$eZG d%d& d&eZG d'd( d(eZG d)d* d*eZG d+d, d,eZG d-d. d.eZG d/d0 d0eZG d1d2 d2eZG d3d4 d4eZG d5d6 d6eZG d7d8 d8eZG d9d: d:eZ G d;d< d<eZ!G d=d> d>eZ"G d?d@ d@eZ#G dAdB dBeZ$G dCdD dDeZ%G dEdF dFeZ&G dGdH dHeZ'G dIdJ dJeZ(G dKdL dLeZ)G dMdN dNeZ*G dOdP dPeZ+G dQdR dReZ,G dSdT dTeZ-G dUdV dVeZ.G dWdX dXeZ/G dYdZ dZeZ0G d[d\ d\eZ1G d]d^ d^eZ2G d_d` d`eZ3G dadb dbeZ4G dcdd ddeZ5G dedf dfeZ6G dgdh dheZ7G didj djeZ8G dkdl dleZ9G dmdn dneZ:G dodp dpeZ;dqS )r   )BaseStemmer)Amongc                   @   s  e Zd ZdZh dZh dZh dZh dZddhZdd	hZ	d
dhZ
ddhZdZdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd Zdd  Zd!d" Zd#d$ Zd%d& Zd'd( Zd)d* Zd+d, Zd-d. Zd/d0 Zd1d2 Zd3d4 Zd5d6 Z d7d8 Z!d9d: Z"d;d< Z#d=d> Z$d?d@ Z%dAdB Z&dCdD Z'dEdF Z(dGdH Z)dIdJ Z*dKdL Z+dMdN Z,dOdP Z-dQdR Z.dSdT Z/dUdV Z0dWdX Z1dYdZ Z2d[d\ Z3d]d^ Z4d_d` Z5dadb Z6e7dcdddde7dedddde7dfdddde7dgdddde7dhdddde7didddde7djdddde7dkdddde7dldddde7dmddddg
Z8e7dndddde7doddddgZ9e7dpdddde7dqdddde7drdddde7dsddddgZ:e7dtdddde7dudddde7dvdddde7dwddddgZ;e7ddddde7dddddgZ<e7dxdddde7dyddddgZ=e7dzdddde7d{dddde7d|dddde7d}ddddgZ>e7d~dddde7dddddgZ?e7ddddde7ddddde7ddddde7dddddgZ@e7ddddde7dddddgZAe7ddddde7dddddgZBe7ddddde7dddddgZCe7ddddde7ddddde7ddddde7dddddgZDe7ddddde7ddddde7ddddde7dddddgZEe7ddddde7ddddde7ddddde7dddddgZFe7ddddde7ddddde7ddddde7dddddgZGe7ddddde7dddddgZHe7dgdddde7didddde7dkdddde7dmddddgZIe7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7dddddgZJe7ddddde7dddddgZKg e7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7dddddZLe7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7ddddde7dddddgZMe7ddddde7ddddde7ddddde7dddddgZNe7ddddӃe7ddddՃe7dddd׃e7ddddكgZOdS )TurkishStemmerz
    This class implements the stemming algorithm defined by a snowball script.
    Generated from turkish.sbl by Snowball 3.0.1 - https://snowballstem.org/
    >   aeiou   ö   ü   ı>   r   r	   r   r   >   r   r   r	   r   >   r   r   r
   r   r   r   r   r   r   r	   r
   r   Fc                 C   sv  | j | j }| tjsdS z| j | j }z| dst | tjs(t t  ty3   Y nw | j | | _z| dsCt	 | tj
sLt	 t  t	yW   Y nw | j | | _z| dsgt | tjspt t  ty{   Y nw | j | | _z| dst | tjst t  ty   Y nw | j | | _z| dst | tjst t  ty   Y nw | j | | _z| dst | tjst t  ty   Y nw | j | | _z| dst | tjst t  ty   Y nw | j | | _| d	sW dS | tjs'W dS W n
 ty2   Y nw | j | | _d
S )NFr   r   r   r   r   r
   r	   r   T)limitcursorgo_out_grouping_br   g_voweleq_s_blab1g_vowel1lab0lab2g_vowel2lab3g_vowel3lab4g_vowel4lab5g_vowel5lab6g_vowel6lab7selfv_1v_2 r$   S/home/ubuntu/.local/lib/python3.10/site-packages/snowballstemmer/turkish_stemmer.py__r_check_vowel_harmony    s   






z&TurkishStemmer.__r_check_vowel_harmonyc                 C   .  z| j | j }z | dst | j | j }| tjst | j | | _t  ty0   Y nw | j | | _| j | j }z| j | j }| dsLt | j | | _W W dS  ty^   Y nw | j | | _| j | j }| j| j	krtW dS |  jd8  _| tjsW dS | j | | _W dS  ty   Y dS w )NnFr   T
r   r   r   r   in_grouping_br   r   r   r   limit_backwardr!   r"   r#   v_3v_4v_5r$   r$   r%   )__r_mark_suffix_with_optional_n_consonantf   @   

z8TurkishStemmer.__r_mark_suffix_with_optional_n_consonantc                 C   r'   )NsFr   Tr)   r,   r$   r$   r%   )__r_mark_suffix_with_optional_s_consonant   r1   z8TurkishStemmer.__r_mark_suffix_with_optional_s_consonantc                 C   r'   )NyFr   Tr)   r,   r$   r$   r%   )__r_mark_suffix_with_optional_y_consonant   r1   z8TurkishStemmer.__r_mark_suffix_with_optional_y_consonantc                 C   s2  z| j | j }z!| tjst | j | j }| tjs t | j | | _t  ty1   Y nw | j | | _| j | j }z| j | j }| tjsNt	 | j | | _W W dS  t	y`   Y nw | j | | _| j | j }| j| j
krvW dS |  jd8  _| tjsW dS | j | | _W dS  ty   Y dS w )NFr   T)r   r   r*   r   g_Ur   out_grouping_br   r   r   r+   r,   r$   r$   r%   %__r_mark_suffix_with_optional_U_vowel   s@   z4TurkishStemmer.__r_mark_suffix_with_optional_U_vowelc                 C   $   |  tjdkr
dS |  sdS dS N    FT)find_among_br   a_04_TurkishStemmer__r_mark_suffix_with_optional_U_vowelr!   r$   r$   r%   __r_mark_possessives   
   z#TurkishStemmer.__r_mark_possessivesc                 C   ,   |   sdS | tjsdS |  sdS dS NFT)&_TurkishStemmer__r_check_vowel_harmonyr*   r   r6   8_TurkishStemmer__r_mark_suffix_with_optional_s_consonantr?   r$   r$   r%   __r_mark_sU      zTurkishStemmer.__r_mark_sUc                 C      |  tjdkr
dS dS r:   )r<   r   a_1r?   r$   r$   r%   __r_mark_lArI      zTurkishStemmer.__r_mark_lArIc                 C   rB   rC   )rD   r*   r   r6   8_TurkishStemmer__r_mark_suffix_with_optional_y_consonantr?   r$   r$   r%   __r_mark_yU   rG   zTurkishStemmer.__r_mark_yUc                 C   $   |   sdS | tjdkrdS dS NFr;   T)rD   r<   r   a_2r?   r$   r$   r%   __r_mark_nU  
   zTurkishStemmer.__r_mark_nUc                 C   0   |   sdS | tjdkrdS |  sdS dS rO   )rD   r<   r   a_38_TurkishStemmer__r_mark_suffix_with_optional_n_consonantr?   r$   r$   r%   __r_mark_nUn     zTurkishStemmer.__r_mark_nUnc                 C   rS   rO   )rD   r<   r   a_4rL   r?   r$   r$   r%   __r_mark_yA  rW   zTurkishStemmer.__r_mark_yAc                 C   rN   rO   )rD   r<   r   a_5r?   r$   r$   r%   __r_mark_nA  rR   zTurkishStemmer.__r_mark_nAc                 C   rN   rO   )rD   r<   r   a_6r?   r$   r$   r%   __r_mark_DA$  rR   zTurkishStemmer.__r_mark_DAc                 C   rN   rO   )rD   r<   r   a_7r?   r$   r$   r%   __r_mark_ndA+  rR   zTurkishStemmer.__r_mark_ndAc                 C   rN   rO   )rD   r<   r   a_8r?   r$   r$   r%   __r_mark_DAn2  rR   zTurkishStemmer.__r_mark_DAnc                 C   rN   rO   )rD   r<   r   a_9r?   r$   r$   r%   __r_mark_ndAn9  rR   zTurkishStemmer.__r_mark_ndAnc                 C   rS   rO   )rD   r<   r   a_10rL   r?   r$   r$   r%   __r_mark_ylA@  rW   zTurkishStemmer.__r_mark_ylAc                 C   s   |  dsdS dS )NkiFT)r   r?   r$   r$   r%   __r_mark_kiI  s   
zTurkishStemmer.__r_mark_kic                 C   rS   rO   )rD   r<   r   a_11rU   r?   r$   r$   r%   __r_mark_ncAN  rW   zTurkishStemmer.__r_mark_ncAc                 C   rS   rO   )rD   r<   r   a_12rL   r?   r$   r$   r%   __r_mark_yUmW  rW   zTurkishStemmer.__r_mark_yUmc                 C   rN   rO   )rD   r<   r   a_13r?   r$   r$   r%   __r_mark_sUn`  rR   zTurkishStemmer.__r_mark_sUnc                 C   rS   rO   )rD   r<   r   a_14rL   r?   r$   r$   r%   __r_mark_yUzg  rW   zTurkishStemmer.__r_mark_yUzc                 C   rH   r:   )r<   r   a_15r?   r$   r$   r%   __r_mark_sUnUzp  rK   zTurkishStemmer.__r_mark_sUnUzc                 C   rN   rO   )rD   r<   r   a_16r?   r$   r$   r%   __r_mark_lAru  rR   zTurkishStemmer.__r_mark_lArc                 C   rN   rO   )rD   r<   r   a_17r?   r$   r$   r%   __r_mark_nUz|  rR   zTurkishStemmer.__r_mark_nUzc                 C   rN   rO   )rD   r<   r   a_18r?   r$   r$   r%   __r_mark_DUr  rR   zTurkishStemmer.__r_mark_DUrc                 C   rH   r:   )r<   r   a_19r?   r$   r$   r%   __r_mark_cAsInA  rK   zTurkishStemmer.__r_mark_cAsInAc                 C   rS   rO   )rD   r<   r   a_20rL   r?   r$   r$   r%   __r_mark_yDU  rW   zTurkishStemmer.__r_mark_yDUc                 C   r9   r:   )r<   r   a_21rL   r?   r$   r$   r%   __r_mark_ysA  rA   zTurkishStemmer.__r_mark_ysAc                 C   rS   rO   )rD   r<   r   a_22rL   r?   r$   r$   r%   __r_mark_ymUs_  rW   zTurkishStemmer.__r_mark_ymUs_c                 C   s   |  dsdS |  sdS dS )NkenFT)r   rL   r?   r$   r$   r%   __r_mark_yken  s
   
zTurkishStemmer.__r_mark_ykenc                 C   s  | j | _d| _z| j| j  }zkz_| j| j  }z
|  st t  ty*   Y nw | j| | _ z
|  s9t t  tyD   Y nw | j| | _ z
| 	 sSt
 t  t
y^   Y nw | j| | _ |  slt W t  tyz   Y t w  ty   Y nw | j| | _ z|  st z| j| j  }z
|  st t  ty   Y nw | j| | _ z
|  st t  ty   Y nw | j| | _ z
|  st t  ty   Y nw | j| | _ z
|  st t  ty   Y nw | j| | _ z|  s
t t  ty   Y nw | j| | _ W n
 ty(   Y nw |  s1t t  ty=   Y nw | j| | _ z|  sMt | j | _|  sZW W dS | j| j  }z{| j | _zj| j| j  }z|  sut t   ty   Y nw | j| | _ z|  st! t   t!y   Y nw | j| | _ z| 	 st" t   t"y   Y nw | j| | _ |  s| j| | _ t# W n
 t y   Y nw W n
 t#y   Y nw d| _t  ty   Y nw | j| | _ zC| $ st% z.| j| j  }z|  st& t'  t&y!   Y nw | j| | _ | 	 s0t% W t  t'y?   Y t w  t%yI   Y nw | j| | _ zzd| j| j  }z|  sat( t)  t(ym   Y nw | j| | _ z|  s}t* t)  t*y   Y nw | j| | _ z|  st+ t)  t+y   Y nw | j| | _ |  st, W n
 t)y   Y nw | j | _|  sW W dS | j| j  }z| j | _|  s| j| | _ t- W t  t-y   Y t w  t,y   Y nw | j| | _ |  sW dS | j | _|  sW dS | j| j  }	z| j | _z| j| j  }
z|  s5t. t/  t.yA   Y nw | j|
 | _ z|  sQt0 t/  t0y]   Y nw | j|
 | _ z|  smt1 t/  t1yy   Y nw | j|
 | _ z|  st2 t/  t2y   Y nw | j|
 | _ z|  st3 t/  t3y   Y nw | j|
 | _ W n
 t/y   Y nw |  s| j|	 | _ t4 W n
 t4y   Y nw W n
 ty   Y nw | j | _|  sdS dS )NTF)5r   ket!B_continue_stemming_noun_suffixesr   _TurkishStemmer__r_mark_ymUs_r   r   _TurkishStemmer__r_mark_yDUr   _TurkishStemmer__r_mark_ysAr   _TurkishStemmer__r_mark_ykenr   r   _TurkishStemmer__r_mark_cAsInAr   _TurkishStemmer__r_mark_sUnUzlab8r   _TurkishStemmer__r_mark_lArlab9_TurkishStemmer__r_mark_yUmlab10_TurkishStemmer__r_mark_sUnlab11_TurkishStemmer__r_mark_yUzlab12lab13bra	slice_del_TurkishStemmer__r_mark_DUrlab16lab15lab17lab18lab14_TurkishStemmer__r_mark_nUzlab19lab21lab20lab24lab23lab25lab26lab22lab27lab30lab29lab31lab32lab33lab34lab28)r!   r"   r#   r-   r.   r/   v_6v_7v_8v_9v_10r$   r$   r%   __r_stem_nominal_verb_suffixes  s  

























z-TurkishStemmer.__r_stem_nominal_verb_suffixesc                 C   s  | j | _|  s
dS z| j| j  }z|  st | j | _|  s&W W dS | j| j  }z| j | _z| j| j  }z9|  s@t	 | j | _|  sOW W W W W dS | j| j  }z| 
 sc| j| | _ t W t  tyq   Y t w  t	yz   Y nw | j| | _ |  s| j| | _ t | j | _|  sW W W W dS | j| j  }z/| j | _|  s| j| | _ t | j | _|  sW W W W W dS | 
 s| j| | _ t W n	 ty   Y nw W W t W W t  ty   Y W t w  ty   Y t w  ty   Y nw | j| | _ z#|  st | j | _|  s#W W dS | j| j  }z| j | _z| j| j  }z|  s>t | j | _|  sNW W W W W dS t  tyZ   Y nw | j| | _ z| j | _z,| j| j  }z|  svt t  ty   Y nw | j| | _ |  st W n
 ty   Y nw | j | _|  sW W W W W dS | j| j  }	z5| j | _|  s| j|	 | _ t | j | _|  sW W W W W W dS | 
 s| j|	 | _ t W t  ty   Y t w  ty   Y nw | j| | _ | 
 s| j| | _ t W W t  ty$   Y W t w  ty0   Y t w  ty:   Y nw | j| | _ |  sIW dS z| j| j  }
z|  sYt | j | _|  sgW W W dS t  tys   Y nw | j|
 | _ z\|  st | j | _|  sW W W dS | j| j  }z3| j | _|  s| j| | _ t  | j | _|  sW W W W dS | 
 s| j| | _ t  W t  t y   Y t w  ty   Y nw | j|
 | _ | 
 sW W dS W W dS  ty   Y W dS w  ty
   Y dS w rC   )!r   r   _TurkishStemmer__r_mark_kir   _TurkishStemmer__r_mark_DAr   r   r   r   r   ._TurkishStemmer__r_stem_suffix_chain_before_kir   r   #_TurkishStemmer__r_mark_possessivesr   r   r   _TurkishStemmer__r_mark_nUnr   _TurkishStemmer__r_mark_lArIr   r   r   r   _TurkishStemmer__r_mark_sUr   r   r   _TurkishStemmer__r_mark_ndAr   r   r   r   )r!   r"   r#   r-   r.   r/   r   r   r   r   r   v_11r$   r$   r%   __r_stem_suffix_chain_before_ki  sn  





















z.TurkishStemmer.__r_stem_suffix_chain_before_kic                 C   s@  z| j | j }z:| j| _|  st | j| _|  s W W dS | j | j }z|  s4| j | | _t W t	  tyB   Y t	 w  tyK   Y nw | j | | _z@| j| _| 
 s_t | j| _|  skW W dS | j | j }zz| j | j }z| j| _|  st | j| _|  sW W W W W dS t  ty   Y nw | j | | _z| j| _z)| j | j }z
|  st t  ty   Y nw | j | | _|  st W n	 ty   Y nw | j| _|  sW W W W W dS | j | j }z5| j| _|  s| j | | _t | j| _|  sW W W W W W dS |  s'| j | | _t W t  ty6   Y t w  ty@   Y nw | j | | _| j| _|  sY| j | | _t | j| _|  shW W W W dS |  sv| j | | _t W W t	  ty   Y W t	 w  ty   Y t	 w  ty   Y nw | j | | _z| j| _z,| j | j }z|  st t  ty   Y nw | j | | _|  st W n
 ty   Y nw z| j | j }z|  st | j| _|  sW W W W dS t  ty   Y nw | j | | _z^|  st | j| _|  s*W W W W dS | j | j }	z4| j| _|  sC| j |	 | _t | j| _|  sSW W W W W dS |  sa| j |	 | _t W t  typ   Y t w  tyz   Y nw | j | | _|  st W t	  ty   Y t	 w  ty   Y nw | j | | _z| j| _z,| j | j }
z|  st  t!  t y   Y nw | j |
 | _| " st# W n
 t!y   Y nw z| j | j }z^|  st$ | j| _|  sW W W W dS | j | j }z4| j| _|  s| j | | _t% | j| _|  s-W W W W W dS |  s;| j | | _t% W t&  t%yJ   Y t& w  t$yT   Y nw | j | | _|  sct# W t	  t&yr   Y t	 w  t#y|   Y nw | j | | _z| j| _| ' st( | j| _|  sW W dS | j | j }z| j| _z| j | j }z`|  st) | j| _|  sW W W W W dS | j | j }z5| j| _|  s| j | | _t* | j| _|  sW W W W W W dS |  s| j | | _t* W t+  t*y   Y t+ w  t)y   Y nw | j | | _z=|  s*t, | j| _|  s:W W W W W dS | j | j }z|  sO| j | | _t- W t+  t-y^   Y t+ w  t,yh   Y nw | j | | _|  s}| j | | _t. W W t	  t+y   Y W t	 w  t.y   Y t	 w  t(y   Y nw | j | | _z_| j| _z,| j | j }z| / st0 t1  t0y   Y nw | j | | _| 2 st3 W n
 t1y   Y nw | j| _|  sW W dS | j | j }zz| j | j }z'| j| _|  st4 | j| _|  s!W W W W W dS |  s)t4 t5  t4y5   Y nw | j | | _z| j| _z,| j | j }z|  sQt6 t7  t6y]   Y nw | j | | _|  slt8 W n
 t7yw   Y nw | j| _|  sW W W W W dS | j | j }z5| j| _|  s| j | | _t9 | j| _|  sW W W W W W dS |  s| j | | _t9 W t5  t9y   Y t5 w  t8y   Y nw | j | | _|  s| j | | _t: W W t	  t5y   Y W t	 w  t:y   Y t	 w  t3y   Y nw | j | | _z| j| _|  s)t; | j| _|  s6W W dS t	  t;yB   Y nw | j | | _z|  sRt< t	  t<y^   Y nw | j | | _z| j| _zH| j | j }z| = s{t> t?  t>y   Y nw | j | | _z| @ stA t?  tAy   Y nw | j | | _| B stC W n
 t?y   Y nw | j| _|  sW W dS | j | j }z| j| _zh| j | j }zA|  stD | j| _|  sW W W W W dS | j | j }z| j| _|  s| j | | _tE W tF  tEy   Y tF w  tDy(   Y nw | j | | _|  s=| j | | _tG W n
 tFyH   Y nw | j| _|  sWW W W dS | j| _|  si| j | | _tG W t	  tGyx   Y t	 w  tCy   Y nw | j | | _| j| _z-| j | j }z|  stH tI  tHy   Y nw | j | | _|  sW W dS W n
 tIy   Y nw | j| _|  sW dS | j | j }z1| j| _|  s| j | | _tJ | j| _|  sW W dS |  s| j | | _tJ W W dS  tJy   Y W dS w  t	y   Y dS w rC   )Kr   r   r   r   r   r   r   r   r   r   _TurkishStemmer__r_mark_ncAr   r   r   r   r   r   r   r   r   r   r   r   r   r   _TurkishStemmer__r_mark_nAr   r   r   r   r   _TurkishStemmer__r_mark_ndAnr   r   _TurkishStemmer__r_mark_nUr   r   r   r   _TurkishStemmer__r_mark_DAnr   r   r   r   r   r   r   r   r   r   _TurkishStemmer__r_mark_ylAr   lab36lab35lab39lab38lab37lab40r   lab41lab42r   lab45lab44_TurkishStemmer__r_mark_yUlab46_TurkishStemmer__r_mark_yAlab43lab49lab50lab48lab47lab52lab51lab53)r!   r"   r#   r-   r.   r/   r   r   r   r   r   r   v_12v_13v_14v_15v_16v_17v_18v_19v_20v_21v_22v_23v_24v_25v_26v_27r$   r$   r%   __r_stem_noun_suffixes3  s  



































































z%TurkishStemmer.__r_stem_noun_suffixesc                 C   s   | j | _| tj}|dkrdS | j | _|dkr!| dsdS d
S |dkr.| ds,dS d
S |dkr;| ds9dS d
S | d	sBdS d
S )Nr;   Fr   p      ç   tkT)r   r   r<   r   a_23r   
slice_from)r!   	among_varr$   r$   r%    __r_post_process_last_consonants  s(   




z/TurkishStemmer.__r_post_process_last_consonantsc                 C   s.  | j | _| j | _z+| j| j  }z| dst t  ty#   Y nw | j| | _ | ds2W dS W n	 ty<   Y nw | tj	sEdS zE| j| j  }zAz+| j| j  }z| ds^t
 t  t
yi   Y nw | j| | _ | dsxt W n	 ty   Y nw | dsW W dS t  ty   Y nw | j| | _ zAz+| j| j  }z| dst t  ty   Y nw | j| | _ | dst W n	 ty   Y nw | dsW W dS t  ty   Y nw | j| | _ zFz.| j| j  }z| dst t  ty   Y nw | j| | _ | d	st W n
 ty(   Y nw | d	s3W W dS t  ty?   Y nw | j| | _ z/| j| j  }z| d
sWt t  tyc   Y nw | j| | _ | dstW W dS W n
 ty   Y nw | dsW dS W dS  ty   Y dS w )NdgFr   r   r   r   r   r	   r
   r   T)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_append_U_to_stems_ending_with_d_or_g   s   







z7TurkishStemmer.__r_append_U_to_stems_ending_with_d_or_gc                 C   sb   |  dsdS | j| j }z|  ds| j| | _t W n	 ty&   Y nw | j| jkr/dS dS )NadFsoyT)r   r   r   r   r+   )r!   r"   r$   r$   r%   __r_is_reserved_wordU  s   

z#TurkishStemmer.__r_is_reserved_wordc                 C   s  | j }z^| j | _zC	 | j }z!| j }z| dst t  ty%   Y nw || _ || _ t  ty7   Y nw || _ | j | jkrDt |  j d7  _ q
 tyT   Y nw | j | _| 	 s`W dS W n	 tyj   Y nw || _ | j }z_| j d }|| jkrt
 || _ z0	 | j }z| dst || _ t  ty   Y nw || _ | j | jkrt
 |  j d7  _ q ty   Y nw | j | _| j| _ | j | _| 	 sW dS W n	 t
y   Y nw || _ dS )NT'r   Fr   )r   r   eq_sr   r   r   r   r   r   r   r   r   r   )r!   r"   r#   r-   r.   cr/   r$   r$   r%   __r_remove_proper_noun_suffixb  sv   



z,TurkishStemmer.__r_remove_proper_noun_suffixc                 C   s:   | j }dD ]}| tjs dS |  j d7  _ q|| _ dS )N)r;   r;   Fr   T)r   go_out_groupingr   r   r    r$   r$   r%   __r_more_than_one_syllable_word  s   z.TurkishStemmer.__r_more_than_one_syllable_wordc                 C   s   | j | _| j| _ | j| j  }z
|  st W dS  ty!   Y nw | j| | _ | j| j  }|   | j| | _ | j| j  }|   | j| | _ | j| _ dS rC   )r   r+   r   #_TurkishStemmer__r_is_reserved_wordr   7_TurkishStemmer__r_append_U_to_stems_ending_with_d_or_g/_TurkishStemmer__r_post_process_last_consonants)r!   r"   r#   r-   r$   r$   r%   __r_postlude  s"   zTurkishStemmer.__r_postludec                 C   s   |    |  s
dS | j| _| j| _| j| j }|   | j| | _| js'dS | j| j }|   | j| | _| j| _|  sAdS dS rC   )	,_TurkishStemmer__r_remove_proper_noun_suffix._TurkishStemmer__r_more_than_one_syllable_wordr   r+   r   -_TurkishStemmer__r_stem_nominal_verb_suffixesr   %_TurkishStemmer__r_stem_noun_suffixes_TurkishStemmer__r_postlude)r!   r#   r-   r$   r$   r%   _stem  s"   zTurkishStemmer._stemmr(   miznizmuznuzu   müzu   nüzu   mızu   nızleriu   larıninuu   nüu   nıinunu   ünu   ınnanedatadetendandedantandentenndanndenlalecaceimumu   ümu   ımsinsunu   sünu   sınizuzu   üzu   ızsinizsunuzu   sünüzu   sınızlarlerdirtirdurturu   düru   türu   dıru   tıru   casınacesineditidiktikduktuku   düku   tüku   dıku   tıkdimtimdumtumu   dümu   tümu   dımu   tımdintinduntunu   dünu   tünu   dınu   tındutuu   düu   tüu   dıu   tısasesakseksamsemsansenu   mişu   muşu   müşu   mışbr   r   r   r   r   u   ğ   N)P__name__
__module____qualname____doc__r   r6   r   r   r   r   r   r   r   rD   rU   rE   rL   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=   rI   rP   rT   rX   rZ   r\   r^   r`   rb   rd   rh   rj   rl   rn   rp   rr   rt   rv   rx   rz   r|   r~   r   r$   r$   r$   r%   r      s   F    										 ] )   <U;

















































































	























 
$














r   c                   @      e Zd ZdS )r   NrO  rP  rQ  r$   r$   r$   r%   r         r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r      rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r   	  rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r     rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r   !  rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r   $  rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r   '  rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r   *  rU  r   c                   @   rS  )r   NrT  r$   r$   r$   r%   r   -  rU  r   N)<basestemmerr   amongr   r   BaseExceptionr   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%   <module>   s                