Version: 3.x

rasa.nlu.tokenizers._tokenizer

Token Objects

class Token()

set

| set(prop: Text, info: Any) -> None

Set property value.

get

| get(prop: Text, default: Optional[Any] = None) -> Any

Returns token value.

fingerprint

| fingerprint() -> Text

Returns a stable hash for this Token.

Tokenizer Objects

class Tokenizer(Component)

Base class for tokenizers.

__init__

| __init__(component_config: Dict[Text, Any] = None) -> None

Construct a new tokenizer using the WhitespaceTokenizer framework.

tokenize

| tokenize(message: Message, attribute: Text) -> List[Token]

Tokenizes the text of the provided attribute of the incoming message.

train

| train(training_data: TrainingData, config: Optional[RasaNLUModelConfig] = None, **kwargs: Any, ,) -> None

Tokenize all training data.

process

| process(message: Message, **kwargs: Any) -> None

Tokenize the incoming message.