nltk.cluster.Dendrogram.merge

Dendrogram.merge(*indices)[source]

Merges nodes at given indices in the dendrogram. The nodes will be combined which then replaces the first node specified. All other nodes involved in the merge will be removed.

Parameters:indices (seq of int) – indices of the items to merge (at least two)