FIBO ontology with NeoSemantics

How can I load the entire hierarchical FIBO. Currently when I use semantics.importRDF() procedure to load, it loads only the specific ttl/RDF file and not the hierarchical dependent ones.
Is there a way to load the ontology recursively traversing through the links.



Hi @bhawmik, there has been a feature request for a while on recursively importing nested owl:import. We're working on it and hope to include it in future releases.

In the meantime you have two options: You can iterate over the different parts of the FIBO ontology and run an import on each of them. This would be a simple script in cypher with the following structure:

UNWIND ["http://fibopart1", "http://fibopart2", "http://fibopart3",...] as fibopart
CALL n10s.rdf.import.fetch(fibopart,"Turtle") YIELD terminationStatus, triplesLoaded, triplesParsed, namespaces, extraInfo
RETURN fibopart, terminationStatus, triplesLoaded, triplesParsed, namespaces, extraInfo

Or alternatively, you could use the FIBO quickstart that can be downloaded from the FIBO/OWL page which is a single file version of all the FIBO subparts.

Hope this helps,


Hi @jesus_barrasa, I found it easier to use the ROBOT tool to merge imports.

thanks @visakhmr, so basically you do it in two steps, right?

First you call

robot merge ... -output results/merged.owl

and then you import the resulting merged.owl using

call n10s.owl.import.fetch('.../merged.owl','RDF/XML')

is that it?

I must admit I've not tried it but sounds like a valid alternative too.



Yes, that's correct.

I was using turtle format. First I merged all ttl files using robot then imported them.

CALL n10s.rdf.import.fetch('file:///<path>/merged.ttl','Turtle')

n10s import was quite easy and fast. The merged file I used was over 300MB.

I have used protégé to merge imports before, but a command line tool makes it much easier.

1 Like

Hi Jesus,

I followed your second approach to get FIBO model but when I import I am not able to get class names. graph properly.
I did the following steps
1)call n10s.graphconfig.init()
2)CREATE CONSTRAINT n10s_unique_uri ON (r:Resource)
3) CALL n10s.rdf.import.fetch("", "Turtle");
I am getting the output

But the graph I am not getting with names and relations.

I am new to ontology Kindly help me

You probably are, by the look of your screen capture. It looks like you have successfully imported 84781 triples into Neo4j :slightly_smiling_face:
You will probably have classes prefixed with owl. Try to run this query to get them:

match (c:owl__Class) return c

But depending on how you intend to use it later on, you might find more useful the approach described in this guide (run it from your browser):

:play rdf/fibo.html

Hope this helps,