MCPcopy Index your code
hub / github.com/ddbourgin/numpy-ml / codebook

Method codebook

numpy_ml/preprocessing/nlp.py:377–386  ·  view source on GitHub ↗

A list of the learned byte pair codewords, decoded into human-readable format

(self)

Source from the content-addressed store, hash-verified

375
376 @property
377 def codebook(self):
378 """
379 A list of the learned byte pair codewords, decoded into human-readable
380 format
381 """
382 return [
383 self.inverse_transform(t)[0]
384 for t in self.byte2token.keys()
385 if isinstance(t, tuple)
386 ]
387
388 @property
389 def tokens(self):

Callers 1

test_huffmanFunction · 0.80

Calls 1

inverse_transformMethod · 0.95

Tested by 1

test_huffmanFunction · 0.64