Ë
    ›¾jw  ã                   ó
   — d „ Z y)c                 ó¦   ‡— | €yt        | «      } t        «       t        «       t        «       dœŠˆfd„}| D ]  }t        |«      dkD  sŒ ||«       Œ ‰S )aÅ  
    This function is to create a new dictionary used for improving tokenization model for multi-syllable words languages
    such as vi, zh or th. This function takes the lexicon as input and output a dictionary that contains three set:
    words, prefixes and suffixes where prefixes set should contains all the prefixes in the lexicon and similar for suffixes.
    The point of having prefixes/suffixes sets in the  dictionary is just to make it easier to check during data preparation.

    :param shorthand - language and dataset, eg: vi_vlsp, zh_gsdsimp
    :param lexicon - set of words used to create dictionary
    :return a dictionary object that contains words and their prefixes and suffixes.
    N)ÚwordsÚprefixesÚsuffixesc                 ó  •— | ‰d   vr}‰d   j                  | «       d}d}t        dt        | «      dz
  «      D ]I  }|| |   z   }| t        | «      |z
  dz
     |z   }‰d   j                  |«       ‰d   j                  |«       ŒK y y )Nr   Ú é    é   r   r   )ÚaddÚrangeÚlen)ÚwordÚprefixÚsuffixÚiÚ
dictionarys       €úd/home/spazio/kingdom_calls/work5/transenv/lib/python3.12/site-packages/minisbd/modules/dictionary.pyÚadd_wordz#create_dictionary.<locals>.add_word   s    ø€ Ø�z 'Ñ*Ñ*Ø�wÑ×#Ñ# DÔ)ØˆFØˆFÜ˜1œS ›Y q™[Ó)ò 3�Ø $ q¡'Ñ)�Øœc $›i¨!™m¨aÑ/Ñ0°6Ñ9�Ø˜:Ñ&×*Ñ*¨6Ô2Ø˜:Ñ&×*Ñ*¨6Õ2ñ	3ð	 +ó    r	   )Úsetr   )Úlexiconr   r   r   s      @r   Úcreate_dictionaryr      sX   ø€ ð €ØÜ�'‹l€GÜ›%¬C«E¼c»eÑD€Jô	3ð ò ˆÜˆt‹9�Q‹;Ù�T�Nðð Ðr   N)r   © r   r   ú<module>r      s
   ðór   