6.5 Running CLLS

This section introduces the driver predicate clls/0 for CLLS-based semantic construction, and contains links to all files needed for running the program.

clls.pl: View Download

Now, it is time to present the driver predicate clls. Here it is:

clls :-
        readLine(Sentence),
        parse(Sentence,UsSem),
        resetVars,vars2atoms(UsSem),
%        printRepresentations([UsSem]),
        solve(UsSem,Sems),
%        printRepresentations(Sems),
        usr2LambdaList(Sems,LambdaTerms),
%        printRepresentations(LambdaTerms),
        betaConvertList(LambdaTerms,Converted),
        printRepresentations(Converted).

You have already seen the first three calls triggering the semantics construction and instantiating the Prolog variables in Section 4.5. Once we have constructed the constraint, solve/2 computes all its solved forms. Finally, usr2LambdaList/2 translates the list of solved forms to a list of "traditional" -terms. All that is left to do is to -convert these terms.

Check it out!

Here, you can see the five readings for ``Every owner of a siamese cat loves a therapist'': clls(silent,[every,owner,of,a,siamese,cat,loves,a,therapist]).

You may uncomment any of the calls of printRepresentations/1 if you wish to inspect the constraint graphs more closely. For the above example, it will look like this: clls(verbose,[every,owner,of,a,siamese,cat,loves,a,therapist]).

Code Summary

clls.pl: View Download

Driver, combine-rules, semantic Macros.

solveConstraint.pl: View Download

Solving: normalization and distribution.

cllsLib.pl: View Download

Working with USRs, tree predicates, translation of solved forms into -terms.

englishGrammar.pl: View Download

The DCG-rules and the lexicon (using module englishLexicon.pl ). From here, the combine-rules and lexical macros are called.

betaConversion.pl: View Download

-conversion.

comsemLib.pl: View Download

Auxiliaries.

comsemOperators.pl: View Download

Operator definitions.

signature.pl: View Download

Generating new variables

readLine.pl: View Download

Reading the input from stdin.


Aljoscha Burchardt, Stephan Walter, Alexander Koller, Michael Kohlhase, Patrick Blackburn and Johan Bos
Version 1.2.5 (20030212)