sgo.to drafts

Abstract Syntax Trees

This is part of an open investigation on the representation and interpretation of the syntax of natural language.

In this article, we show a basic implementation of a DRT parser in JS using the nearley compiler compiler and rendered using the zdog tree renderer.

Here are some examples:

The sentence above gets parsed as:

You can also try your own:

The parser is still fairly fragile and is at best a toy. A few things missing here:

  • error handling
  • plurals
  • generics
  • an extensibility story (e.g. proper names, nouns and verbs)

More to come! WDYT?



HTML Comment Box is loading comments...