Wiki › Component

Reasoner (chaipat.cc)

Article
From Chaipat's knowledge graph

The reasoner in src/reason.js gives 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 answers with a language model, and in every build script.

Rules

It repeats these until nothing new follows:

RuleExample
Subclassa project is a work; a technique is a concept
Subpropertymade, contributed to and mentored all mean worked on; implementing a technique or reading a format means the work deals with it
Symmetricif A is related to B, B is related to A
Inversea component of this site means this site has that component
Transitiveevery year before last year is also after this one
Property chaina 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 seven hundred facts are inferred from about four thousand 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.