Package-level declarations

Types

Link copied to clipboard
data class CollectorRunContext(val runId: String, val contextId: <Error class: unknown class>, val dryRun: Boolean = false, val clock: Clock = Clock.systemUTC())

Everything one run of the multi-signal collector needs beyond the candidate propositions themselves: a run id to tag its trace rows with, which context it's sweeping, whether it should hold off on anything that isn't read-only, and a clock so tests can pin "now".

Link copied to clipboard

Picks the one proposition in a component that survives a merge; everyone else in the component gets folded into it. Pulled out as a seam so a caller can plug in a different policy.

Link copied to clipboard
class EntityOverlapSignalScorer constructor(weight: Double = 1.0) : CollectorSignalScorer

Scores how much two propositions' entity mentions overlap, as Jaccard similarity of their stable mention ids.

Link copied to clipboard
class GroundingOverlapSignalScorer constructor(weight: Double = 0.5) : CollectorSignalScorer

Scores how much two propositions' grounding chunk ids overlap, as Jaccard similarity. Two propositions extracted from the same source chunks are more likely restating the same fact.

Link copied to clipboard
class LexicalSignalScorer constructor(weight: Double = 0.5) : CollectorSignalScorer

Scores how similar two propositions' surface text is, using Commons Text's Jaro-Winkler similarity.

Link copied to clipboard
class MultiSignalCollectorStrategy(pairSources: List<CandidatePairSource>, scorers: List<CollectorSignalScorer>, componentsFinder: ConnectedComponentsFinder, traceStore: CollectorTraceStore, survivorPolicy: CollectorSurvivorPolicy = defaultCollectorSurvivorPolicy, matchThreshold: Double = 0.6) : RunAwareCollectorStrategy

Composes any number of candidate-pair sources and signal scorers into one duplicate-collapse strategy, replacing the single-cosine cut in com.embabel.dice.projection.memory.DuplicateCollectorStrategy with a pluggable multi-signal blend.

Link copied to clipboard

Vetoes a merge when two propositions share an entity but assert opposite polarity about it — one states something, the other negates it ("works at Acme" vs "no longer works at Acme" / "left Acme").

Link copied to clipboard
class ProvenanceOverlapSignalScorer constructor(weight: Double = 0.5) : CollectorSignalScorer

Scores how much two propositions' rich provenance overlaps, as Jaccard similarity of their com.embabel.dice.provenance.SourceLocators. Locators compare by structural equality, so this catches "same source material" even when grounding chunk ids differ or are absent.

Link copied to clipboard
class VectorCandidatePairSource(repository: PropositionRepository, similarityThreshold: Double = 0.7, topK: Int = 10) : CandidatePairSource

Proposes candidate pairs from the repository's own vector clustering, the same recall path com.embabel.dice.projection.memory.DuplicateCollectorStrategy uses today.

Link copied to clipboard
class VectorSignalScorer constructor(weight: Double = 1.0) : CollectorSignalScorer

Turns the cosine similarity a VectorCandidatePairSource already computed into a signal score, without re-embedding anything.

Properties

Link copied to clipboard

Default CollectorSurvivorPolicy: highest effective confidence, then reinforcement count, then stable id, so a full tie is still deterministic.