Skip to content

Repository files navigation

part of the ontonomy software suite

AGPL-3.0. Anton Davydov.

mindbook

A rhetorical interface for SON records.

A SON record is a JSON object with a base field (_) and named links. mindbook turns these records into interactive sentences using three rhetorical structures: nucleus (a value), elaboration (a value with its attributes), and sequence (a list of values).

record                              sentence

{ "_": "event",             →   me is: I was born
  "event": "me",                  with: 1990, father, mother
  "date": "1990",
  "name": ["father", "mother"] }

Click a value to focus on it. The ego network shows what the focused record links to (causes) and what links back to it (results). This turns a flat list of records into a navigable graph.

>>father is... with: 1950 .       // cause
>>mother is... with: 1951 .       // cause
me is: I was born with: 1990 .    // focused
>>brother is... with... .         // result

mindbook is a SolidJS component library.

Used by evenor as its record interface.

The do you remember dialogue on nlkb walks through the design.

Install

npm i @fetsorn/mindbook

Use

import { create } from "@fetsorn/mindbook";
import "@fetsorn/mindbook/style.css";

const book = create(api);

// bind to a DOM element
book.bind(document.getElementById("root"));

// open a dataset
book.open({
  schema,
  template,
  actions,
  base: "event",
});

// search
book.find("event", "date:1990");

The api object provides four methods:

  • r(base, query) returns a ReadableStream of records (SELECT)
  • u(record) writes a record (UPDATE)
  • d(record) deletes a record (DELETE)
  • c(record) triggers an action (CREATE)

About

A rhetorical interface for SPARQL triplestores

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages