Reasoner (chaipat.cc)
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:
| 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 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.