I think the parrot had been taught - probably with a food reward - but so, in a sense are kids! The point is that in order to respond correctly the parrot had to handle at least some grammar - not just say peanut and get a peanut. As I remember, the parrot had not simply been taught all the possible sentences, so he was responding to the structure of the sentence.
These experiments are always associated with lots of analysis along the lines you mention, but to me, the ideal should be to simply find how far animal communication can go - the theorising seems less important. There are also plenty of examples of monkeys communicating via various kinds of simple computer interfaces.
David |