w3c / cogai

for work by the Cognitive AI community group
Other
54 stars 25 forks source link

First draft of Chunks specification #17

Closed tidoust closed 4 years ago

tidoust commented 4 years ago

This pull request includes a first draft of a formal Chunks and Rules specification that defines the cognitive model and specifies the grammar for the underlying serialization format.

Some parts still need to be written, notably to define additional @ properties, and algorithms for the rule engine.

The grammar is defined in a separate folder that contains:

The specification directly includes the ABNF grammar file and the railroad diagrams.

To re-generate grammar files when chunks.abnf changes, all that should be needed is to run:

npm run update-grammar

The generation creates a couple of additional files that should not be committed in the repository (they are listed in .gitignore and thus will be automatically ignored).

The above command will only work provided that Node.js and Java are installed, and provided that a npm install command has been issued to install needed dependencies.