categorial

Contents

categorial#

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

Summary#

TermBase

A term in the internal language of a categorial grammar.

Constant

Variable

Abstraction

FA

Application of type Y with subterms of type Y << X and X.

BA

Application of type Y with subterms of type X and X >> Y.

FC

Forward composition A << C with subterms A << B and B << C.

BC

Backward composition A >> C with subterms A >> B and B >> C.

FX

Forward crossing A >> C with subterms B << A and B >> C.

BX

Backward crossing A << C with subterms A << B and C >> B.

Diagram

A categorial diagram is a biclosed 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.

ForwardCrossedComposition

Forward crossed composition rule.

BackwardCrossedComposition

Backward crossed composition rule.

Functor

A categorial functor is a biclosed 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.