generate_codes() def transform(self, text): """ Transform the words in `text` into their Huffman-code