1.5.4 A First Run

Semantic construction during parsing is now extremely easy. Here is an example query:

?- s(Sem,[harry,flies],[]).

Sem = Sem=lambda(v1, v1@harry)@lambda(v2, fly(v2))

Or generate the semantics for ``Harry curses a witch.'': s(Sem,[harry,curses,a,witch],[]).

The variables v1,v2 etc. in the output come from the calls to vars2atoms during lexical retrieval. The predicate generates variable names by concatenating the letter v to a new number each time it is called.

So now we can construct -terms for natural language sentences. But of course we need to do more work after parsing, for we certainly want to reduce these complicated -expressions into readable first-order formulas by carrying out -conversion. For this purpose we will now implement the predicate betaConvert/2.


Aljoscha Burchardt, Alexander Koller and Stephan Walter
Version 1.2.5 (20030212)