Trait sif_embedding::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§
sourcefn embedding(&self, word: &str) -> Option<CowArray<'_, Float, Ix1>>
fn embedding(&self, word: &str) -> Option<CowArray<'_, Float, Ix1>>
Returns the embedding of a word.
sourcefn embedding_size(&self) -> usize
fn embedding_size(&self) -> usize
Returns the number of dimension of the word embeddings.