command.py 文件源码

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

项目:wos2vivo 作者: Clarivate-SAR 项目源码 文件源码
def get_triples(org, out_file, weeks=1, span=None, format="turtle"):
    g = Graph()
    if span is not None:
        records = get_publications_for_org(org, span=span)
    else:
        records = get_publications_for_org(org, weeks=int(weeks))
    num = 0
    for num, rec in enumerate(records):
        g += rec.to_rdf()

    trips = len(g)
    console("{} records found. {} triples created.".format(num or 0, trips))
    if trips > 0:
        if out_file is not None:
            output_graph(g, destination=out_file, format=format)
        else:
            print output_graph(g, format=format)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号