tngraph.py 文件源码

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

项目:tnpy 作者: ferventdesert 项目源码 文件源码
def buildGraph(tn,entityname):
    A=pgv.AGraph(directed=True,strict=True)
    entities=tn.Entities;
    entity= entities[entityname];
    nodes={};
    addNode(A,entity,nodes);
    A.graph_attr['epsilon']='0.001'
    print (A.string()) # print dot file to standard output
    A.write('foo.dot')
    A.layout('dot') # layout with dot
    A.draw('foo.png') # write to file
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号