Skip to main content

popsam_core/
lib.rs

1//! Core library for selecting semantically representative texts from a larger collection.
2//!
3//! The public API is organized around three concerns:
4//! - input and result data models in [`model`]
5//! - embedding providers in [`embedding`]
6//! - the elimination algorithm in [`election`]
7
8#![deny(missing_docs)]
9
10/// Election configuration and execution.
11pub mod election;
12/// Embedding provider traits and implementations.
13pub mod embedding;
14/// Error types returned by the library.
15pub mod error;
16/// Serializable data models used by the public API.
17pub mod model;
18
19pub use election::{run_election, ElectionConfig};
20pub use embedding::{
21    CandleEmbeddingModelFiles, CandleEmbeddingModelSpec, CandleEmbeddingProvider,
22    EmbeddingProvider, OpenAiCompatibleEmbeddingProvider,
23};
24pub use error::{PopsamError, PopsamResult};
25pub use model::{
26    CandidateBestResult, CandidateRoundVotes, ElectionResult, EmbeddedText, EmbeddedTextInput,
27    InputRecord, RoundSummary,
28};