pub struct AiEngine { /* private fields */ }Expand description
AI-powered RDF processing engine
Implementations§
Source§impl AiEngine
impl AiEngine
Sourcepub async fn initialize_gnn(&mut self, gnn_config: GnnConfig) -> Result<()>
pub async fn initialize_gnn(&mut self, gnn_config: GnnConfig) -> Result<()>
Initialize Graph Neural Network
Sourcepub async fn add_embedding_model(
&mut self,
name: String,
model: Arc<dyn KnowledgeGraphEmbedding>,
) -> Result<()>
pub async fn add_embedding_model( &mut self, name: String, model: Arc<dyn KnowledgeGraphEmbedding>, ) -> Result<()>
Add knowledge graph embedding model
Sourcepub async fn generate_embeddings(
&self,
model_name: &str,
triples: &[Triple],
) -> Result<Vec<Vec<f32>>>
pub async fn generate_embeddings( &self, model_name: &str, triples: &[Triple], ) -> Result<Vec<Vec<f32>>>
Generate embeddings for RDF graph
Sourcepub async fn find_similar_entities(
&self,
entity_vector: &[f32],
top_k: usize,
) -> Result<Vec<(String, f32)>>
pub async fn find_similar_entities( &self, entity_vector: &[f32], top_k: usize, ) -> Result<Vec<(String, f32)>>
Find similar entities using vector similarity
Sourcepub async fn predict_links(
&self,
model_name: &str,
entities: &[String],
relations: &[String],
) -> Result<Vec<(String, String, String, f32)>>
pub async fn predict_links( &self, model_name: &str, entities: &[String], relations: &[String], ) -> Result<Vec<(String, String, String, f32)>>
Predict missing links in knowledge graph
Sourcepub async fn resolve_entities(
&self,
entities: &[Triple],
) -> Result<Vec<EntityCluster>>
pub async fn resolve_entities( &self, entities: &[Triple], ) -> Result<Vec<EntityCluster>>
Resolve entity identity across different sources
Sourcepub async fn extract_relations_from_text(
&self,
text: &str,
) -> Result<Vec<ExtractedRelation>>
pub async fn extract_relations_from_text( &self, text: &str, ) -> Result<Vec<ExtractedRelation>>
Extract relations from text using NLP
Sourcepub async fn temporal_reasoning(
&self,
query: &TemporalQuery,
) -> Result<TemporalResult>
pub async fn temporal_reasoning( &self, query: &TemporalQuery, ) -> Result<TemporalResult>
Perform temporal reasoning on knowledge graph
Sourcepub async fn train_embedding_model(
&self,
model_name: &str,
training_data: &[Triple],
validation_data: &[Triple],
) -> Result<TrainingMetrics>
pub async fn train_embedding_model( &self, model_name: &str, training_data: &[Triple], validation_data: &[Triple], ) -> Result<TrainingMetrics>
Train embedding model on knowledge graph
Sourcepub async fn evaluate_model(
&self,
model_name: &str,
test_data: &[Triple],
) -> Result<EvaluationMetrics>
pub async fn evaluate_model( &self, model_name: &str, test_data: &[Triple], ) -> Result<EvaluationMetrics>
Evaluate model performance
Sourcepub async fn get_statistics(&self) -> Result<AiStatistics>
pub async fn get_statistics(&self) -> Result<AiStatistics>
Get AI engine statistics
Auto Trait Implementations§
impl Freeze for AiEngine
impl !RefUnwindSafe for AiEngine
impl Send for AiEngine
impl Sync for AiEngine
impl Unpin for AiEngine
impl UnsafeUnpin for AiEngine
impl !UnwindSafe for AiEngine
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> 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