o
    jo™i€	  ã                   @   s$  d Z ddlZddlmZ ddlmZ dejdejdejdejfd	d
„Ze ddddd¡Ze ddddddddddddddddddd d!d"¡Z	e ee	¡ 
¡  ¡ Ze g d#¢¡Zee	 e d!d$¡ Zee dd%d&d d"¡ e d'¡ Zee d¡ Zeeeeeeeeƒeƒeƒ ¡ Zd(edefd)d*„ZdS )+z4Sketch of English noun plurals using priority union.é    N)Úpynutil)ÚrewriteÚqÚrÚsigmaÚreturnc                 C   s    |t  | d¡ }t  | || ¡S )NÚinput)ÚpyniniÚprojectÚunion)r   r   r   Úcomplement_domain_q© r   úK/home/ubuntu/.local/lib/python3.10/site-packages/pynini/examples/plurals.pyÚ_priority_union   s   r   ÚaÚeÚiÚoÚuÚbÚcÚdÚfÚgÚhÚjÚkÚlÚmÚnÚpÚsÚtÚvÚwÚxÚyÚz)ÚdeerÚfishÚsheep)ÚfootÚfeet)ÚgooseÚgeese)ÚmanÚmen)ÚmouseÚmice)ÚtoothÚteeth)ÚwomanÚwomen)ÚchildÚchildren)ÚoxÚoxen)ÚwifeÚwives)ÚwolfÚwolves)ÚanalysisÚanalyses)Ú	criterionÚcriteria)ÚfocusÚfociÚiesÚshÚchÚesÚsingularc                 C   s   t  | t¡S )N)r   Úone_top_rewriteÚ_plural)rI   r   r   r   ÚpluralK   s   rL   )Ú__doc__r	   Ú
pynini.libr   r   ÚFstr   r   Ú_vÚ_cÚclosureÚoptimizeÚ_sigmaÚ
string_mapÚ_suppletiveÚcrossÚ_iesÚinsertÚ_esÚ_srK   ÚstrrL   r   r   r   r   Ú<module>   s6   ÿ
ÿÿ ÿþþ