entity

package
v1.4.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package entity provides a detector-agnostic canonical representation of PII entities for use by the semantic enricher and placeholder renderer. This abstraction allows the enrichment pipeline to work with either the current custom detector or a future Presidio adapter.

Index

Constants

View Source
const (
	SourceCustom   = "custom"
	SourcePresidio = "presidio"
)

Source identifies the detector that produced the entity.

Variables

This section is empty.

Functions

This section is empty.

Types

type CanonicalEntity

type CanonicalEntity struct {
	Id          int               `json:"id"`
	Type        string            `json:"type"`
	Raw         string            `json:"raw"`
	Start       int               `json:"start"`
	End         int               `json:"end"`
	Source      string            `json:"source"`
	Confidence  float64           `json:"confidence"`
	Sensitivity int               `json:"sensitivity"` // 1-3 from recognizer; used for overlap resolution
	Attributes  map[string]string `json:"attributes,omitempty"`
}

CanonicalEntity is a detector-agnostic PII entity used by the enrichment pipeline and renderer. Attributes are filled by the semantic enricher and governed by Rego policy before rendering.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL