Knowledge graph integration

27 views
Skip to first unread message

shirel josef

unread,
Aug 15, 2022, 3:34:16 PM8/15/22
to PSL Users
Hello,
I'm really glad that psl is alive and active. 
I want to produce a situational awareness system for autonomous vehicle using a knowledge graph.
Therefore, I'm modeling all the knowledge using rdf triples and also want to incorporate probabilistic inference.
I store tracked objects and their corresponding detections and use 
Recently I have used rdfox with sparql to query and insert data and datalog for reasoning.
The problem is online but I have some questions:
1. Is it possible to implement database driver using database which is not rdbms?
2. What is the most correct way to construct a graph database which require queries (like sparql) but also probabilistic inference (with psl)?
3. I have seen your recent work about online PSL, is it relevant? It seem a bit overhead to manage two databases (the main database and the psl database)

I thought of using psl with postgresql and "ontop" to simulate a knowledgr graph but I hope maybe you have insights for me...

Thank you, 
Shirel

Eriq Augustine

unread,
Aug 15, 2022, 11:35:59 PM8/15/22
to shirel josef, PSL Users
Hey Shirel,

This sounds like a really interesting use case.
I hope I can answer all your questions.

1. Is it possible to implement database driver using database which is not rdbms?
2. What is the most correct way to construct a graph database which require queries (like sparql) but also probabilistic inference (with psl)?

I think it is best to answer these two questions together.

First, it is definitely possible to implement a database backend that is not an RDBMS.

As to the correct way to implement it, I think there are two good options.
To understand them, we have to get into the data store abstraction hierarchy in PSL a bit.
To access data on a large scale, PSL uses a Database abstraction that is generally implemented by an RDBMSDatabase.
Additionally, an RDBMSDatabase uses a DatabaseDriver abstraction, which is implemented by specific RDBMS backends (H2 and PostgreSQL currently).

I think the best places for you to add support for a database using SPARQL would either be as an implementation of DatabaseDriver or Database.
I would first see if you can provide the functionality specified by DatabaseDriver, even if your database is not strictly relational.
This would be the route that would probably be the quickest and involve the less code.
If you can't extend DatabaseDriver, then the next best thing would be to extend Database.
This would take more code, but should always be possible.

3. I have seen your recent work about online PSL, is it relevant? It seem a bit overhead to manage two databases (the main database and the psl database)

Online PSL is almost certainty relevant to your use case, but I would try with non-online PSL first so you can get an idea how the data flow will work.
In Online PSL, PSL will manage it's own database, so that shouldn't be a concern.

I thought of using psl with postgresql and "ontop" to simulate a knowledgr graph but I hope maybe you have insights for me.

In the long run, I agree with you that there are better ways to implement this.
But, this setup sounds very reasonable to me for a prototype or proof of concept.

-eriq

--
You received this message because you are subscribed to the Google Groups "PSL Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psl-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psl-users/aa399870-3b7f-420b-83fb-c7c2b2e10f74n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages