MCPcopy Create free account
hub / github.com/ddbourgin/numpy-ml / __iter__

Method __iter__

numpy_ml/preprocessing/nlp.py:1064–1066  ·  view source on GitHub ↗

Return an iterator over the tokens in the vocabulary

(self)

Source from the content-addressed store, hash-verified

1062 return len(self._tokens)
1063
1064 def __iter__(self):
1065 """Return an iterator over the tokens in the vocabulary"""
1066 return iter(self._tokens)
1067
1068 def __contains__(self, word):
1069 """Assert whether `word` is a token in the vocabulary"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected