Hi Laurent, yes, you can store properties exactly like in Nodes for Relationships, see http://api.neo4j.org/current/org/neo4j/api/core/Relationship.html and its superclass, http://api.neo4j.org/current/org/neo4j/api/core/PropertyContainer.html.
If you are using Ruby, you find the Ruby:fied way to set properties on relationships in the Three-Minute-Tutorial at http://github.com/andreasronge/neo4j HTH /peter neubauer COO and Sales, Neo Technology GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Relationships count. http://www.linkedprocess.org - Distributed computing on LinkedData scale On Sun, Nov 22, 2009 at 2:53 PM, Laurent Laborde <[email protected]> wrote: > Hi ! > > For a fun side-project i want to graph a markov chain (a Markov Text > Generator). > > 1 node = 1 word. > > When, while parsing a text, i find a word followed by another word i > create a "node-word" if it doesn't exist, and create relationship. > if the word already exist : i create an outgoing relationship between > the 2 words. > if the relationship already exist i just increment a counter (this > word was followed by the next word one more time). > > Now i need to store the probability of a specific word being followed > by another word. > including a word looping to itself. > > If you're not familiar with markov chain, a simple picture should > explain it : > http://www.leda-tutorial.org/en/unofficial/Pictures/MarkovChain.png > > Storing the probabilty of a link to be followed should be ideally > stored in the relationship itself. > (and the probability to loop to itself in the node itself). > > However... it seems (accoring to the relationship api) that i can't > set a property for a link. > Is that right ? > > Any idea about how to store a "relationship property". > Perhaps an index of relationship with "key = relationshipID" and > "value = propability to follow this link" ? > > thank you for your help. > > -- > Laurent "ker2x" Laborde > Sysadmin & DBA at http://www.over-blog.com/ > _______________________________________________ > Neo mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

