/************************************************************************* name: firstLambda.pl version: May 2002 description: A DCG for lambda-based semantic construction authors: Stephan Walter, Aljoscha Burchardt *************************************************************************/ :- module(firstLambda,[s/3,np/3,vp/3]). :- [comsemOperators]. /*======================================================================== Combine Rules ========================================================================*/ s(NP@VP)--> np(NP), vp(VP). np(PN)--> pn(PN). np(Det@Noun)--> det(Det), noun(Noun). vp(IV)--> iv(IV). vp(TV@NP)--> tv(TV), np(NP). /*======================================================================== Lexical Rules ========================================================================*/ det(lambda(P,lambda(Q,forall(X,(P@X)>(Q@X)))))--> [every]. det(lambda(P,lambda(Q,exists(X,(P@X)& (Q@X)))))--> [a]. pn(lambda(P,P@john))--> [john]. pn(lambda(P,P@mary))--> [mary]. noun(lambda(X,siamesecat(X)))--> [siamese,cat]. noun(lambda(X,woman(X)))--> [woman]. iv(lambda(X,walk(X)))--> [walks]. tv(lambda(X,lambda(Y,X@lambda(Z,love(Y,Z)))))--> [loves].