Struct nlprule::types::Sentence[][src]

pub struct Sentence<'t> { /* fields omitted */ }

A Sentence. As opposed to IncompleteSentence, all information is set and frozen. Always contains at least one token.

Implementations

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

pub fn tokens(&self) -> &[Token<'t>][src]

Gets the tokens in this sentence.

pub fn iter(&self) -> impl DoubleEndedIterator<Item = &Token<'_>>[src]

Returns an iterator over tokens by reference.

pub fn text(&self) -> &'t str[src]

Gets the text of this sentence.

pub fn len(&self) -> usize[src]

Gets the amount of tokens in this sentence.

pub fn tagger(&self) -> &'t Tagger[src]

Gets the tagger associated with this sentence.

pub fn span(&self) -> &Span[src]

Returns the span of this sentence.

Trait Implementations

impl<'t> Clone for Sentence<'t>[src]

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

impl<'t> IntoIterator for Sentence<'t>[src]

type Item = Token<'t>

The type of the elements being iterated over.

type IntoIter = IntoIter<Self::Item>

Which kind of iterator are we turning this into?

impl<'t> PartialEq<Sentence<'t>> for Sentence<'t>[src]

Auto Trait Implementations

impl<'t> !RefUnwindSafe for Sentence<'t>

impl<'t> Send for Sentence<'t>

impl<'t> Sync for Sentence<'t>

impl<'t> Unpin for Sentence<'t>

impl<'t> !UnwindSafe for Sentence<'t>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.