本文整理汇总了Python中py2neo.Node.split方法的典型用法代码示例。如果您正苦于以下问题:Python Node.split方法的具体用法?Python Node.split怎么用?Python Node.split使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类py2neo.Node
的用法示例。
在下文中一共展示了Node.split方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: list
# 需要导入模块: from py2neo import Node [as 别名]
# 或者: from py2neo.Node import split [as 别名]
articleList = list()
for prof in professors:
pnode = Node(prof[0])
citation = pnode['citation']
citationList = list()
if citation is not None:
citationList = citation.split(";")
#print("Nome de citação: ", citationList)
professorList.append(Professor(pnode['name'], set(citationList)))
for art in articles:
anode = Node(art[0])
citation = Node(art[0])['citacao']
citationList = list()
if citation is not None:
citationList = citation.split(" ; ")
#print("Citado no artigo:", citationList)
articleList.append(Article(anode['title'],set(citationList)))
for p in professorList:
for a in articleList:
if p.citation.intersection(a.citation).__len__() > 0:
print("Artigo %s - Autor: %s" %(a.subject, p.name))
graph_db.cypher.execute("MATCH (a:Author {name:'%s'}),(p:Article {title:'%s'}) MERGE (a)<-[r:AUTHORING]->(p)" %(p.name, a.subject))
stop_time = time()
print("Tempo decorrido em segundos: " +str(stop_time - start_time))