Adapting categorical distribution.