[][src]Struct finalfrontier::SimpleVocab

pub struct SimpleVocab<T> { /* fields omitted */ }

Generic corpus vocabulary type.

Can be used as an input or output lookup.

Methods

impl<T> SimpleVocab<T> where
    T: Hash + Eq + Clone + Ord
[src]

pub fn get<Q: ?Sized>(&self, context: &Q) -> Option<&CountedType<T>> where
    T: Borrow<Q>,
    Q: Hash + Eq
[src]

Get a specific context

Trait Implementations

impl<T> Vocab for SimpleVocab<T> where
    T: Hash + Eq
[src]

type VocabType = T

type Config = SimpleVocabConfig

fn is_empty(&self) -> bool[src]

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

Get the number of entries in the vocabulary.

impl From<SimpleVocab<String>> for VocabWrap[src]

impl<T, S> From<VocabBuilder<SimpleVocabConfig, T>> for SimpleVocab<S> where
    T: Hash + Eq + Into<S>,
    S: Hash + Eq + Clone + Ord
[src]

Constructs a SimpleVocab<S> from a VocabBuilder<T> where T: Into<S>.

impl<T: Clone> Clone for SimpleVocab<T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> Send for SimpleVocab<T> where
    T: Send

impl<T> Sync for SimpleVocab<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.