unknown_token_id

Get the identifier of the token, which is assigned to all words that are not found in the dictionary.

Method call format

unknown_token_id()

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.unknown_token_id)
print(dictionary.get_token(dictionary.unknown_token_id))

Output:

4