[][src]Struct conllu::token::TokenBuilder

pub struct TokenBuilder { /* fields omitted */ }

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 Tokens.

Methods

impl TokenBuilder[src]

pub fn new(form: impl Into<String>) -> TokenBuilder[src]

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

pub fn form(self, form: impl Into<String>) -> TokenBuilder[src]

Set the word form or punctuation symbol.

pub fn lemma(self, lemma: impl Into<String>) -> TokenBuilder[src]

Set the lemma or stem of the word form.

pub fn upos(self, upos: impl Into<String>) -> TokenBuilder[src]

Set the universal part-of-speech tag.

pub fn xpos(self, xpos: impl Into<String>) -> TokenBuilder[src]

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

pub fn features(self, features: Features) -> TokenBuilder[src]

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

pub fn misc(self, misc: Misc) -> TokenBuilder[src]

Set miscellaneous token features.

Trait Implementations

impl From<Token> for TokenBuilder[src]

impl From<TokenBuilder> for Token[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.