Struct nlprule::types::Token[][src]

pub struct Token<'t> {
    pub word: Word<'t>,
    pub char_span: (usize, usize),
    pub byte_span: (usize, usize),
    pub has_space_before: bool,
    pub chunks: Vec<String>,
    pub sentence: &'t str,
    pub tagger: &'t Tagger,
}

A finished token with all information set.

Fields

word: Word<'t>char_span: (usize, usize)byte_span: (usize, usize)has_space_before: boolchunks: Vec<String>sentence: &'t strtagger: &'t Tagger

Implementations

impl<'t> Token<'t>[src]

pub fn sent_start(sentence: &'t str, tagger: &'t Tagger) -> Self[src]

Get the special sentence start token.

pub fn to_owned_token(&self) -> Token[src]

Trait Implementations

impl<'t> Debug for Token<'t>[src]

impl<'t> From<IncompleteToken<'t>> for Token<'t>[src]

Auto Trait Implementations

impl<'t> !RefUnwindSafe for Token<'t>[src]

impl<'t> Send for Token<'t>[src]

impl<'t> Sync for Token<'t>[src]

impl<'t> Unpin for Token<'t>[src]

impl<'t> !UnwindSafe for Token<'t>[src]

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> Pointable for T

type Init = T

The type for initializers.

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.