pub struct Worker<'a> { /* private fields */ }
Expand description

Provider of a routine for tokenization.

It holds the internal data structures used in tokenization, which can be reused to avoid unnecessary memory reallocation.

Implementations

Resets the input sentence to be tokenized.

Errors

When the input sentence includes characters more than MAX_SENTENCE_LENGTH, an error will be returned.

Tokenizes the input sentence set in state, returning the result through state.

Gets the number of resultant tokens.

Gets the i-th resultant token.

Creates an iterator of resultant tokens.

Initializes a counter to compute occurrence probabilities of connection ids.

Updates frequencies of connection ids at the last tokenization.

Panics

It will panic when Self::init_connid_counter() has never been called.

Computes the computed occurrence probabilities of connection ids, returning those for left- and right-ids.

Panics

It will panic when Self::init_connid_counter() has never been called.

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.