HELP! Exclusive-OR help needed
From: Mark (coconutpete_at_hotmail.com)
Date: 05/09/04
- Next message: timothy liverance: "Run this with A.I"
- Previous message: bart demoen: "Re: mutual rules: if brother(a,b) then brother(b,a)"
- Next in thread: Nick Wedd: "Re: HELP! Exclusive-OR help needed"
- Reply: Nick Wedd: "Re: HELP! Exclusive-OR help needed"
- Reply: Martin Sondergaard: "Re: HELP! Exclusive-OR help needed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 9 May 2004 13:42:14 -0700
Hi all, I need some help creating an exclusive-or rule in prolog. Im
trying to create a rule that attempts to parse a sentence, if it can
(i.e. true) then prints out the parsed sentence, otherwise ONLY print
out a brief statement saying that parsing was unsuccessful.
If it isnt true it works fine, but if the sentence is parsed it prints
out both of the rules. Could anyone tell me where i am going wrong
please?
(
(sent(Parse,Input,[]),write(Parse),nl,match_rule(Input))
;
(write('Sentence could not be parsed'),match_rule(Input))
).
Thanks in advance
- Next message: timothy liverance: "Run this with A.I"
- Previous message: bart demoen: "Re: mutual rules: if brother(a,b) then brother(b,a)"
- Next in thread: Nick Wedd: "Re: HELP! Exclusive-OR help needed"
- Reply: Nick Wedd: "Re: HELP! Exclusive-OR help needed"
- Reply: Martin Sondergaard: "Re: HELP! Exclusive-OR help needed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]