[−][src]Struct conllu::token::TokenBuilder
A builder for Token
s.
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
s.
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]
fn from(builder: TokenBuilder) -> Self
[src]
Auto Trait Implementations
impl RefUnwindSafe for TokenBuilder
impl Send for TokenBuilder
impl Sync for TokenBuilder
impl Unpin for TokenBuilder
impl UnwindSafe for TokenBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,