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.