knock44.py 文件源码

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

项目:100knock2016 作者: tmu-nlp 项目源码 文件源码
def sent2graph(sentence):
    dot = Digraph(format='png')
    for chunk in sentence:
        if chunk.dst != -1:
            dot.node(str(chunk.id), chunk.join_surface())
            dot.node(str(chunk.dst), sentence[chunk.dst].join_surface())
            dot.edge(str(chunk.id), str(chunk.dst))
    dot.render('knock44')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号