Constructional 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. Slot constraints are enforced where they can be:
negMinus rejects a negated daughter (SlotConstraint.allows).
Main declarations #
Token: utterance tokens (words and constituents)SlotFiller.matches,SlotConstraint.allows,formMatches: slot/daughter matchingConstructicon.Licenses: the licensing relation, via the recognizer
Boolean equality on tokens (hand-rolled: Token is a nested
inductive, outside the deriving handlers' fragment).
Equations
- (ConstructionGrammar.Token.word a).beq (ConstructionGrammar.Token.word b) = (a == b)
- (ConstructionGrammar.Token.node as).beq (ConstructionGrammar.Token.node bs) = ConstructionGrammar.Token.beqList as bs
- x✝¹.beq x✝ = false
Instances For
Boolean equality on token lists.
Equations
- ConstructionGrammar.Token.beqList [] [] = true
- ConstructionGrammar.Token.beqList (a :: as) (b :: bs) = (a.beq b && ConstructionGrammar.Token.beqList as bs)
- ConstructionGrammar.Token.beqList x✝¹ x✝ = false
Instances For
Equations
Equations
- ConstructionGrammar.instDecidableEqToken a b = decidable_of_iff (a.beq b = true) ⋯
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
- One or more equations did not get rendered due to their size.
- ConstructionGrammar.SlotFiller.matches pos (ConstructionGrammar.SlotFiller.fixed w) (ConstructionGrammar.Token.word w') = (w == w')
- ConstructionGrammar.SlotFiller.matches pos (ConstructionGrammar.SlotFiller.open_ cat) (ConstructionGrammar.Token.word w) = (pos w == some cat)
- ConstructionGrammar.SlotFiller.matches pos ConstructionGrammar.SlotFiller.phrasal (ConstructionGrammar.Token.node a) = true
- ConstructionGrammar.SlotFiller.matches pos (ConstructionGrammar.SlotFiller.semantic a) x✝ = true
- ConstructionGrammar.SlotFiller.matches pos x✝¹ x✝ = false
Instances For
Does a token respect a slot constraint? negMinus forbids a negation
daughter; locMinus and refEmpty concern the slot's external syntax
and semantics and are not checkable against the daughter itself.
Equations
- ConstructionGrammar.SlotConstraint.negMinus.allows (ConstructionGrammar.Token.node ts) = !ts.contains (ConstructionGrammar.Token.word "not")
- ConstructionGrammar.SlotConstraint.negMinus.allows (ConstructionGrammar.Token.word w) = !w == "not"
- ConstructionGrammar.SlotConstraint.locMinus.allows x✝ = true
- ConstructionGrammar.SlotConstraint.refEmpty.allows x✝ = true
Instances For
A daughter sequence instantiates a typed form: same arity, and each daughter matches its slot's filler and respects its slot's constraints.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
- One or more equations did not get rendered due to their size.
- cx.licenses pos (ConstructionGrammar.Token.word a) = true
Instances For
All tokens in a list are licensed.
Equations
- cx.licensesList pos [] = true
- cx.licensesList pos (t :: ts) = (cx.licenses pos t && cx.licensesList pos ts)
Instances For
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.