Once you have a knowledge store in place and a kb daemon running:
$ mkdir -p var/log $ mkdir -p var/run $ bin/kbdaemon start
You communicate with it through a TCP socket (e.g. telnet), with a communication protocol that I shall describe here.
A message from a client to the daemon, in this protocol, is a series of
utf8 coded byte strings terminated by the string
The daemon joins these strings and, depending on a header, makes one of a few things. A header is an string of lower case alfabetic characters, separated from the rest of the message by a colon.
is to happen, terminated by the string
lexicon:header, the response is a json string followed by the string
'END'. The contents of the json depend on a second header:
get-subwordsreturns a list of word names that are subword of the word whose name is given after the header.
get-words:returns a list of word names that are of the type of the word whose name is given after the header.
get-verb:return a representation of the objects that the verb named after the header has. For each object, there is a list with 3 items:
exec_globals:header, the string that follows is assumed to be an exec_global, and fed to the knowledge store as such.
terms:header, what follows are assumed to be Terms constructs, and we go back to the first bullet point in this series.