From nangelop@csd.abdn.ac.uk  Sat Jul  1 11:56:43 2000
Received: from pigeon.csd.abdn.ac.uk (root@pigeon.csd.abdn.ac.uk [139.133.200.15])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id LAA05912
	for <prolog@swi.psy.uva.nl>; Sat, 1 Jul 2000 11:56:43 +0200 (MET DST)
Received: from kea (nangelop@kea [139.133.200.24])
	by pigeon.csd.abdn.ac.uk (8.9.3/8.9.3) with ESMTP id KAA07965;
	Sat, 1 Jul 2000 10:57:33 +0100 (BST)
Date: Sat, 1 Jul 2000 10:57:33 +0100
From: Nicos Angelopoulos <nangelop@csd.abdn.ac.uk>
To: "Andreas Kaltenbrunner (Dipl.A.Leitsch)" <kalt@logic.at>
cc: prolog@swi.psy.uva.nl
Subject: Re: atom_to_term
In-Reply-To: <Pine.OSF.4.10.10006301713250.739-100000@alpha.logic.tuwien.ac.at>
Message-ID: <Pine.SGI.4.21.0007011051560.518670-100000@kea.csd.abdn.ac.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


Andreas, 

the third argument in atom_to_term returns a number of bindings,
which give you enough handles for doing what you need. 
You just need to call with an unbound variable instead of []
and then instantiate accordingly.

if the above doesn't help then just try:


?- atom_to_term('(s(np(I),vp(verb(go),np(home))))',X,List ), 
   checklist( call, List ).

X = s(np('I'), vp(verb(go), np(home)))
List = ['I'='I'] ;

No
?- 

and read the entry for checklist 

regards

nicos.



On Fri, 30 Jun 2000, Andreas Kaltenbrunner (Dipl.A.Leitsch) wrote:

> Hello
> 
> I have the following Problem:
> 
> I want to transform things like: 
> 
> '(s(np(i),vp(verb(go),np(home))))'
> 
> into:
> 
> s(np(i),vp(verb(go),np(home)))
> 
> I found a solution with
> 
> atom_to_term('(s(np(i),vp(verb(go),np(home))))',X,[]).
> 
> But it doesn't work if I use
> np(I) instead of np(i).
> 
> So my question is how can i transform
> 
> '(s(np(I),vp(verb(go),np(home))))'
> 
> into
> 
> s(np(I),vp(verb(go),np(home)))
> 
> Thanks in advance
> Andreas Kaltenbrunner
> 

