clust:Python 中的聚类 ngram

时间:2021-06-10 14:58:28
【文件属性】:
文件名称:clust:Python 中的聚类 ngram
文件大小:3KB
文件格式:ZIP
更新时间:2021-06-10 14:58:28
Python 群 在 Python 中聚类 ngram。 聚类是使用。 用法 cluster_ngrams(ngrams, compute_distance, max_dist, method) 返回每个集群中的 ngram 列表。 ngrams : [list] 要聚类的 ngram 列表。 例如:[['my', 'cat', 'ran'], ['i', 'like', 'trigrams']] compute_distance : [func] 距离函数,以两个 ngrams 作为输入并返回它们之间的距离。 该包包含一个函数,该函数将两个 ngram 中单词之间的相加为dl_ngram_dist max_dist : [float] 如果两个簇之间的距离大于 max_dist,则簇不会合并在一起。 方法:[字符串] 聚类方法。 “单一”、“完整”、“平均”、“质心”、“中位数”、“病房”或
【文件预览】:
clust-master
----.gitignore(27B)
----README.md(2KB)
----clust()
--------__init__.py(56B)
--------test_cluster.py(941B)
--------cluster.py(2KB)

网友评论