Trait WordEmbeddings

Source
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§