Search code examples
neo4jnlprdfgraph-databasestriplestore

How to use triple store in neo4j?


I'm trying to construct a knowledge graph as a personal practice, and I've already parsed the text to get some custom triple lists. A triple consists of three parts, (entity_1, relation, entity_2), each of which is a string with utf-8 coding(they're all nature language, not in RDF format starting with rdf: or something like XML).

I'd like to store the triple list into neo4j using triple store, however, I couldn't find such APIs or commands. I tried CALL semantics.importRDF("file:///Users/jbarrasa/Downloads/opentox-example.turtle","TTL", false, 500)(borrowed from this blog) but it tells me that no such command.

I'm a newbie at graph database and NLP field, it seems that the triple list here is different from the so-called RDF format. So I have two questions

  1. Is there any API or command in neo4j to import such custom triple list?
  2. What is the relationship between a RDF format data and my custom triple list. More specifically, is there any difference between my custom triple list format and the standard RDF format?

I've tried to google it but I get bombarded with so much information that I'm a little confused.


Solution

  • In order to run the procedures (like semantics.importRDF) in that blog, you first have to install the neosemantics plugin jar file. See the README in that link for instructions.