Skip to main content

Module summary_extractor

Module summary_extractor 

Source
Expand description

Extractive summarization based on sentence embedding similarity.

SemanticSummaryExtractor selects representative sentences from a collection by scoring them against an optional query embedding (cosine similarity) or, when no query is provided, by centrality (average cosine similarity to every other sentence). A greedy selection loop with a configurable diversity penalty prevents redundant picks.

Structsยง

ExtractionResult
Result of an extraction run.
ExtractorScoredSentence
A sentence together with its embedding, score, and selection flag.
ExtractorSummaryConfig
Controls the behaviour of SemanticSummaryExtractor::extract.
SemanticSummaryExtractor
Extractive summariser driven by sentence embeddings.
SummaryExtractorStats
Simple stats counter.