An implementation of a fragment of Heim & Kratzer (1998)'s NL semantics
I made a little attempt to give an implementation of some features of Heim & Kratzer (1998) using Haskell, which covers the semantic calculation of one-place predicates applied to entities and generalized quantifiers applied to (pairs of) one-place predicates.
Usage
Launch GHCi, load the source code below, and make your queries.
Examples:
Prelude> :l GQ.hs
Prelude> sleep Mary
False
Prelude> a student sleep
True
Source code
Shown below.
- The object language is a fragment of clumsy English
(in cluttered word orders),
sentences of which are actually nothing but Haskell expressions.
- The (syntactic) categories of those expressions
are not overtly represented
since they are totally determined by the (semantic) types
of those interpretations.
The “types” such as
Entity,Truthbelong to semantics.
- The (syntactic) categories of those expressions
are not overtly represented
since they are totally determined by the (semantic) types
of those interpretations.
The “types” such as
- The meta-language is, of course, Haskell.
- Based on the functional talk.
- A certain trick is needed to enumerate the type constructors of
Entity. TheData.Datamodule enables it.
- The interpreter of the meta-language is GHCi.
- Oct 3 2018 modified
- Oct 3 2018 translated to English