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

A builder for Tokens.

The Token type stores a CoNLL-U token. However, since this format permits a large number of fields, construction of a token can get tedious. This builder provides a fluent interface for creating Token instances.

Implementations

Create a TokenBuilder with all non-form fields set to absent.

Set the word form or punctuation symbol.

Set the lemma or stem of the word form.

Set the universal part-of-speech tag.

Set the language-specific part-of-speech tag.

Set the syntactic and/or morphological features of the token.

Set UD enhanced dependencies.

Warning: this method will be removed once proper support for enhanced dependencies is added.

Set miscellaneous token features.

Trait Implementations

Converts to this type from the input type.

Converts to this type from the input type.

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.