sorts words in a repository