grammar
grammar#
DisCopy’s grammar modules: thue, cfg, categorial, pregroup and dependency.
A formal grammar is a free monoidal category with words and rules as boxes. |
|
A context free grammar is a formal grammar where the rules all have a codomain of length 1. |
|
A categorial grammar is a free closed category with words as boxes. |
|
A pregroup grammar is a free rigid category with words as boxes. |
|
A dependency grammar is both a pregroup and a context-free grammar. |