
    /h(                     2    S SK JrJr  S SKJr   " S S\S9rg)    )ABCMetaabstractmethod)DictionaryProbDistc                   d    \ rS rSrSr\SS j5       r\S 5       rS rS r	\S 5       r
S rS	 rS
rg)ClusterI   z4
Interface covering basic clustering functionality.
c                     g)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      H/var/www/auris/envauris/lib/python3.13/site-packages/nltk/cluster/api.pyclusterClusterI.cluster           c                     g)zh
Classifies the token into a cluster, setting the token's CLUSTER
parameter to that cluster identifier.
Nr
   )r   tokens     r   classifyClusterI.classify   r   r   c                 0    U R                  U5      U:X  a  gg)zQ
Returns the likelihood (a float) of the token having the
corresponding cluster.
g      ?        )r   )r   vectorlabels      r   
likelihoodClusterI.likelihood!   s    
 == E)r   c                     0 nSnU R                  5        H  nU R                  X5      X$'   X2U   -  nM     U R                  5        H  nX$==   U-  ss'   M     [        U5      $ )zi
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_probdist ClusterI.classification_probdist+   sm    
 ))+G#'??6#CK w''C , ))+G C'  ,!+..r   c                     g)z!
Returns the number of clusters.
Nr
   r   s    r   num_clustersClusterI.num_clusters9   r   r   c                 F    [        [        U R                  5       5      5      $ )z1
Returns the names of the clusters.
:rtype: list
)listranger%   r$   s    r   r   ClusterI.cluster_names?   s    
 E$++-.//r   c                     U$ )z,
Returns the names of the cluster at index.
r
   )r   indexs     r   cluster_nameClusterI.cluster_nameF   s	     r   r
   N)F)__name__
__module____qualname____firstlineno____doc__r   r   r   r   r!   r%   r   r-   __static_attributes__r
   r   r   r   r      sW        /  
0r   r   )	metaclassN)abcr   r   nltk.probabilityr   r   r
   r   r   <module>r8      s    ( /< <r   