Anagram canonization