{"id":21166405,"url":"https://github.com/eyereasoner/koreografeyedemo","last_synced_at":"2026-03-19T19:06:42.182Z","repository":{"id":153509452,"uuid":"620800878","full_name":"eyereasoner/KoreografeyeDemo","owner":"eyereasoner","description":"Demonstrations for the Koreografeye project","archived":false,"fork":false,"pushed_at":"2024-01-08T19:56:57.000Z","size":258,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-21T10:11:38.160Z","etag":null,"topics":["notation3","orchestration","reasoning","rules-engine","semantic-web"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eyereasoner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-29T11:57:51.000Z","updated_at":"2023-03-29T11:59:42.000Z","dependencies_parsed_at":"2024-11-20T14:49:54.559Z","dependency_job_id":"e5b9ad70-92a5-4713-a0f9-1e55012522a6","html_url":"https://github.com/eyereasoner/KoreografeyeDemo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyereasoner%2FKoreografeyeDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyereasoner%2FKoreografeyeDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyereasoner%2FKoreografeyeDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyereasoner%2FKoreografeyeDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eyereasoner","download_url":"https://codeload.github.com/eyereasoner/KoreografeyeDemo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243615556,"owners_count":20319728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notation3","orchestration","reasoning","rules-engine","semantic-web"],"created_at":"2024-11-20T14:49:50.873Z","updated_at":"2026-02-08T21:09:59.339Z","avatar_url":"https://github.com/eyereasoner.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Koreografeye Demonstration\n\nThis is a demonstration how to run the Koreografeye reasoner.\n\n## Installation\n\n```\ngit clone git@github.com:eyereasoner/KoreografeyeDemo.git YourProject\ncd YourProject\nnpm install\n```\n\n## Package content\n\n- `in/` : an input directory for RDF resources\n- `in/demo.ttl` : an example input RDF resource\n- `err/` : an error directory for failed RDF resources\n- `out/` : an output directory for successful processed RDF resources\n- `rules/` : a directory containing zero or more N3 policy files\n- `rules/*.n3` : example N3 policy files\n    - `rules/demo.n3` : a policy that starts a demo policy\n    - `rules/email.n3` : a policy that request sending an email\n    - `rules/ldn.n3` : a policy that request sending an [LDN](https://www.w3.org/TR/ldn/) notification\n    - `rules/ntfy.n3` : a policy that request to send a [Ntfy](https://ntfy.sh) notifiaction\n\n## Example N3 policy\n\nAn N3 policy can contain any valid [Notation3](https://w3c.github.io/N3/spec/) (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:\n\n```(turtle)\n\u003cPolicyName\u003e pol:policy \u003cPolicyDescription\u003e\n```\n\nwhere:\n\n- `\u003cPolicyName\u003e` is a unique identifier for the policy\n- `\u003cPolicyDescription\u003e` is an FnO description of the required policy\n\nFile: `rules/demo.n3`\n\n![demo](demo.png)\n\n- Lines 1-6 define the namespace prefixes that are used in the rule\n- Line 10 binds `?id` to the main subject of the input RDF resource\n    - This information is generated by Koreographeye and inject as a blank node into the RDF document `[ pol:mainSubject \u003cid\u003e ]`.\n- Lines 12-13 binds `?class` to the class of the main subject and demands it is an `as:Announce` or an `as:Create`\n- Lines 17-23 define the policy that should be executed when a `?id` and `?class` binding is found\n    - Each policy **must** have a named identifier: `ex:MyDemoPolicy` was chosen for this example\n    - `pol:policy` defines the required policy using the [FnO](https://fno.io/spec/) vocabulary\n      - A policy defines at least an `fno:executes` with a name of a policy interface\n      - This interface can have zero or more arguments. In this example the arguments are:\n          - `ex:param1`\n          - `ex:param2`\n          - `ex:body`\n\n## Demonstration\n\n### Demo rule\n\nProcess all RDF resource in the `in` directory using the `demo.n3` rule file.\n\nStep 1. Run the orchestrator component\n\n```\nnpx orch --info --keep --in in --out out --err err rules/demo.n3\n```\n\nor shorter\n\n```\nnpm run orch:demo\n```\n\nThis will generate a `out/demo.ttl` file as output containing the input RDF resource plus injected policies.\n\nStep 2. Run the policy executor against the output of step 1\n\n```\nnpx pol --info --keep --single out/demo.ttl\n```\n\nor shorter\n\n```\nnpm run pol\n```\n\nThis will return some debugging output from the `DemoPlugin` implementation of the demo policy.\n\n### LDN rule\n\nProcess all RDF resource in the `in` directory using the `ldn.n3` rule file.\n\nStep 1. Run the orchestrator component\n\n```\nnpx orch --info --keep --in in --out out --err err rules/ldn.n3\n```\n\nor shorter\n\n```\nnpm run orch:ldn\n```\n\nThis will generate a `out/demo.ttl` file as output containing the input RDF resource plus injected policies.\n\nStep 2. Run the policy executor against the output of step 1\n\n```\nnpx pol --info --keep --single out/demo.ttl\n```\n\nor shorter\n\n```\nnpm run pol\n```\n\nThis will send a notification to `https://httpbin.org/post` using the `SendNotificationPlugin` implementation of the demo policy.\n\n## Configuration\n\nThe [ComponentsJS](https://componentsjs.readthedocs.io/en/latest/) configuration file `config.jsonld` defined all start up parameters of the Koreografeye components.\n\n- `urn:koreografeye:reasonerInstance` contains arguments to pass to the internal [Eye](https://github.com/eyereasoner/eye) reasoner. On our example we make use of the [EyeJS](https://github.com/eyereasoner/eye-js) implementation.\n- `http://example.org/demoPlugin` defines the demo policy, `demoPlugin` . The Koreografeye plugin `DemoPlugin` is an implementation of this policy.\n- `http://example.org/sendNotify` defines the startup parameters of the `sendNotify` policy. The Koreografeye plugin `SendNotificationPlugin` is an implementation of this policy.\n\n## More documentation\n\n```\nnpx orch --help\n```\n\n```\nnpx pol --help\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyereasoner%2Fkoreografeyedemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyereasoner%2Fkoreografeyedemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyereasoner%2Fkoreografeyedemo/lists"}