0

I need to get the relation between any two given entities in DBpedia or in any knowledge graph (entities relatedness), i.e. how they are related to each other.

Something like what RelFinder does but I don't need the visualisation part.

RelFinder makes some consecutive SPARQL queries and returns the relation between two entities.

For example, if you give it "Barack Obama" and "George W. Bush" it returns all the connections between the two entities up to two levels (two entities in between).

I've tried to extract the code that does that from RelFinder but I couldn't.

I appreciate if someone has a code that can get the relatedness between two entities.

Thanks

mbayomi
  • 71
  • 1
  • 8
  • 3
    Use the search function here first please. I'm pretty sure this was already answered by JoshuaTaylor here: "find all paths between two nodes SPARQL", e.g. http://stackoverflow.com/questions/30916040/sparql-is-there-any-path-between-two-nodes – UninformedUser Feb 23 '17 at 20:08
  • I saw it before but the solution didn't work for me. – mbayomi Feb 24 '17 at 14:01
  • 1
    "didn't work" is rather vague. Error message? Details about your use that differ from the other? The more you tell us, the better we can help you. – TallTed Feb 24 '17 at 15:06
  • "didn't work" means that I've tried to run the ASK {..} query (in the answer) against dbpedia but it gave me error. Also I don't know much about how to run SPARQL queries. So I don't know how to run this: ?start * ?u . ?u ?p ?v . ?v * ?end . Also from the question and the answer in that post, this is not what I am looking for. If you had a look at the RelFinder demo, you will see that it gives what entities are connecting "Barack_Obama" with "George W. Bush" – mbayomi Feb 26 '17 at 19:00

0 Answers0