1

I am trying to make a knowledge base, that has an ontology, I want to add more data to it where I use the data to do graph like queries. I also want to create some kind of knowledge graph to extract data from documents and put it to the knowledge base.

I have been using python for NLP, however I have not worked with Java much.

I worked with rdfLib and it seems that there are ways to get away with reasoning by creating specific queries over the graph, however, it seems that the DB options, and reasoners overwhelmingly favor Java.

I want to ask what your take on this is, should I start from scratch with Java or should I stick to python. Are there other considerations that I should keep in mind?

I appreciate your comments!

  • It depends on your requirements, doesn't it? I mean, you're familiar with Python and already used `rdflib`. So the question is, is there anything you need that is not covered by `rdflib`? By the way, for OWL there is also `owlready2`, which is more focused on handling OWL, which in fact is different from RDF in terms of its core datastructures, e.g. axioms vs triples etc – UninformedUser Dec 08 '18 at 07:51
  • I have been working on a **python** project called [hoply](https://github.com/amirouche/hoply) for exactly that purpose that is being able to query and reason on relational data, graph-like data in Python. Right now it doesn't handle the reasoning part because I don't have good use case for it. That's where we can help each other. Please chime in! Get my personal email from git, [fill an issue with a specific use case](https://github.com/amirouche/hoply/issues/new) you want to be solved. I have been working on this project for more that 4 years, I am missing domain NLP knowledge to advance... – amirouche Dec 08 '18 at 11:55
  • @amirouche thanks for the invite, I took a look and it sure seems interesting, however, it is a bit confusing for me, I suggest you make Jupyter notebook there and review some of the use cases already, then we can think how to augment new things. – PitPartizan Dec 08 '18 at 17:12
  • @AKSW Thanks a lot! basically what I hope I can have, beyond just maintaining the graph, is the ability to do SPARQL on inferred axioms. I want to be able to make up classes using owl:equivalentClass and query them along with the graph data. does that change your answer? Also, I just figured that I can query GraphDB over HTTP, that perhaps solves my problem, as GraphDB has OwlDL. but that seems like suboptimal back and forth... any comment on that ? PS: I am looking into Owlready2 thanks – PitPartizan Dec 08 '18 at 17:44
  • @PitPartizan regarding GraphDB over http: that's a viable option I'd say. There's a performance penalty for network traffic of course, but in practice that's managable. A lot depends on the size of the query results: if every query you do ships back half the data set in a response, HTTP traffic might become a bottleneck ;) – Jeen Broekstra Dec 11 '18 at 23:47
  • @JeenBroekstra Thanks a lot, I am working with `sparqlwrapper` now and it seems that it does the job directly from python. The problem I have is that there is no persistent DB that I can use with rdflib, SQLite, and the Sleepycat, both encounter dead end errors on Py3.7. I want to try AllegroGraph, can you point me towards some good options. – PitPartizan Dec 12 '18 at 02:21

0 Answers0