On 02/07/2019 09:19, Laura Morales wrote:
How can I dump to a .nt files *only* the inferred triples in a RDFDataset? In other words, I have a RDFDataset with a GenericRuleReasoner InfModel, and I would like to export all the inferred triples to a file.
If you are only using forward rules then use getDeductionsModel to get just the inferred triples and serialize that.
If you are using backward or hybrid rules then it's trickier. You would have to materialize everything the backward rules can find as well, remove the starting graph and then serialize that.
Dave