pub struct SchemaEmbedder { /* private fields */ }Expand description
Schema element embedding generator.
Generates vector embeddings for domains, predicates, and schemas based on their structural and semantic properties.
Implementations§
Source§impl SchemaEmbedder
impl SchemaEmbedder
Sourcepub fn with_normalization(self, normalize: bool) -> Self
pub fn with_normalization(self, normalize: bool) -> Self
Set whether to normalize embeddings.
Sourcepub fn with_weights(self, weights: EmbeddingWeights) -> Self
pub fn with_weights(self, weights: EmbeddingWeights) -> Self
Set custom feature weights.
Sourcepub fn embed_domain(&self, domain: &DomainInfo) -> Embedding
pub fn embed_domain(&self, domain: &DomainInfo) -> Embedding
Generate embedding for a domain.
Sourcepub fn embed_predicate(&self, predicate: &PredicateInfo) -> Embedding
pub fn embed_predicate(&self, predicate: &PredicateInfo) -> Embedding
Generate embedding for a predicate.
Sourcepub fn embed_schema(&self, table: &SymbolTable) -> Embedding
pub fn embed_schema(&self, table: &SymbolTable) -> Embedding
Generate embedding for an entire schema.
Sourcepub fn cosine_similarity(a: &Embedding, b: &Embedding) -> f64
pub fn cosine_similarity(a: &Embedding, b: &Embedding) -> f64
Compute cosine similarity between two embeddings.
Sourcepub fn euclidean_distance(a: &Embedding, b: &Embedding) -> f64
pub fn euclidean_distance(a: &Embedding, b: &Embedding) -> f64
Compute Euclidean distance between two embeddings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaEmbedder
impl RefUnwindSafe for SchemaEmbedder
impl Send for SchemaEmbedder
impl Sync for SchemaEmbedder
impl Unpin for SchemaEmbedder
impl UnwindSafe for SchemaEmbedder
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