Reasoner (ask.chaipat.cc)
Component
The reasoner in src/reason.js gives ask.chaipat.cc RDFS and OWL reasoning, property chains included: when the graph loads, it applies the site's OWL ontology to the facts and adds what they imply. It is plain JavaScript and runs everywhere the graph is loaded: in the browser, in the server function that runs the question engine again, and in every build script.
Rules
It repeats these until nothing new follows:
| Rule | Example |
|---|---|
| Subclass | a project is a work; a technique is a concept |
| Subproperty | made, contributed to and mentored all mean worked on; implementing a technique or reading a format means the work deals with it |
| Symmetric | if A is related to B, B is related to A |
| Inverse | a component of this site means this site has that component |
| Transitive | every year before last year is also after this one |
| Property chain | a role used a skill when work done in it uses that skill; a year used a skill when work active in it does |
Only conclusions in the site's own vocabulary are kept, so the graph is not filled with facts like "a project is a creative work" that help no one reading it.
Where it shows
About 1,200 facts are inferred from about 6,100 stated ones. The question engine uses the inferred deals with to find the works behind a concept, the timeline reads worked on, and the wiki's infoboxes mark inferred rows. Validation checks every inferred fact against the ontology's domains and ranges, so a mistake in the ontology fails the build instead of reaching the page. The ontology itself is a Turtle file read by the Turtle parser.
In the knowledge graph
Reasoner and the 5 things it is linked to. Open any dot for its page, or explore it in the full graph.
As data
Everything on this page is read from triples in the knowledge graph. These are the 12 it states about Reasoner, and 3 more its ontology implies; the console runs SPARQL over the whole graph, here in your browser.
@prefix id: <https://ask.chaipat.cc/id/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix cj: <https://ask.chaipat.cc/ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . id:SiteReasoner a cj:Component ; rdfs:label "Reasoner (ask.chaipat.cc)" ; cj:shortLabel "Reasoner" ; cj:componentOf id:ThisSite ; cj:sourceFile "src/reason.js" ; cj:implements id:OntologyReasoning ; cj:handles id:TurtleFormat ; cj:uses id:JavaScript , id:OWL ; cj:description "Applies the ontology to the graph when it loads: subclasses, subproperties, symmetric and inverse properties, until nothing new follows. The facts it adds are marked as inferred wherever they are shown." ; cj:article "https://ask.chaipat.cc/wiki/SiteReasoner"^^xsd:anyURI ; cj:implementationDigest "sha256:e54a5d7386f3b791741bf742b722e6ba4130e6bec60ece45dafb686c30218890" .