Re: [Neo4j] General help - new to know how to set up this db in Neo4j

31 views
Skip to first unread message

Lasse Westh-Nielsen

unread,
Aug 10, 2012, 3:19:23 AM8/10/12
to ne...@googlegroups.com
Lisa,

Firstly, Neo has great modelling affinity, so you can literally model your understanding directly.
Secondly, try this cool tool: http://console.neo4j.org/r/8f3gou - you can quickly create examples and share them

I guess it comes down to the kind of query you want to write - you need your model to answer questions, so start with those as use cases perhaps?

Lasse




On Thu, Aug 9, 2012 at 11:12 PM, Lisa Gandy <lisag...@gmail.com> wrote:
Hi all,
Today I was looking for a solution oh how to store a graph I will be creating in a database and happened upon Neo4j, it seems very interesting,
I am a python user mostly, so I will be using the python embedded version.  However looking through the documentation there is I am not
sure how to set up this graph.....

I have a set of adjectives (a1, a2, a3, a4) and a set up of nouns (n1,n2,n3,n4),  the adjectives modify the nouns (that would be a relationship) and multiple adjectives can connect to a noun.  The connection between the adjectives and nouns also has two attributes (pmi_score and metaphor_score) these attributes exist only between one noun and adjective connection, each noun and adjective connection will have a unique form of these attributes.  How do you suggest I create this???

Thanks, sorry this is vague, I am just starting, and was hoping to get your expertise so I can get started quickly.

Thanks,
Lisa Gandy

Max De Marzi Jr.

unread,
Aug 10, 2012, 5:28:08 PM8/10/12
to ne...@googlegroups.com
Lisa,

Sounds pretty straight forward:

Create unique noun nodes (noun_index, using the key "word", and value <the actual word> for uniqueness)
Create unique adjective nodes (adjective_index, using the key "word", and value <the actual word> for uniqueness)
Create unique "modified_by" relationships between them.  (modified_by_index, using the key "adjective_noun" and the value "adjective.neo_id + "_" + noun.neo_id [or you can use the actual words instead of ids, up to you]).  Put your pmi_score and metaphor_score on the relationship.

Regards,
Max

Lisa Gandy

unread,
Aug 12, 2012, 7:03:15 PM8/12/12
to ne...@googlegroups.com
Hi ,
thanks for the help!
Reply all
Reply to author
Forward
0 new messages