Skip to content

tokenizer tokenizer

GitHub Action edited this page Jul 9, 2026 · 1 revision

Constructors

tokenizer(std::filesystem::path path, bool input = false)

Reads saved vocab if input is true otherwise initializes new vocab.


Basic Info

A tokenizer using a greedy algorithm.

Instance Variables

Variable Type
vocab std::vector<std::string>
path std::filesystem::path

Functions


Example

// Initializing a tokenizer
tokenizer t("./tokenstokenstokensssss.txt");

Clone this wiki locally