Hi,
I am learning grammar and parsing. Here I can parse a very simple sentence
"John eats the cat". BUT HOW CAN I EXTEND IT TO PARSE A MORE COMPLICATED SENTENCE LIKE " The wombat on Jane give him". The parts of speech to be covered are: art noun prep pro proper v
("pro" signifies pronoun...
Hi! I got stuck with this problem. When I trace it(trace! in iprolog), I notice that it doesn't loop correctly for Di values.
And I have 2 different implementations, i)when Do<Di. ii)when Do>=Di. But when Do>=Di, it doesn't perform the expected action(append..), yet go back to distance...
Hi,
How can I write a predicate for tree_height(Tree,Height) that binds Height to the number of nodes on the longest path from the root to a leaf in a binary tree. Trees are represented either "empty" or as "tree(L,Data,R)", where L and R are the left and right are the left and right subtrees...
How can I write a predicate that takes a List like [1,2,3,4,5,6] and binds NewList to a list formed by interchanging pairs of members of the list, so in the example, NewList would be [2,1,4,3,6,5]. If the list has an odd number, then the final one is left unchanged at the end of the NewList...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.