o
    Ti	                     @   sH  d Z ddlmZ ddlZddlmZ ddlmZ ddlm	Z	 ddl
mZ g edd	fed
dfeddfeddfeddfeddfeddfeddfeddfeddfeddfeddfedd fed!d"fed#d$fed%d&fed'd(fed)d*fed+d,fed-d.fed/d0fed1d,fed2d&fed3d4fed5d6fed7d8fed9d:fed;d$fed<d=fed>d?fed@dAfR ZeedBdCZG dDdE dEeZe ZeejejdF eejejdF dS )GuQ   CYRILLIC 相关的几个拼音风格实现:

Style.CYRILLIC
Style.CYRILLIC_FIRST
    )unicode_literalsN)Style)register)RE_TONE3)replace_symbol_to_numberongungz([zcs])iz\1Uz([xqj])uz\1vz^wu(.?)$zu\1z
(.+)r(.?)$z\1R\2z^zhCrz^chCz^jqZz^zz^xsz^shSz([^CSdst])uoz\1oz^y(.*)$zI\1IaiAIIaAIeEIiiIouVIuvz
(.v)(\d?)$z\1I\2IoOiuiehuihueiuiuIaiaIeieIiaz(.*[^h])n([^g]?)$z\1nM\2z(.*[^h])ng(.?)$z\1n\2z^v(\d?$)vI#abwgdEOrZiIklmnopRstufhqcCSHTMUevAVuF   абвгдеёжзийклмнопрстуфхццчшщъьыэюяюc                   @   s$   e Zd Zdd Zdd Zdd ZdS )CyrillicfoConverterc                 K   s<   |  |}tD ]
\}}|||}qddd |D }|S )N c                 s   s    | ]	}t ||V  qd S )N)CYRILLIC_TABLEget).0x r/   K/home/ubuntu/.local/lib/python3.10/site-packages/pypinyin/style/cyrillic.py	<genexpr>=   s    z2CyrillicfoConverter.to_cyrillic.<locals>.<genexpr>)_pre_convertCYRILLIC_REPLACEsubjoin)selfpinyinkwargsfind_rereplacer/   r/   r0   to_cyrillic8   s
   
zCyrillicfoConverter.to_cyrillicc                 K   s   | j |fi |}|d S )Nr   )r;   )r6   r7   r8   r/   r/   r0   to_cyrillic_first@   s   z%CyrillicfoConverter.to_cyrillic_firstc                 C   s   t |}td|S )Nz\1\3\2)r   r   r4   )r6   r7   r/   r/   r0   r2   D   s   z CyrillicfoConverter._pre_convertN)__name__
__module____qualname__r;   r<   r2   r/   r/   r/   r0   r)   7   s    r)   )func)__doc__
__future__r   repypinyin.constantsr   pypinyin.styler   pypinyin.style._constantsr   pypinyin.style._utilsr   compiler3   dictzipr+   objectr)   	converterCYRILLICr;   CYRILLIC_FIRSTr<   r/   r/   r/   r0   <module>   s   	
!