size

Return the size of the dictionary.

Method call format

size()

Type of return value

int

Example

from catboost.text_processing import Dictionary

dictionary = Dictionary(occurence_lower_bound=0)\
    .fit(["his", "tender", "heir", "whatever"])

print(dictionary.size)

Output:

4
Previous