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

Method _counter

numpy_ml/preprocessing/nlp.py:515–519  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

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"""

Callers 1

_build_treeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected