pub struct BowEmbedder { /* private fields */ }Implementations§
Source§impl BowEmbedder
impl BowEmbedder
Trait Implementations§
Source§impl Default for BowEmbedder
impl Default for BowEmbedder
Source§impl Embedder for BowEmbedder
impl Embedder for BowEmbedder
fn embed(&self, texts: &[String], _kind: EmbedKind) -> Result<Vec<Vec<f32>>>
Source§fn min_similarity(&self) -> f32
fn min_similarity(&self) -> f32
Score floor under which the top match is treated as “nothing relevant”
and the hook injects nothing. Embedder-specific because cosine
distributions differ sharply: the hashed bag-of-words space is sparse, so
unrelated text scores near 0 and a low floor works; bge is anisotropic, so
even unrelated text cosines ~0.5 and the floor must sit well above that.
The default is calibrated for bag-of-words; embedders override it.
Source§fn score_margin(&self) -> f32
fn score_margin(&self) -> f32
Max score gap below the single best match for a co-relevant peer to still
be injected. Tighter spaces (bge) need a smaller margin. Default is for
bag-of-words.
Auto Trait Implementations§
impl Freeze for BowEmbedder
impl RefUnwindSafe for BowEmbedder
impl Send for BowEmbedder
impl Sync for BowEmbedder
impl Unpin for BowEmbedder
impl UnsafeUnpin for BowEmbedder
impl UnwindSafe for BowEmbedder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().