pre_tokenizer_whitespace: This pre-tokenizer simply splits using the following regex:...

pre_tokenizer_whitespaceR Documentation

This pre-tokenizer simply splits using the following regex: ⁠\w+|[^\w\s]+⁠

Description

This pre-tokenizer simply splits using the following regex: ⁠\w+|[^\w\s]+⁠

Super class

tok_pre_tokenizer -> tok_pre_tokenizer_whitespace

Methods

Public methods


tok_pre_tokenizer_whitespace$new()

Initializes the whistespace tokenizer

Usage
tok_pre_tokenizer_whitespace$new()

tok_pre_tokenizer_whitespace$clone()

The objects of this class are cloneable with this method.

Usage
tok_pre_tokenizer_whitespace$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other pre_tokenizer: pre_tokenizer, pre_tokenizer_byte_level


tok documentation built on June 21, 2026, 5:07 p.m.