Documentation
¶
Overview ¶
Package locsh is the reference enrichment provider: it reconciles a Work's uncontrolled tags (feed genres, approved folksonomy) against Library of Congress Subject Headings via the public id.loc.gov suggest2 API, yielding controlled-subject candidates with label-match confidence. It demonstrates the Enricher shape for network reconciliation sources; deployments choose queue (moderated) or direct (auto-approve) execution.
Index ¶
Constants ¶
const Name = "locsh"
Name is the enricher's registry key and enrichment-graph name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enricher ¶
type Enricher struct {
// BaseURL overrides the id.loc.gov root (tests). Default production.
BaseURL string
// Client overrides the HTTP client. Default http.DefaultClient.
Client *http.Client
// MinConfidence drops weaker matches. Default 0.9 (exact label only).
MinConfidence float64
}
Enricher reconciles tags against id.loc.gov.
func (*Enricher) Enrich ¶
func (e *Enricher) Enrich(ctx context.Context, works []ingest.WorkSummary) ([]ingest.Enrichment, error)
Enrich implements ingest.Enricher: each distinct tag is looked up once per run (a shared cache across the batch), and matches at or above MinConfidence become subject candidates on every Work carrying the tag.