. . . I have already mentioned that parrots may be taught to repeat words, or even sentences . . . They will, however, often learn any sounds that they hear frequently, without being taught; and parrots that are hung on the outside of a window in a street, will repeat all the cries that they hear. The story of Vert Vert, which has been turned into verse by a French poet, is a decided proof of this. This parrot had been brought up in a convent, and had learnt to repeat all the services of the church.
The nuns of a neighbouring convent having heard of this extraordinary bird, sent a petition that it might be allowed to pay them a visit. The request was granted, but unfortunately poor Vert Vert was sent by a common passage-boat; and, on the road, he picked up the oaths and vulgar language of the boatmen and their passengers. With this language he saluted the abbess and her nuns whom he was sent to visit, instead of the hymns and religious sentences they had been led to expect; and the horror of the nuns may be easily imagined.
Poor Vert Vert was sent back in disgrace to his own convent, where his former friends were obliged to keep him in solitary confinement till he had forgotten all the horrid things he had unfortunately learnt.
-- from Jane Loudon, Domestic Pets: Their Habits and Management (London: Grant and Griffith, 1851), p. 74. It's true, the story was turned into verse and translated many a time.