Ë JL i(ãó8—ddlmZmZddlmZGd„de¬«Zy)é)ÚABCMetaÚabstractmethod)ÚDictionaryProbDistcóZ—eZdZdZed d„«Zed„«Zd„Zd„Zed„«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 úV/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/nltk/cluster/api.pyÚclusterzClusterI.clusteróócó—y)z€ Classifies the token into a cluster, setting the token's CLUSTER parameter to that cluster identifier. Nr )r Útokens r ÚclassifyzClusterI.classifyrrcó.—|j|«|k(ryy)zi Returns the likelihood (a float) of the token having the corresponding cluster. gð?ç)r)r ÚvectorÚlabels r Ú likelihoodzClusterI.likelihood!s€ð =‰=˜Ó  EÒ )ØàrcóÈ—i}d}|j«D]}|j||«||<|||z }Œ!|j«D]}||xx|zcc<Œt|«S)z Classifies the token into a cluster, returning a probability distribution over the cluster identifiers. r)Ú cluster_namesrr)r rÚ likelihoodsÚsumrs r Úclassification_probdistz ClusterI.classification_probdist+s€ð ˆ ؈Ø×)Ñ)Ó+ò (ˆGØ#'§?¡?°6¸7Ó#CˆK˜Ñ Ø ;˜wÑ'Ñ '‰Cð (ð×)Ñ)Ó+ò (ˆGØ ˜Ó  CÑ 'Ô ð (ä! +Ó.Ð.rcó—y)z1 Returns the number of clusters. Nr ©r s r Ú num_clusterszClusterI.num_clusters9rrcóF—tt|j«««S)zI Returns the names of the clusters. :rtype: list )ÚlistÚranger rs r rzClusterI.cluster_names?s€ô ”E˜$×+Ñ+Ó-Ó.Ó/Ð/rcó—|S)z< Returns the names of the cluster at index. r )r Úindexs r Ú cluster_namezClusterI.cluster_nameFs €ðˆ rN)F) Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrrr rr&r rr rrsW„ñðò óð ð ñ óð ò ò /ðñ óð ò 0órr)Ú metaclassN)ÚabcrrÚnltk.probabilityrrr rr úr.sð÷(å/ô<˜ö<r