NLP tasks (Józefowicz et al., 2016;Gehrmann et al., 2018;Skadina and Pinnis, 2017).
beam search, the de-facto decoding algorithm used in many language generation methods, cannot be used as-is to generate anagrams since it cannot ensure that the generated sentences are anagrams.