pub mod chunking;
pub mod circuit_breaker;
pub mod downloader;
pub mod keywords;
pub mod minilm;
pub mod ner;
pub use chunking::{chunk_text, ChunkConfig, ChunkResult};
use anyhow::Result;
pub use downloader::{
are_models_downloaded, are_ner_models_downloaded, download_ner_models, ensure_downloaded,
get_cache_dir, get_models_dir, get_ner_models_dir, get_onnx_runtime_path,
is_onnx_runtime_downloaded, print_status,
};
pub use ner::{NerConfig, NerEntity, NerEntityType, NeuralNer};
pub use keywords::{Keyword, KeywordConfig, KeywordExtractor};
pub use circuit_breaker::{
CircuitBreakerConfig, CircuitBreakerMetrics, CircuitState, ResilientEmbedder,
};
pub trait Embedder: Send + Sync {
fn encode(&self, text: &str) -> Result<Vec<f32>>;
fn dimension(&self) -> usize;
fn encode_batch(&self, texts: &[&str]) -> Result<Vec<Vec<f32>>> {
texts.iter().map(|text| self.encode(text)).collect()
}
}