dbscan.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:BioNLP-2016 作者: cambridgeltl 项目源码 文件源码
def write_cluster_ids(words, cluster_ids, out=None):
    """Write given list of words and their corresponding cluster ids to out."""

    assert len(words) == len(cluster_ids), 'word/cluster ids number mismatch'

    if out is None:
        out = sys.stdout
    for word, cid in izip(words, cluster_ids):
        print >> out, '%s\t%d' % (word, cid)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号