prokbert.prokbert_tokenizer.ProkBERTTokenizer.save_vocabulary
- ProkBERTTokenizer.save_vocabulary(save_directory: str, filename_prefix: Optional[str] = None) Tuple[str]
Saves the tokenizer’s vocabulary to a file in the specified directory.
This method writes the vocabulary tokens to a text file, with each token on a new line. The filename can be prefixed with an optional string for clearer identification.
- Parameters
- Returns
A tuple containing the path to the saved vocabulary file.
- Return type
Tuple[str]
- Usage Example:
>>> tokenizer = ProkBERTTokenizer() >>> saved_path = tokenizer.save_vocabulary("/path/to/save", filename_prefix="prokbert_") >>> print(saved_path) ...