<< Prev | - Up - |
The combine
-rules for and
work exactly like the rule
(see Section ``
''). Again, their function is simply to introduce an application:
combine(v1:V,[tv:TV,np2:NP]) :-
TV = usr([TVRoot|_],_,_,_),
NP = usr([NPRoot|_],_,_,_),
NewUsr = usr([Root],[Root:(TVRoot@NPRoot)],[],[]),
mergeUSR(merge(NewUsr,merge(TV,NP)),V).
combine(pp:PP,[prep:Prep,np2:NP]) :-
Prep = usr([PrepRoot|_],_,_,_),
NP = usr([NPRoot|_],_,_,_),
NewUsr = usr([Root],[Root:(PrepRoot@NPRoot)],[],[]),
mergeUSR(merge(NewUsr,merge(Prep,NP)),PP).
Finally, here is the rule that combines a and a
to form an
(think of phrases like ``therapist with a siamese cat''):
combine(n1:N,[noun:Noun,pp:PP]) :-
Noun = usr([NounRoot|_],_,_,_),
PP = usr([PPRoot|_],_,_,_),
NewUsr = usr(
[Root,N1,N2,N3,N4,N5,N6],
[Root:lambda(N1),N1:(N2 & N3),N2:(NounRoot@N4),N4:var,N5:(PPRoot@N6),N6:var],
[dom(N3,N5)],
[bind(N4,Root),bind(N6,Root)]),
mergeUSR(merge(NewUsr,merge(Noun,PP)),N).
?- Question!
Can you see what this rule does? Compare it to the local macros for the determiners (see Section ``Macros for the Determiners'')!
<< Prev | - Up - |