You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At first I thought Notation3 would be a good format (and I still think it is), because it supports both facts and rules in a single file/format. Unfortunately, it is not available as a usable Java implementation, because jen3 is a forked version of Apache Jena, while Apache Jena's N3 support is just a synonym to turtle and the some holds for RDF4J. Other Notation3 implementations are written in JavaScript.
Also considered SHACL Rules, but those also can include SPARQL inside rule antecedents/consequents, which complicates things for the knowledge engine and SWRL is a separate format for rules which does not support writing simple facts.
So, in the end I concluded to just reuse the Apache Jena rules format and its parser implementation for loading rules and use regular turtle for loading triples. The Java API for this can remain the same with the setDomainKnowledge(Set<Rule> rules) method, because the triples will be represented by a special rule that returns the domain knowledge triples. If necessary, I can separate the triples into different groups, for example:
-> ?s rdf:type ?o
-> ?m ?p saref:Measurement
which returns a fraction of all the triples. Maybe this improves performance.
How should the REST API look like? If I create two additional operations (one for loading domain knowledge rules and one for loading domain knowledge facts) I think it becomes difficult to combine these two into a single collection with domain knowledge.
The text was updated successfully, but these errors were encountered:
At first I thought
Notation3
would be a good format (and I still think it is), because it supports both facts and rules in a single file/format. Unfortunately, it is not available as a usable Java implementation, becausejen3
is a forked version of Apache Jena, while Apache Jena's N3 support is just a synonym to turtle and the some holds for RDF4J. Other Notation3 implementations are written in JavaScript.Also considered SHACL Rules, but those also can include SPARQL inside rule antecedents/consequents, which complicates things for the knowledge engine and SWRL is a separate format for rules which does not support writing simple facts.
So, in the end I concluded to just reuse the Apache Jena rules format and its parser implementation for loading rules and use regular turtle for loading triples. The Java API for this can remain the same with the
setDomainKnowledge(Set<Rule> rules)
method, because the triples will be represented by a special rule that returns the domain knowledge triples. If necessary, I can separate the triples into different groups, for example:-> ?s rdf:type ?o
-> ?m ?p saref:Measurement
which returns a fraction of all the triples. Maybe this improves performance.
How should the REST API look like? If I create two additional operations (one for loading domain knowledge rules and one for loading domain knowledge facts) I think it becomes difficult to combine these two into a single collection with domain knowledge.
The text was updated successfully, but these errors were encountered: