Text this: Associative learning for collective decision-making in dynamic environments