pbonte / roxi Goto Github PK
View Code? Open in Web Editor NEWReactive Reasoning
License: Other
Reactive Reasoning
License: Other
Currently, no errors are reported in the wasm binding RSP module, mainly because internally panic is used when feeding invalid queries are rules. We should aim to provide some feedback to the user on what is going wrong.
Example: rule conclusion containing blank nodes
Interestingly, blank nodes do work when put in the ABox.
Currently, rules are to be specified to do reasoning in the engine. In use cases where you don't need reasoning, configuring the engine to work without rules will be helpful to avoid extra computations of mapping.
This works:
{?s <http://test/p> <http://test/1>.}=>{?s <http://test/p> <http://test/2>.}
This fails:
{?s <http://test/p> <http://test/1>.}=>{ ?s <http://test/p> <http://test/2>.}
I knew N3 is used as a rule language but I only had a look at stuff like SWRL, RIF & Datalog so far. So I thought can't be that hard and tried to see how I would map some stuff I do in CONSTRUCTS.
I'm not sure if I'm doing something wrong but all I find about N3 is stone old. It's very nice to read what timbl thought about back then but it's miles away from documentation of nowadays standards in RDF. And I can't seem to find any example of how I would map stuff like BIND to N3 rules or do things like aggregations.
So am I missing the magic documentation about N3 rules somewhere? The things I've read in the past hour were really interesting from a historical POV but it doesn't really help much for solving problems I have.
Would it be possible to provide a JS build on NPM so that the manual WASM compilation and installation from a local dir would not be necessary?
Looks like a low-hanging fruit
Happy to attempt a PR :)
@pbonte
Could you please tell me how to make a csv or a json from the result of a select query in this code? I don't know what to do with the JSBinding.
import {RoxiReasoner} from "roxi-js";
const reasoner = RoxiReasoner.new();
reasoner.add_abox("<http://example2.com/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.test.be/test#SubClass> .");
reasoner.add_rules("@prefix test: <http://www.test.be/test#>.\n @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n {?s rdf:type test:SubClass. }=>{?s rdf:type test:SuperType.}");
reasoner.materialize();
let array = reasoner.query('prefix test: <http://www.test.be/test#> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select * where {?s rdf:type test:SubClass.}');
p.s.
I really like your reasoner. I used it in the project we had to make for the course on linked data.
https://github.com/gezever/rdfjs-skos-dcat-generation/blob/main/src/main/nodejs/01_codelijst_skos_from_csv.js
When a fact matches a rule, the matched part should be substituted inside the converted rule.
On advice from Pieter Colpaert posting the question here:
If I understand it correctly, you are only using OxRDF, but not the storage part of Oxigraph for roxi.
How tricky would it be to integrate roxi with an existing Oxigraph instance? (to add reasoning)
That would be very exciting.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.