PrologStudent1
Programmer
- Oct 6, 2014
- 1
Hello everyone. I am currently coding a program that is supposed to get as input a clause, and write back ie the grammatical number or the time (past/future/present).
i.e. "The dog barks now." gives : Number: Singular, Time: Present.
the following is a part of my code, where it prints "Accepted" if the sentence given is syntactically correct.
What should I add in order to print as well Number and Time variables?
Thanks in advance!
i.e. "The dog barks now." gives : Number: Singular, Time: Present.
the following is a part of my code, where it prints "Accepted" if the sentence given is syntactically correct.
Code:
check(Sentence) :-
s(Sentence, []) -> write('Accepted\n')
s --> np(Number), vp(Number, Time).
What should I add in order to print as well Number and Time variables?
Thanks in advance!