Ë
    Øªg(  ã                   ó8   — d dl mZmZ d dlmZ  G d„ de¬«      Zy)é    )ÚABCMetaÚabstractmethod)ÚDictionaryProbDistc                   óZ   — e Zd ZdZed
d„«       Zed„ «       Zd„ Zd„ Zed„ «       Z	d„ Z
d„ Zy	)ÚClusterIz<
    Interface covering basic clustering functionality.
    c                  ó   — y)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      úE/var/www/openai/venv/lib/python3.12/site-packages/nltk/cluster/api.pyÚclusterzClusterI.cluster   ó    ó    c                  ó   — y)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                 ó.   — | j                  |«      |k(  ryy)zi
        Returns the likelihood (a float) of the token having the
        corresponding cluster.
        g      ð?ç        )r   )r
   ÚvectorÚlabels      r   Ú
likelihoodzClusterI.likelihood!   s   € ð
 =‰=˜Ó  EÒ)Øàr   c                 óÈ   — i }d}| j                  «       D ]  }| j                  ||«      ||<   |||   z  }Œ! | j                  «       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+   su   € ð
 ˆØˆØ×)Ñ)Ö+ˆGØ#'§?¡?°6¸7Ó#CˆK˜Ñ Ø;˜wÑ'Ñ'‰Cð ,ð ×)Ñ)Ö+ˆGØ˜Ó  CÑ'Ô ð ,ä! +Ó.Ð.r   c                  ó   — y)z1
        Returns the number of clusters.
        Nr	   ©r
   s    r   Únum_clusterszClusterI.num_clusters9   r   r   c                 óF   — t        t        | j                  «       «      «      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      sW   „ ñð òó ðð ñó ðòò/ð ñó ðò
0ór   r   )Ú	metaclassN)Úabcr   r   Únltk.probabilityr   r   r	   r   r   Ú<module>r.      s   ð÷ (å /ô<˜ö <r   