API reference

denselinkage exposes a curated, two-tier surface. The shape of the import is the documentation: the top level is the orchestration entry points, the submodules are the pluggable adapters, and denselinkage.core is the frozen contract they all share.

The prelude — denselinkage

The symbols a typical script needs, importable straight from the package root:

from denselinkage import DenseLinker, Source, TemplateSerializer

Symbol

Kind

Documented in

DenseLinker

orchestration config

Orchestration

LinkageIndex

prepared state

Orchestration

Source

input value object

Contract

LinkageResult

output

Contract

ClusteringResult

output

Contract

LabeledPairs

ground truth

Contract

LinkageMetrics

report

Metrics

BlockingMetrics

report

Metrics

ClusteringMetrics

report

Metrics

TemplateSerializer

reference serializer

Components

FieldwiseSerializer

reference serializer

Components

WholeRowSerializer

reference serializer

Components

connected_components()

convenience function

Components

candidate_pairs_from_frame()

convenience function

Orchestration

Capability submodules

The pluggable adapters live in their own modules, imported only when you reach past the defaults — one module per pipeline stage:

from denselinkage.embedding import SentenceTransformerEmbedder
from denselinkage.matching import LangChainMatcher

serializing · embedding · indexing · blocking · filtering · matching · clustering · metrics — all reference adapters are catalogued under Components and Metrics.

The contract — denselinkage.core

The ports, models, results, and errors every adapter shares. You import from here when writing a component rather than using one:

from denselinkage.core.ports import Embedder, Serializer

See Contract for the full port set and the custom components guide for how to implement one.