From luis@opera.dia.fi.upm.es  Wed Nov 22 19:56:55 2000
Received: from goofy.fi.upm.es (goofy.fi.upm.es [138.100.8.23])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id TAA22081
	for <prolog@swi.psy.uva.nl>; Wed, 22 Nov 2000 19:56:54 +0100 (MET)
Received: from conversion.relay.fi.upm.es by relay.fi.upm.es
 (PMDF V6.0-24 #46251) id <01JWUPNNERS0000DAS@relay.fi.upm.es> for
 prolog@swi.psy.uva.nl; Wed, 22 Nov 2000 19:56:08 +0100 (MET)
Received: from opera.dia.fi.upm.es (opera.dia.fi.upm.es [138.100.11.43])
 by relay.fi.upm.es (PMDF V6.0-24 #46251)
 with ESMTP id <01JWUPNMULPU000CKN@relay.fi.upm.es>; Wed,
 22 Nov 2000 19:56:07 +0100 (MET)
Received: from localhost (luis@localhost)
	by opera.dia.fi.upm.es (8.9.3+Sun/8.9.3) with ESMTP id TAA13424; Wed,
 22 Nov 2000 19:54:04 +0000 (GMT)
Date: Wed, 22 Nov 2000 19:54:04 +0000 (GMT)
From: Luis Iraola <luis@opera.dia.fi.upm.es>
Subject: Re: PP Attachment
In-reply-to: <003d01c05432$de90bf60$a0a6d9d5@sdegiorgi>
X-Sender: luis@opera
To: Stefano De Giorgi <s.degiorgi@tin.it>
Cc: prolog@swi.psy.uva.nl
Message-id: <Pine.GSO.4.21.0011221943260.12732-100000@opera>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=US-ASCII



On Wed, 22 Nov 2000, Stefano De Giorgi wrote:

> Using DCG,
> how can I prefer the "Right Association" vs "Minimal Attachment" reading?
> With a score?

I am not sure of what you really want, but in case it helps this is
an approach:

You may rely on the general backtraking and rule-order mechanism.

Your PP category is defined with the typical couple of rules, rule one
saying that a single PP satisfies it, and rule two consuming recursively
as many PPs as possible from the input list.

If rule one is placed first, then your grammar first attempts to consume
just one PP (Minimal attachement, I am assuming you mean that), and under
backtraking it may consume as many PPs as possible. If the recursive rule
is placed first then your grammar consumes as many PPs as possible on the
first solution (Right association) and only under backtraking right-most
PPs are left un-consumed.

Making the category deterministic (e.g. using once/1) the grammar is
committed to one or the other behaviour.

Best,

Luis Iraola.

