nltk.cluster.api module¶
- class nltk.cluster.api.ClusterI[source]¶
Bases:
object
Interface covering basic clustering functionality.
- classification_probdist(vector)[source]¶
Classifies the token into a cluster, returning a probability distribution over the cluster identifiers.
- abstract classify(token)[source]¶
Classifies the token into a cluster, setting the token’s CLUSTER parameter to that cluster identifier.
- abstract cluster(vectors, assign_clusters=False)[source]¶
Assigns the vectors to clusters, learning the clustering parameters from the data. Returns a cluster identifier for each vector.