[−][src]Struct conllx::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 cpos(&self) -> Option<&str>
[src]
Get the coarse-grained part-of-speech tag.
pub fn pos(&self) -> Option<&str>
[src]
Get the fine-grained part-of-speech tag.
pub fn features(&self) -> Option<&Features>
[src]
Get the syntactic and/or morphological features of the token.
pub fn features_mut(&mut self) -> Option<&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 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_cpos<S>(&mut self, cpos: Option<S>) -> Option<String> where
S: Into<String>,
[src]
S: Into<String>,
Set the coarse-grained part-of-speech tag.
Returns the coarse-grained part-of-speech tag that is replaced.
pub fn set_pos<S>(&mut self, pos: Option<S>) -> Option<String> where
S: Into<String>,
[src]
S: Into<String>,
Set the fine-grained part-of-speech tag.
Returns the fine-grained part-of-speech tag that is replaced.
pub fn set_features(&mut self, features: Option<Features>) -> Option<Features>
[src]
Set the syntactic and/or morphological features of the token.
Returns the features that are replaced.
Trait Implementations
impl Eq for Token
[src]
impl Clone for Token
[src]
impl PartialEq<Token> for Token
[src]
impl From<Token> for TokenBuilder
[src]
impl From<TokenBuilder> for Token
[src]
fn from(builder: TokenBuilder) -> Self
[src]
impl Debug for Token
[src]
impl FromIterator<Token> for Sentence
[src]
fn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = Token>,
[src]
T: IntoIterator<Item = Token>,
Auto Trait Implementations
impl Send for Token
impl Unpin for Token
impl Sync for Token
impl UnwindSafe for Token
impl RefUnwindSafe for Token
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,