Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-25-2019 09:34 AM
I am programming in python and I want that every input that I get from python programming to store to neo4j graph database. I am using py2neo to connect neo4j to python. And then I want to use stanford-nlp that neo4j offers to make keyword extraction. The code that I tried is this below:
from py2neo import Graph, Node, Relationship
graph = Graph("bolt://xxxxxxxxxxx", auth=("neo4j", "xxxxx"))
nlp = input("Text: ")
def get(nlp):
query = '''
Merge (t:Text)
SET t.text = {nlp}
'''
graph.run(query,nlp).data()
def find():
query_find = '''
Match (t:Text)
CALL ga.nlp.annotate({text: t.text, id: id(t)})
YIELD result
MERGE (t)-[:HAS_ANNOTATED_TEXT]->(result)
RETURN result
'''
graph.run(query_find).data()
Can anyone help me, solving this case???
08-28-2019 04:08 PM
What happens with your code?
I guess you installed and configured the graphaware extension correctly for your Neo4j server?
08-29-2019 05:35 AM
Well yes, I configured the graphaware extension and now it is working fine because I want to things moving in the database so a made a little change. Now it is fine, but is there any way to change the method set in order to make in dynamic?? Because every input will be overwritten in the Text node...Thanks!!
08-30-2019 12:13 AM
That's probably then more a question for the GraphAware folks. I have not seen the text being overridden.
All the sessions of the conference are now available online