cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

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.

Thanks

Sudipta

6 REPLIES 6

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,

JB.

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.

Cheers,

JB.

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.

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)
ASSERT r.uri IS UNIQUE;
3) CALL n10s.rdf.import.fetch("https://spec.edmcouncil.org/fibo/ontology/master/2020Q2/prod.fibo-quickstart.ttl", "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
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,

JB.