[][src]Struct finalfrontier::SkipgramTrainer

pub struct SkipgramTrainer<R> { /* fields omitted */ }

Skipgram Trainer

The SkipgramTrainer holds the information and logic necessary to transform a tokenized sentence into an iterator of focus and context tuples. The struct is cheap to clone because the vocabulary is shared between clones.

Methods

impl<R> SkipgramTrainer<ReseedOnCloneRng<R>> where
    R: Rng + Clone + SeedableRng
[src]

pub fn new(
    vocab: SubwordVocab,
    rng: R,
    common_config: CommonConfig,
    skipgram_config: SkipGramConfig
) -> Self
[src]

Constructs a new SkipgramTrainer.

Trait Implementations

impl<R> Trainer for SkipgramTrainer<R> where
    R: Rng + Clone
[src]

type InputVocab = SubwordVocab

type Metadata = SkipgramMetadata<SubwordVocabConfig>

impl<R: Clone> Clone for SkipgramTrainer<R>[src]

Auto Trait Implementations

impl<R> Send for SkipgramTrainer<R> where
    R: Send

impl<R> Sync for SkipgramTrainer<R> where
    R: Sync

impl<R> Unpin for SkipgramTrainer<R> where
    R: Unpin

impl<R> UnwindSafe for SkipgramTrainer<R> where
    R: UnwindSafe

impl<R> RefUnwindSafe for SkipgramTrainer<R> where
    R: RefUnwindSafe

Blanket Implementations

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

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

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.

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]