
    ޺i                     V    S r SSKJrJr  SSKJr  SSKJr  S\S\	\S4   S\
\   4S	 jrg
)zStage 3: Statistical bigram scoring.

Note: ``from __future__ import annotations`` is intentionally omitted because
this module is compiled with mypyc, which does not support PEP 563 string
annotations.
    )BigramProfilescore_best_language)DetectionResult)EncodingInfodata
candidates.returnc                 8   U (       a  U(       d  / $ [        U 5      n/ nU H>  n[        XR                  US9u  pVUS:  d  M!  UR                  UR                  XV45        M@     UR	                  S SS9  U VVVs/ s H  u  pun[        XuUS9PM     snnn$ s  snnnf )zScore all candidates and return results sorted by confidence descending.

:param data: The raw byte data to score.
:param candidates: Encoding candidates to evaluate.
:returns: A list of :class:`DetectionResult` sorted by confidence.
)profileg        c                     U S   $ )N    )xs    [/var/www/piano.thomer.com/venv/lib/python3.13/site-packages/chardet/pipeline/statistical.py<lambda>"score_candidates.<locals>.<lambda>!   s    ad    T)keyreverse)encoding
confidencelanguage)r   r   nameappendsortr   )r   r   r   scoresencslangr   s           r   score_candidatesr       s     z	D!G24F%dHHgFs7MM388Q-. 
 KKNDK1 $#MDT 	dC#  s   9BN)__doc__chardet.modelsr   r   chardet.pipeliner   chardet.registryr   bytestuplelistr    r   r   r   <module>r(      sA    > , )
"<#45	/r   