pub struct HashEmbedder { /* private fields */ }Expand description
Deterministic hashed bag-of-words embedder. No model, no network, same output on every machine (FNV-1a hashing). Similarity reflects shared words only, so it suits tests and offline use, not production recall.
Implementations§
Trait Implementations§
Source§impl Clone for HashEmbedder
impl Clone for HashEmbedder
Source§impl Debug for HashEmbedder
impl Debug for HashEmbedder
Source§impl Default for HashEmbedder
impl Default for HashEmbedder
Source§impl Embedder for HashEmbedder
impl Embedder for HashEmbedder
Source§fn model_id(&self) -> &str
fn model_id(&self) -> &str
Stable identifier persisted beside every vector. Changing the model
changes this id, and old vectors are then ignored (lexical recall
still works) instead of being compared across models, until
crate::Memory::reembed_batch replaces them.Source§fn dimensions(&self) -> usize
fn dimensions(&self) -> usize
Length of every returned vector.
Auto Trait Implementations§
impl Forget for HashEmbedder
impl Freeze for HashEmbedder
impl Move for HashEmbedder
impl RefUnwindSafe for HashEmbedder
impl Send for HashEmbedder
impl Sync for HashEmbedder
impl Unpin for HashEmbedder
impl UnsafeUnpin for HashEmbedder
impl UnwindSafe for HashEmbedder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more