5 ms·
Thank you for posting this, I think this expresses the situation perfectly! Knowledge representation and reasoning languages like RDF, SPARQL etc., as well as
by triska 6y ago
Thank you for posting this, I think this expresses the situation perfectly!
Knowledge representation and reasoning languages like RDF, SPARQL etc., as well as querying languages like XQuery, go in this direction in principle. However, at least personally, I find them too inconvenient to use, too limited, and also not coherent enough to use them in actual rule-based automation tasks that involve semantic reasoning.
In my opinion, there is tremendous opportunity in making flexible rule-based reasoning about web content and interfaces more easily available in web applications, especially in heavily regulated areas such as accounting which you mentioned, and in governmental applications and legal use cases. For instance, using open standards, a government could describe for other governments how to automatically derive certain evidences and logical consequences of existing regulations, such as whether a company is eligible for a grant, whether a lawyer has certain qualifications in that country, whether and under what provisions a product can be sold in that country etc. By plugging in the pertaining data, many logical consequences can be automatically derived.
However, this demands more than the proposed semantic web technologies give us currently. As I see it, such use cases would benefit most from programming languages that let us not only express rules, but flexibly and easily reason about the rules themselves too, so that they can be easily interpreted, checked, simplified etc. automatically.
I think RDF missed a huge opportunity: In particular, Datalog syntax could have been used to describe RDF data, and that would have enabled easy reasoning about RDF triples with existing standardized programming languages that are ideal for reasoning about rules that represent knowledge, and are also expressive enough to dynamically compute and fetch more data when necessary. I hope that future work on the semantic web will lead into this direction.
- axylos 6y agoYou mentioned that sparql/Xquery don’t suit your needs but those aren’t for reasoning. It’s not Datalog, but the Apache Jena inference api caters to these concerns: https://jena.apache.org/documentation/inference/ https://jena.apache.org/documentation/inference/ Or is there something particular about Datalog, other than that it already exists, that is missing?
- triska 6y agoThe various OWL dialects are intended for reasoning, in combination with RDF etc. In my opinion, all these languages fall short for the reasons I mentioned: In particular, even though one can express knowledge and rules in these languages, they do not allow convenient reasoning about the rules themselves, for example in order to dynamically interpret them with custom execution strategies. Jena suffers from the same shortcoming. The documentation you link to shows an example that illustrates the issue: Model rdfsExample = ModelFactory.createDefaultModel(); Property p = rdfsExample.createProperty(NS, "p"); Property q = rdfsExample.createProperty(NS, "q"); rdfsExample.add(p, RDFS.subPropertyOf, q); rdfsExample.createResource(NS+"a").addProperty(p, "foo"); I can now create an inference model that takes this knowledge into account: InfModel inf = ModelFactory.createRDFSModel(rdfsExample); OK, but how do I actually process these relations themselves if I want to reason about them? For example, suppose I want to write a program that tries to minimize the relations, or rewrite them for more efficient processing. How do I represent and access the rules themselves within this framework, when I want to reason about the rules instead of only using them with fixed reasoning engines? Datalog makes this easy, because every Datalog knowledge base is also a valid Prolog program, and every Prolog program is a sequence of Prolog terms. Hence, we can use Prolog to easily reason about knowledge and rules that are stated in Datalog or Prolog syntax. This ability is what I miss most severely in the current semantic web stack.
- axylos 6y agoI admit I'm not terribly familiar with Prolog/Datalog, but it sounds similar to class expressions + properties in Jena: https://jena.apache.org/documentation/ontology/#ontology-classes-and-basic-class-expressions https://jena.apache.org/documentation/ontology/#ontology-cla... https://jena.apache.org/documentation/ontology/#ontology-properties https://jena.apache.org/documentation/ontology/#ontology-pro... where you can apply sub/super classes and define a property as disjoint/transitive/equivalent to other properties. I guess at that point I would wonder how much more is really practically necessary for a 'web of semantic data'. Imo, that's already over-powered for the basic use case which is linking one schema and its properties to another and defining an exchange protocol via the linked data platform. Again, I admit I'm not very familiar with these things and I appreciate you taking the time to read through this stuff.