Documentation

Linglib.Syntax.ConstructionGrammar.Composition

Construction-relative composition #

Rules of semantic combination are construction-relative: a construction "specifies how the semantics of the daughters are combined to produce the semantics of the mother, and what additional semantics, if any, is contributed by the construction itself" ([KM19] §4). A composition rule is partial — it demands daughter denotations of the right shape — and mismatches are repaired by the override principle ([Mic04], (20)): the lexical item conforms to the meaning of the structure in which it is embedded.

Main definitions #

@[reducible, inline]

A composition rule: from the daughters' denotations to the mother's, partial because a rule demands daughter denotations of the right shape ([KM19] §4).

Equations
Instances For
    def ConstructionGrammar.CompositionRule.override {D : Type u_1} [DecidableEq D] (r : CompositionRule D) (shifts : List (DD)) (ds : List D) :
    List D

    Readings under the override principle ([Mic04], (20)): the rule's own output where the daughters already conform, and otherwise one reading per reconciliation operator that makes them conform. Distinct operators yielding distinct repairs produce genuine ambiguity.

    Equations
    • r.override shifts ds = match r ds with | some d => [d] | none => (List.filterMap (fun (s : DD) => r (List.map s ds)) shifts).dedup
    Instances For
      theorem ConstructionGrammar.CompositionRule.override_eq_of_eq_some {D : Type u_1} [DecidableEq D] {r : CompositionRule D} {ds : List D} {d : D} (shifts : List (DD)) (h : r ds = some d) :
      r.override shifts ds = [d]

      Conforming daughters are composed directly: implicit type-shifting occurs only on mismatch ([Mic04], Table 3).

      @[simp]
      theorem ConstructionGrammar.CompositionRule.override_nil {D : Type u_1} [DecidableEq D] (r : CompositionRule D) (ds : List D) :
      r.override [] ds = (r ds).toList

      With no reconciliation operators, a mismatch has no readings.

      def ConstructionGrammar.Constructicon.interps {D : Type u_2} (cx : Constructicon (CompositionRule D)) (pos : StringOption UD.UPOS) (lex : StringOption D) :
      TokenList D

      All readings of a token: each construction whose typed form the daughters instantiate contributes the readings its meaning pole — its composition rule — produces from the daughters' readings; words read from the lexicon.

      Equations
      Instances For
        def ConstructionGrammar.Constructicon.interpsList {D : Type u_2} (cx : Constructicon (CompositionRule D)) (pos : StringOption UD.UPOS) (lex : StringOption D) :
        List TokenList (List D)

        All sequences of daughter readings.

        Equations
        Instances For