Closed gtfierro closed 7 months ago
Hi Gabe, yes we have this option in our product and it is implemented pretty much like yours. It can iterate until it reaches a fixpoint, but rules that infer blank nodes are a stopper. And yes, if you want this in the open source project, I would need a PR with a flag and/or max iteration counter.
Hello!
I've found myself wrapping the inference script up so that I can perform iterative expansion of the graph until it either reaches a fixed point or I've reached some maximum number of iterations. Doing this externally to your inference script isn't ideal because inference rules that produce blank nodes can fail to be deduplicated due to serializing the graph to disk in between inference runs (and thus losing the bnode identities).
Would you be open to changing the inference script so that it could provide iterative inference? I have gotten something basic working locally:
No worries if you already have something planned, but I would be happy to fix this up and add some CLI flags to customize its usage in a way that you find acceptable. Let me know!
I wanted to point out that I know that the code above is a bit buggy and probably doesn't do exactly what we want. It's a question if we want to just return materialized triples or the full model, for example