Expand description
Note enrichment operations.
This module provides workflows for finding notes with empty fields and updating them with new content.
§Example
use ankit_engine::Engine;
use ankit_engine::enrich::EnrichQuery;
let engine = Engine::new();
// Find notes missing the "Example" field
let query = EnrichQuery {
search: "deck:Japanese".to_string(),
empty_fields: vec!["Example".to_string()],
};
let candidates = engine.enrich().find_candidates(&query).await?;
println!("Found {} notes needing enrichment", candidates.len());
// Update a note with enriched content
use std::collections::HashMap;
let mut updates = HashMap::new();
updates.insert("Example".to_string(), "New example sentence".to_string());
engine.enrich().update_note(candidates[0].note_id, &updates).await?;Structs§
- Enrich
Candidate - A note that is a candidate for enrichment.
- Enrich
Engine - Enrichment workflow engine.
- Enrich
Failure - Details about a failed enrichment.
- Enrich
Pipeline Report - Report from an enrichment pipeline commit.
- Enrich
Query - Query parameters for finding notes to enrich.
- Enrich
Report - Report from a batch enrichment operation.
- Enrichment
Pipeline - A pipeline for batch enrichment operations.