[−][src]Struct conllu::token::Token
Methods
impl Token
[src]
pub fn new(form: impl Into<String>) -> Token
[src]
Create a new token where all the non-form fields are absent.
pub fn form(&self) -> &str
[src]
Get the word form or punctuation symbol.
pub fn lemma(&self) -> Option<&str>
[src]
Get the lemma or stem of the word form.
pub fn upos(&self) -> Option<&str>
[src]
Get the universal part-of-speech tag.
pub fn xpos(&self) -> Option<&str>
[src]
Get the language-specific part-of-speech tag.
pub fn features(&self) -> &Features
[src]
Get the syntactic and/or morphological features of the token.
pub fn features_mut(&mut self) -> &mut Features
[src]
Get the syntactic and/or morphological features of the token.
Returns a mutable reference, so that the features can be updated.
pub fn misc(&self) -> &Misc
[src]
Get miscellaneous token features.
pub fn misc_mut(&mut self) -> &mut Misc
[src]
Get miscellaneous token features.
Returns a mutable reference, so that the information can be updated.
pub fn set_form(&mut self, form: impl Into<String>) -> String
[src]
Set the word form or punctuation symbol.
Returns the form that is replaced.
pub fn set_lemma<S>(&mut self, lemma: Option<S>) -> Option<String> where
S: Into<String>,
[src]
S: Into<String>,
Set the lemma or stem of the word form.
Returns the lemma that is replaced.
pub fn set_upos<S>(&mut self, upos: Option<S>) -> Option<String> where
S: Into<String>,
[src]
S: Into<String>,
Set the universal part-of-speech tag.
Returns the universal part-of-speech tag that is replaced.
pub fn set_xpos<S>(&mut self, xpos: Option<S>) -> Option<String> where
S: Into<String>,
[src]
S: Into<String>,
Set the language-specific part-of-speech tag.
Returns the language-specific part-of-speech tag that is replaced.
pub fn set_features(&mut self, features: Features) -> Features
[src]
Set the syntactic and/or morphological features of the token.
Returns the features that are replaced.
pub fn set_misc(&mut self, misc: Misc) -> Misc
[src]
Set miscellaneous token features.
Returns the features that are replaced.
Trait Implementations
impl Clone for Token
[src]
impl Debug for Token
[src]
impl Eq for Token
[src]
impl From<Token> for TokenBuilder
[src]
impl From<TokenBuilder> for Token
[src]
fn from(builder: TokenBuilder) -> Self
[src]
impl FromIterator<Token> for Sentence
[src]
fn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = Token>,
[src]
T: IntoIterator<Item = Token>,
impl PartialEq<Token> for Token
[src]
impl StructuralEq for Token
[src]
impl StructuralPartialEq for Token
[src]
Auto Trait Implementations
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,