A different method to Jim's is to saw lengthways down the nut, cutting it fully in two, then using pliers across both sections should squash it together and should free both sides from the wood. Best to score a line down the middle first and use a thin craft-saw.

However, there's never been a nut that I haven't eventually freed by constant gentle tapping, even if it takes quite a while.