categorial

Contents

categorial#

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

Summary#

Diagram

A categorial diagram is a closed diagram with rules and words as boxes.

Box

A categorial box is a grammar rule in a categorial diagram.

Word

A categorial word is a rule with a name, a grammatical type as cod and an optional domain dom.

FA

Forward application rule.

BA

Backward application rule.

FC

Forward composition rule.

BC

Backward composition rule.

FX

Forward crossed composition rule.

BX

Backward crossed composition rule.

Functor

A categorial functor is a closed functor with a predefined mapping for categorial rules.

Functions

cat2ty

Translate the string representation of a CCG category into DisCoPy.

tree2diagram

Translate a depccg.Tree in JSON format into DisCoPy.