[][src]Struct sticker::SentVectorizer

pub struct SentVectorizer { /* fields omitted */ }

Vectorizer for sentences.

An SentVectorizer vectorizes sentences.

Methods

impl SentVectorizer[src]

pub fn new(layer_embeddings: LayerEmbeddings) -> Self[src]

Construct an input vectorizer.

The vectorizer is constructed from the embedding matrices. The layer embeddings are used to find the indices into the embedding matrix for layer values.

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

Get the length of the input representation.

pub fn layer_embeddings(&self) -> &LayerEmbeddings[src]

Get the layer embeddings.

pub fn realize(&self, sentence: &Sentence) -> Result<Vec<f32>, Error>[src]

Vectorize a sentence.

Auto Trait Implementations

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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