grammar

grammar#

DisCopy’s grammar modules: thue, cfg, categorial, pregroup, dependency and abstract.

thue

A formal grammar is a free monoidal category with words and rules as boxes.

cfg

A context free grammar is a formal grammar where the rules all have a codomain of length 1.

categorial

A categorial grammar is a free biclosed category with words as boxes.

pregroup

A pregroup grammar is a free rigid category with words as boxes.

dependency

A dependency grammar is both a pregroup and a context-free grammar.

abstract

Abstract categorial grammars after de Groote's Towards abstract categorial grammars (2001): a vocabulary generates a free closed category and a Lexicon is a functor between two of them, which is all there is to a grammar.