The pun word usually fits in the context as it often has the same part-of-speech tag as the alternative word.
the swap creates local surprisal by putting the pun word in an unusual but acceptable context.