Subject: Re: atom_to_term

From: Nicos Angelopoulos <[email-masked]>
Date: Sat, 1 Jul 2000 10:57:33 +0100

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
>