I am trying to implement a verb-attached preposition phrases in prolog.
So I've got:
VP -> Vbar
Vbar -> v, PP
PP -> Pbar
Pbar -> prep,np
the problem is when I try to phrase something like "Mary saw Tom with a telescope". There would be an error.
Can someone please give me some idea how to fix it?
Also can anyone please give me an idea how to implement the semantic of the Verb-attach prepositional phrase?
I do not know what the error is so I cannot say for sure, but the code you posted has a number of issues.
-->
, not->
. I am not sure what->
does, if anything at all.''
.-->
. You can find some information on it here. Because of this, if you want the symbolv
to unify in your predicates you should write[v]
.I am not sure if this code has the functionality you desire, but it does run:
You can call it like this: