pub struct BuiltInEmbedder { /* private fields */ }Expand description
A TF-IDF vectorizer that works entirely offline with no external
dependencies. Call BuiltInEmbedder::fit with a corpus to build the
vocabulary, then use Embedder::embed to compute vectors.
Implementations§
Trait Implementations§
Source§impl Debug for BuiltInEmbedder
impl Debug for BuiltInEmbedder
Source§impl Default for BuiltInEmbedder
impl Default for BuiltInEmbedder
Source§impl Embedder for BuiltInEmbedder
impl Embedder for BuiltInEmbedder
Source§fn embed(&self, text: &str) -> PunchResult<Vec<f32>>
fn embed(&self, text: &str) -> PunchResult<Vec<f32>>
Compute an embedding vector for a single piece of text.
Source§fn embed_batch(&self, texts: &[&str]) -> PunchResult<Vec<Vec<f32>>>
fn embed_batch(&self, texts: &[&str]) -> PunchResult<Vec<Vec<f32>>>
Compute embedding vectors for a batch of texts.
Source§fn dimensions(&self) -> usize
fn dimensions(&self) -> usize
The dimensionality of vectors produced by this embedder.
Auto Trait Implementations§
impl Freeze for BuiltInEmbedder
impl RefUnwindSafe for BuiltInEmbedder
impl Send for BuiltInEmbedder
impl Sync for BuiltInEmbedder
impl Unpin for BuiltInEmbedder
impl UnsafeUnpin for BuiltInEmbedder
impl UnwindSafe for BuiltInEmbedder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more