Documentation

Linglib.Syntax.ConstructionGrammar.Licensing

Construction Grammar: Licensing #

The licensing model of constructional grammar ([Sag12]; [Gol95]): an utterance token is grammatical iff every constituent in it instantiates some construction of the network. Constructicon.licenses is the recognizer — a constituent's daughters must match some construction's typed form slot-by-slot (formMatches), and each daughter must itself be licensed; words are licensed lexically.

Matching is relative to a POS lexicon String → Option UD.UPOS. headed fillers are checked against immediate daughters (a flat approximation of headedness), and semantic constraints are not checkable at this level and match any token.

Main declarations #

An utterance token: a word or a constituent with daughter tokens.

Instances For

    Boolean equality on tokens (hand-rolled: Token is a nested inductive, outside the deriving handlers' fragment).

    Equations
    Instances For
      def ConstructionGrammar.Token.beqList :
      List TokenList TokenBool

      Boolean equality on token lists.

      Equations
      Instances For
        theorem ConstructionGrammar.Token.beq_iff_eq (a b : Token) :
        a.beq b = true a = b
        theorem ConstructionGrammar.Token.beqList_iff_eq (as bs : List Token) :
        beqList as bs = true as = bs
        @[implicit_reducible]
        Equations
        def ConstructionGrammar.SlotFiller.matches (pos : StringOption UD.UPOS) :
        SlotFiller StringTokenBool

        Does a token satisfy a slot filler, relative to a POS lexicon? semantic constraints are not checkable at this level and match any token; headed requires the head word as an immediate daughter, of the required category.

        Equations
        Instances For
          def ConstructionGrammar.formMatches (pos : StringOption UD.UPOS) (form : TypedForm String) (ts : List Token) :
          Bool

          A daughter sequence instantiates a typed form: same arity, and each daughter matches its slot's filler.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def ConstructionGrammar.Constructicon.licenses (cx : Constructicon) (pos : StringOption UD.UPOS) :
            TokenBool

            The licensing recognizer: words are licensed lexically; a constituent is licensed iff its daughters instantiate some construction of the network and are each licensed themselves.

            Equations
            Instances For
              def ConstructionGrammar.Constructicon.licensesList (cx : Constructicon) (pos : StringOption UD.UPOS) :
              List TokenBool

              All tokens in a list are licensed.

              Equations
              Instances For
                def ConstructionGrammar.Constructicon.Licenses (cx : Constructicon) (pos : StringOption UD.UPOS) (t : Token) :

                cx licenses token t (relative to a POS lexicon): every constituent instantiates some construction of the network. Defined via the licenses recognizer, so concrete cases are kernel-decidable.

                Equations
                Instances For
                  @[implicit_reducible]
                  instance ConstructionGrammar.instDecidableLicenses (cx : Constructicon) (pos : StringOption UD.UPOS) (t : Token) :
                  Decidable (cx.Licenses pos t)
                  Equations