🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #1441

Re: Question about DCGs and natural language grammars

#1441
From: Richard A. O'Keefe
Date: Fri, 23 Nov 1990 07:15
78 lines
3718 bytes
In article <MARK.90Nov21120114@adler.philosophie.uni-stuttgart.de>, mark@adler.philosophie.uni-stuttgart.de (Mark Johnson) writes:
> What's worrying me is this: if we use a DCG grammar to
> define a relation means/2 true of a string of English words
> and some representation of its meaning (say, an encoding of
> a first-order formula), we can prove things like the
> following:

>   S=[i,saw,a,man,with,a,telescope], means(S,M1), means(S,M2).

> where M1 represents a meaning where where the man has a telescope,
> and M2 represents a meaning where the seeing is done with the
> telescope.

What this means is
	"M1 is a possible reading of S"
    and	"M2 is a possible reading of S"
which is true.  Where's the problem?

> That is, from our axioms we can prove that S means M1 *and* S means M2.

This is not a problem with DCGs, it's a problem with your English.
What you can prove is that M1 is a possible reading of S and that
M2 is a possible reading of S, and that's _true_.

> First, you can deny that natural language ambiguity really leads to 
> disjunctive, rather than conjunctive, consequents.

This is not a way out of the pseudo-problem.  You get means(S,M1)
and means(S,M2) as solutions precisely *because* means/2 is "disjunctive".

Let me give you an example.  There are two ways I can leave this office.
I can go through the door, or I can jump out the window (not a good idea,
I'm on the 11th floor).  So we have
	has_available_exit(ok, door).
	has_availalbe_exit(ok, window).
meaning that I can go through the door OR I can go through the window.
From this we can prove
	?- has_available_exit(S, M1), has_evailable_exit(S, M2).
	S = ok,
	M1 = door,
	M2 = window
which *correctly* says that it is possible for me to go through the
door *and* that it is possible for me to go through the window.
No problem!  (As long as I _don't_ go through the window (:-).)

>    S = [the,man,saw,the,woman], presupposes(S,exists(X,man(X))),
>    presupposes(S,exists(Y,woman(Y))), ...

> presupposes(Sentence,Presupp) :- parse(Sentence,Tree), presupp(Tree,Presupp).

> But now the ambiguity problem comes back with a vengance.

There is NO ambiguity problem here, only a misreading.
presupposes(S, X^man(X))	gives you ONE presupposition, not all of them
presupposes(S, Y^woman(Y))	gives you ONE presupposition, not all of them.

If you want something that gives you *all* the presuppositions that are
implicit in a particular reading, you will have to write a predicate
that *DOES* that, i.e. that returns a structure representing a _set_ of
presuppositions, e.g.
	presupposes(S, [X^man(X),Y^woman(Y)])

> But I think there is
> a deeper issue here -- why doesn't the straight-forward approach
> sketched above work?

Because it's WRONG.  It simply doesn't say what you think it says.
This has nothing to do with DCGs or Prolog as such.  It's a question
of how to use logic to say what you mean.  What you are saying is not
what you mean.

> Second, you can admit that we really do want to get disjunctive
> consequents.

I don't know what "we" want, but in your examples it's not been what
_you_ need.
-- 
I am not now and never have been a member of Mensa.		-- Ariadne.
Technical Details
Message-ID: <4359@goanna.cs.rmit.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!munnari.oz.au!goanna!ok
References: <MARK.90Nov21120114@adler.philosophie.uni-stuttgart.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!samsung!munnari.oz.au!goanna!ok
From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
Newsgroups: comp.lang.prolog
Subject: Re: Question about DCGs and natural language grammars
Message-ID: <4359@goanna.cs.rmit.oz.au>
Date: 23 Nov 90 07:15:43 GMT
References: <MARK.90Nov21120114@adler.philosophie.uni-stuttgart.de>
Distribution: comp
Organization: Comp Sci, RMIT, Melbourne, Australia
Lines: 78