Skip to content

tokenizer add_token

GitHub Action edited this page Jul 9, 2026 · 1 revision
void add_token(std::string token)

Basic Info

Adds a token to the vocab.

Return Type

Returns void

Parameters

Parameter Type Use Optional
token std::string New Token ❌

Example

// Calling the add_token() function
tokenizer t("bestvocab.txt");
t.add_token("CoolNewToken !!! yay");

Clone this wiki locally