§
    ýìNg(  ã                   ó@   — d dl mZmZ d dlmZ  G d„ de¬¦  «        ZdS )é    )ÚABCMetaÚabstractmethod)ÚDictionaryProbDistc                   ón   — e Zd ZdZedd„¦   «         Zed„ ¦   «         Zd„ Zd„ Zed„ ¦   «         Z	d„ Z
d	„ Zd
S )ÚClusterIz<
    Interface covering basic clustering functionality.
    Fc                 ó   — dS )zš
        Assigns the vectors to clusters, learning the clustering parameters
        from the data. Returns a cluster identifier for each vector.
        N© )ÚselfÚvectorsÚassign_clusterss      úL/var/www/html/ai-engine/env/lib/python3.11/site-packages/nltk/cluster/api.pyÚclusterzClusterI.cluster   ó   € € € ó    c                 ó   — dS )z€
        Classifies the token into a cluster, setting the token's CLUSTER
        parameter to that cluster identifier.
        Nr	   )r
   Útokens     r   ÚclassifyzClusterI.classify   r   r   c                 ó<   — |                       |¦  «        |k    rdS dS )zi
        Returns the likelihood (a float) of the token having the
        corresponding cluster.
        g      ð?ç        )r   )r
   ÚvectorÚlabels      r   Ú
likelihoodzClusterI.likelihood!   s%   € ð
 =Š=˜Ñ Ô  EÒ)Ð)Ø3à3r   c                 óì   — i }d}|                       ¦   «         D ]&}|                      ||¦  «        ||<   |||         z  }Œ'|                       ¦   «         D ]}||xx         |z  cc<   Œt          |¦  «        S )z
        Classifies the token into a cluster, returning
        a probability distribution over the cluster identifiers.
        r   )Úcluster_namesr   r   )r
   r   ÚlikelihoodsÚsumr   s        r   Úclassification_probdistz ClusterI.classification_probdist+   sš   € ð
 ˆØˆØ×)Ò)Ñ+Ô+ð 	(ð 	(ˆGØ#'§?¢?°6¸7Ñ#CÔ#CˆK˜Ñ Ø;˜wÔ'Ñ'ˆCˆCØ×)Ò)Ñ+Ô+ð 	(ð 	(ˆGØ˜Ð Ð Ô  CÑ'Ð Ð Ñ Ð Ý! +Ñ.Ô.Ð.r   c                 ó   — dS )z1
        Returns the number of clusters.
        Nr	   ©r
   s    r   Únum_clusterszClusterI.num_clusters9   r   r   c                 ó^   — t          t          |                      ¦   «         ¦  «        ¦  «        S )zI
        Returns the names of the clusters.
        :rtype: list
        )ÚlistÚranger    r   s    r   r   zClusterI.cluster_names?   s&   € õ
 •E˜$×+Ò+Ñ-Ô-Ñ.Ô.Ñ/Ô/Ð/r   c                 ó   — |S )z<
        Returns the names of the cluster at index.
        r	   )r
   Úindexs     r   Úcluster_namezClusterI.cluster_nameF   s	   € ð ˆr   N)F)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r    r   r&   r	   r   r   r   r      s°   € € € € € ðð ð ðð ð ñ „^ðð ðð ñ „^ððð ð ð/ð /ð /ð ðð ñ „^ðð
0ð 0ð 0ðð ð ð ð r   r   )Ú	metaclassN)Úabcr   r   Únltk.probabilityr   r   r	   r   r   ú<module>r.      sj   ðð (Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'Ð 'à /Ð /Ð /Ð /Ð /Ð /ð<ð <ð <ð <ð <˜ð <ñ <ô <ð <ð <ð <r   