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.

Modelling heavyweight ontologies in Neo4j

Hello community

I don't have much experience with Neo4j yet, but I like the solution very much. That's why I would like to implement my master thesis with Neo4j.
But I have encountered some difficulties and would like to know if the problem is me or Neo4j.

For my thesis I need to import with larger heavyweight ontologies and add additional knowledge to them.

Importing large ontology (OWL), such as Foundational Model of Anatomy | NCBO BioPortal
I do not manage to import larger ontologies with Neosemantics. The import always hangs.

Implementation of extended descriptions, existential restrictions etc. in Neo4j

  • I have not yet found a way to map mathematical descriptions in Neo4j.
  • If such models with these descriptions can be mapped into Neo4J, I would very much like to use Neo4j. But if neo4j is not able to represent lightweight ontologies, I would have to find another solution.

What is your opinion on this?

Thank you very much,
Andy

3 REPLIES 3

Hi @andreas.dorta , welcome to the neo4j community.
Could you elaborate on the kind of problems that you're having when trying to import the FMA ontology? It's not particularly big (2.7 million triples). I've run it on my laptop and the import process took just over 30 seconds.

Depending on your hw setup it may take a bit longer but I see no particular issue with it.

Here's a screen capture of a small bit of the class hierarchy (subclassof), with some object properties ( along with their domain, range, etc.)

This approach imports every single triple in the FMA ontology into Neo4j but you'll find that things like the constraint definitions (owl:constraint) are loaded in a rather awkward way making them sometimes not very easy to use. Although this will depend on your use case, of course.

You may find this conversation on that topic useful:

Could you share a bit more of what your'e trying to achieve? What do you mean by "mathematical descriptions"?

Regards,

JB.

sam_gijare
Graph Buddy

Hi

CALL n10s.rdf.stream.fetch('file:////var/lib/neo4j/import/%s.owl','RDF/XML',{ limit: 999999999 })
YIELD subject,predicate,object
WHERE predicate IN ['http://www.w3.org/2000/01/rdf-schema#subClassOf','http://www.w3.org/2002/07/owl#someValuesFrom']
CALL apoc.do.when(predicate='http://www.w3.org/2000/01/rdf-schema#subClassOf',
'MATCH (c:Class {uri:subject}) SET c.subClassOf=object RETURN c',
'MATCH(c:Class{subClassOf:subject}) MATCH (p:Class{uri:object})
MERGE (c)-[:SCO]->(p) RETURN c', {subject:subject,predicate:predicate,object:object}) YIELD value RETURN value"""

Please try it. It may not work as is but may give you some clues. If you decipher correctly these clues will give you insights into what exactly you want to achieve or what should be your goal.
Thanks
SameerG

Please configure limit based on your server memory capacity. Also you can use memrec tool to know your server capacity.
Thanks
SameerG

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online