(self, text)
| 513 | return list(self._code2item.keys()) |
| 514 | |
| 515 | def _counter(self, text): |
| 516 | counts = {} |
| 517 | for item in text: |
| 518 | counts[item] = counts.get(item, 0) + 1 |
| 519 | return counts |
| 520 | |
| 521 | def _build_tree(self, text): |
| 522 | """Construct Huffman Tree""" |