pmikstacki / SliccDB

Light Embedded Graph Database for .net
MIT License
132 stars 14 forks source link

Will inference ever be supported? #15

Open CestLucas opened 1 year ago

CestLucas commented 1 year ago

First of all big thanks to SliccDB devs! We were looking at server-less solution to Neo4j but we need to be able to infer concept relations, i.e. check if two concepts are connected via a path. Thank you.

pmikstacki commented 1 year ago

Hi @CestLucas!

If you mean this feature of Neo4J - https://neo4j.com/labs/neosemantics/4.0/inference/ it looks very interesting and worth implementing into SliccDB.

I have two ideas how this could work, but I will gladly welcome any input on your part:

Categories I will define new Entity type called category. It would contain a list of Labels that fit the specific category. You could then query by category and it would return all nodes with labels specified in the category.

Families Similair to categories, but we could define supersets of categories called families, that would include all nodes in categories assigned to each family. Or maybe just allow categories to hold also other categories. It would allow to specify sets, subsets and supersets. It could open SliccDB for some data scientists

Happy to hear your feedback or propositions tho!

Kind Regards

CestLucas commented 1 year ago

Thanks for the write up @pmikstacki ! Much appreciated.

I think a simple route finder similar to https://github.com/jchristn/LiteGraph can be a great start:

// Find a route RouteFinder rf = new RouteFinder(graph); rf.FromGuid = "joel"; rf.ToGuid = "maria"; GraphResult result = rf.Find();

This would tell if two concepts are connected via any multi-hop path, for instance pug->dog->canine->animal so a pug is an animal ;)

pmikstacki commented 1 year ago

Oh, I see that this is just graph traversal. Actually I've never thought of that because I use sliccDB for use cases not requiring this feature. I will try to implement it by next week :) This RouteFinder seems like a good abstraction it would allow for different algorithms to walk the graph.

Kind Regards

BY-DevInnovation commented 7 months ago

Any news on this feature ?

MovGP0 commented 2 months ago

I am currently working around this issue by using QuikGraph. That is I transform the SliccDB graph into a QuikGraph data structure and then do the interference.