Danny Elfman who wrote and performed the music for Charlie and the Chocolate Factory, used only a fraction of Roald Dahl's orginal, extremely nasty lyrics from the book.
Here's an example of parts Elfman didn't use (from the song for Augustus Gloop):
However long this pig might live,
We're positive he'd never give
Even the smallest bit of fun
Or happiness to anyone.[snip]
So what we do in cases such
As this, we use the gentle touch,
And carefully we take the brat
And turn him into something thatWill give great pleasure to us all —
A doll, for instance, or a ball,
Or marbles or a rocking horse.