Struct conllx::TokenBuilder [] [src]

pub struct TokenBuilder { /* fields omitted */ }

A builder for Tokens.

The Token type stores a CoNLL-X 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]

Create a Token builder 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 coarse-grained part-of-speech tag.

Set the fine-grained part-of-speech tag.

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

Set the head of the token. This is the sentence position of the head plus one. If the head is 0, the token the root of the dependency tree.

Set the dependency relation to the head of this token.

Set the projective head of the token. This is the sentence position of the head plus one. If the head is 0, the token the root of the dependency tree. The dependency structure resulting from the projective heads must be projective.

Set the dependency relation to the projective head of this token.