A Plug-and-Play Method for Controlled Text Generation