Getting started
Examples
Developper documentation
API documentation
Utilities for vocabularies.
Read vocabulary from file.
path (str) – Path to .txt file with one item per line
List[str]
List
str
Return vocabulary size from mapping file.
int
Write vocabulary to file.
vocab (Iterable[str]) – Iterable of lexemes (strings) Lexemes should not have newline characters.