I have a list of words that I want to use as seed labels in Neo4j.
These labels are renewed everyday so I would like to automate my Cypher requests.
Here is the list I have today:
List : list_of_labels = ['crise sanitaire', 'face crise', 'confinement avril', 'crise coronavirus', 'virus guerre']
I tried this with variables in my Cypher requests:
def create_seed_property(tx, i): j = 0 while j < len(list_of_labels): tx.run(" MATCH (n:ARTICLE {label: $i}) SET n.seed_label = $j RETURN n ") j +=1
And next I did this:
for i in list_of_labels: session.read_transaction(create_seed_property(i))
I don't know where I'm wrong.