+
    ~j	                    v    ^ RI Ht ^ RIHtHt ^ RIHt ^RIHtH	t	 ]R R l4       t
]R R l4       t
R	 R
 lt
R# )    )annotations)AsyncGeneratorAsyncIterable)overload)_basic_word	tokenizerc               $    V ^8  d   QhRRRRRR/# )   textstrreplacementsdict[str, str]return )formats   "r/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/livekit/agents/tokenize/utils.py__annotate__r   
   s(      
 ! 		    c                    R # Nr   r   r   s   $$r   replace_wordsr   	   s    
 r   c               $    V ^8  d   QhRRRRRR/# )r
   r   zAsyncIterable[str]r   r   r   r   )r   s   "r   r   r      s(      
 ! 	r   c                    R # r   r   r   s   $$r   r   r      s    
 r   c               $    V ^8  d   QhRRRRRR/# )r
   r   zstr | AsyncIterable[str]r   r   r   r   )r   s   "r   r   r      s(     :  : 
":  !:  	: r   c                &  a aa SP                  4        UUu/ uF  w  r#VP                  4       VbK  	  uppoR V3R llo\        S \        4      '       d'   \        P
                  ! S RR7      pS! S V4      w  o pS # R VV 3R llpV! 4       # u uppi )z
Replace words in the given (async) text. The replacements are case-insensitive and the
replacement will keep the case of the original word.
Args:
    text: text to replace words in
    words: dictionary of words to replace
c               $    V ^8  d   QhRRRRRR/# )r
   r   r   wordszlist[tuple[str, int, int]]r   ztuple[str, int]r   )r   s   "r   r   #replace_words.<locals>.__annotate__(   s"     % %S %)C % %r   c                  < ^ p^ pV F  w  rEpVP                  RP                  \        P                  4      4      p\	        V4      \	        V4      ,
          pS
P                  VP                  4       4      p	V	'       dS   V RWR,            V	,           WV,           V,
          R ,           p V\	        V	4      \	        V4      ,
          V,           ,          pWb,           pK  	  W3# )r    N)rstripjoinr   PUNCTUATIONSlengetlower)r   r   offsetprocessed_indexwordstart_index	end_indexno_punctuationpunctuation_offreplacementr   s   &&        r   _process_words%replace_words.<locals>._process_words(   s    ,1(Dy![[1G1G)HIN!$i#n*==O&**>+?+?+ABK/;/0!"v-?ABC 
 #k*SY6HH'0O -2 $$r   Fignore_punctuationc                   V ^8  d   QhRR/# )r
   r   zAsyncGenerator[str, None]r   )r   s   "r   r   r   A   s     	 	&? 	r   c                .  <"   R p S  Rj  xL
  pW,          p \         P                  ! V RR7      p\        V4      ^8:  d   K<  S! WRR 4      w  rV RV 5x  WR p KW   LRDST '       d*   \         P                  ! T RR7      pS! Y4      w  rT 5x  R# R# 5i)r!   NFr2   )r   split_wordsr%   )bufferchunkr   procesed_index_r0   r   s        r   _replace_words%replace_words.<locals>._replace_wordsA   s     F# 	1 	1e#//5Qu:?)7cr
)K&_n--0	1t #//5Q*69	 s,   BA!AA!ABA!!B*+B)itemsr'   
isinstancer   r   r7   )r   r   kvr   r;   r<   r0   s   dd     @r   r   r      s     .:-?-?-AB-ATQAGGIqL-ABL% %& $''G u-a	 	$ [ Cs   BN)
__future__r   collections.abcr   r   typingr   r!   r   r   r   r   r   r   <module>rE      s>    " 9  $ 
 
 
 
: r   