Documentation

Linglib.Syntax.CCG.Interface

CCG Syntax-Semantics Interface #

Syntactic categories directly encode semantic types and the combinatory rules correspond to function application and composition ([Ste00a]), so a derivation's meaning is read off compositionally from its structure.

Main definitions #

Worked toy-fragment derivations and the non-constituent-coordination semantics theorems live in Studies/Steedman2000.lean.

Type correspondence #

structure CCG.SemLexEntry (E W : Type) :

A CCG lexical entry with semantics

Instances For

    Type preservation #

    CCG combinatory rules preserve semantic well-typedness: if the syntactic combination succeeds, the semantic combination is well-typed.

    Forward application preserves semantic typing: if X/Y combines with Y to give X, then (σ→τ) applied to σ gives τ.

    Backward application preserves semantic typing: if Y combines with X\Y to give X, then (σ→τ) applied to σ gives τ.

    Type correspondence for intransitive verbs

    Derivation interpretation #

    structure CCG.Interp (E W : Type) :

    A semantic interpretation: category paired with its meaning

    Instances For
      def CCG.SemLexicon (E W : Type) :

      Semantic lexicon: maps words to interpretations

      Equations
      Instances For
        def CCG.DerivStep.interp {E W : Type} (d : DerivStep) (lex : SemLexicon E W) :
        Option (Interp E W)

        Interpret a CCG derivation, computing its meaning from the lexicon.

        Every combinatory rule corresponds to a semantic operation: application is function application, composition is the B combinator, type-raising is the T combinator, and coordination is generalized conjunction (restricted to conjoinable types). Returns none if the derivation is ill-formed or uses unknown words.

        Equations
        Instances For
          def CCG.getMeaning {E W : Type} (result : Option (Interp E W)) :
          Option Prop

          Extract a sentence meaning (category S) from an interpretation result.

          Equations
          Instances For
            def CCG.getPredicateMeaning {E W : Type} (result : Option (Interp E W)) :
            Option (EProp)

            Extract a predicate meaning (category S/NP) from an interpretation result.

            Equations
            Instances For