ó
    ´OÂf(  ã                   ó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      Ú2/usr/lib/python3/dist-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Ó#CˆKÑ Ø˜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   