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

Method n_tokens

numpy_ml/preprocessing/nlp.py:1083–1085  ·  view source on GitHub ↗

The number of unique word tokens in the vocabulary

(self)

Source from the content-addressed store, hash-verified

1081
1082 @property
1083 def n_tokens(self):
1084 """The number of unique word tokens in the vocabulary"""
1085 return len(self.token2idx)
1086
1087 @property
1088 def n_words(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected