eyereasoner / KoreografeyeDemo

Demonstrations for the Koreografeye project
0 stars 1 forks source link
notation3 orchestration reasoning rules-engine semantic-web

Koreografeye Demonstration

This is a demonstration how to run the Koreografeye reasoner.

Installation

git clone git@github.com:eyereasoner/KoreografeyeDemo.git YourProject
cd YourProject
npm install

Package content

Example N3 policy

An N3 policy can contain any valid Notation3 (N3) rule. The premise of the N3 rule should match the RDF resource one is interested in. The conclusion of the N3 rule should specify one or more policies. The policy has the format:

<PolicyName> pol:policy <PolicyDescription>

where:

File: rules/demo.n3

demo

Demonstration

Demo rule

Process all RDF resource in the in directory using the demo.n3 rule file.

Step 1. Run the orchestrator component

npx orch --info --keep --in in --out out --err err rules/demo.n3

or shorter

npm run orch:demo

This will generate a out/demo.ttl file as output containing the input RDF resource plus injected policies.

Step 2. Run the policy executor against the output of step 1

npx pol --info --keep --single out/demo.ttl

or shorter

npm run pol

This will return some debugging output from the DemoPlugin implementation of the demo policy.

LDN rule

Process all RDF resource in the in directory using the ldn.n3 rule file.

Step 1. Run the orchestrator component

npx orch --info --keep --in in --out out --err err rules/ldn.n3

or shorter

npm run orch:ldn

This will generate a out/demo.ttl file as output containing the input RDF resource plus injected policies.

Step 2. Run the policy executor against the output of step 1

npx pol --info --keep --single out/demo.ttl

or shorter

npm run pol

This will send a notification to https://httpbin.org/post using the SendNotificationPlugin implementation of the demo policy.

Configuration

The ComponentsJS configuration file config.jsonld defined all start up parameters of the Koreografeye components.

More documentation

npx orch --help
npx pol --help