pub trait WordEmbeddings {
    // Required methods
    fn embedding(&self, word: &str) -> Option<CowArray<'_, Float, Ix1>>;
    fn embedding_size(&self) -> usize;
}
Expand description

Word embeddings.

Required Methods§

source

fn embedding(&self, word: &str) -> Option<CowArray<'_, Float, Ix1>>

Returns the embedding of a word.

source

fn embedding_size(&self) -> usize

Returns the number of dimension of the word embeddings.

Implementations on Foreign Types§

source§

impl<V, S> WordEmbeddings for Embeddings<V, S>
where V: Vocab, S: Storage,

source§

fn embedding(&self, word: &str) -> Option<CowArray<'_, Float, Ix1>>

source§

fn embedding_size(&self) -> usize

Implementors§