pub struct Tokenizer { /* private fields */ }
Expand description

Tokenizer.

Implementations

Creates a new instance.

Arguments
  • dict: Dictionary to be used.

Ignores spaces from tokens.

This option is for compatibility with MeCab. Enable this if you want to obtain the same results as MeCab.

Errors

VibratoError is returned when category SPACE is not defined in the input dictionary.

Specifies the maximum grouping length for unknown words. By default, the length is infinity.

This option is for compatibility with MeCab. Specifies the argument with 24 if you want to obtain the same results as MeCab.

Arguments
  • max_grouping_len: The maximum grouping length for unknown words. The default value is 0, indicating the infinity length.

Gets the reference to the dictionary.

Creates a new worker.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.