[][src]Struct finalfrontier::VocabBuilder

pub struct VocabBuilder<C, T> { /* fields omitted */ }

Generic builder struct to count types.

Items are added to the vocabulary and counted using the count method. There is no explicit build method, conversion is done via implementing From<VocabBuilder<T>>.

Methods

impl<C, T> VocabBuilder<C, T> where
    T: Hash + Eq
[src]

pub fn new(config: C) -> Self[src]

pub fn count<S>(&mut self, item: S) where
    S: Into<T>, 
[src]

Trait Implementations

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> From<VocabBuilder<SubwordVocabConfig, T>> for SubwordVocab where
    T: Hash + Eq + Into<String>, 
[src]

Constructs a SubwordVocab from a VocabBuilder<T> where T: Into<String>.

Auto Trait Implementations

impl<C, T> Send for VocabBuilder<C, T> where
    C: Send,
    T: Send

impl<C, T> Sync for VocabBuilder<C, T> where
    C: Sync,
    T: Sync

impl<C, T> Unpin for VocabBuilder<C, T> where
    C: Unpin,
    T: Unpin

impl<C, T> UnwindSafe for VocabBuilder<C, T> where
    C: UnwindSafe,
    T: UnwindSafe

impl<C, T> RefUnwindSafe for VocabBuilder<C, T> where
    C: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

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

impl<T> From<T> for T[src]

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.

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

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

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