Ir para o conteúdo

Overview

package wittgenstein_entity_resolution

Wittgenstein Entity Resolution Library.

Deduplicates profiles and resolves conflicts across different datasets.

Classes

  • ResolvedRecord — Pydantic model representing a merged, unified record containingresolved conflicts.

  • DuplicateCandidate — Pydantic model representing a match candidate with a calculated similarity score.

  • EntityMatcher — Matches attributes of two entities to decide if they are candidate duplicates.

  • EntityResolver — Orchestrates deduplication and merges field records according to rule-based confidence strategies.

wittgenstein_entity_resolution.ResolvedRecord

mkapi_definition_mkapi class ResolvedRecord()

Bases : BaseModel

Pydantic model representing a merged, unified record containingresolved conflicts.

wittgenstein_entity_resolution.DuplicateCandidate

mkapi_definition_mkapi class DuplicateCandidate()

Bases : BaseModel

Pydantic model representing a match candidate with a calculated similarity score.

wittgenstein_entity_resolution.EntityMatcher

mkapi_definition_mkapi class EntityMatcher(thresholds: Dict[str, float] = None)

Matches attributes of two entities to decide if they are candidate duplicates.

Methods

  • string_similarity — Calculate basic sequence matcher similarity ratio between two strings.

  • find_match — Compare fields of two records and calculate a duplicate match score.

wittgenstein_entity_resolution.EntityMatcher.string_similarity

mkapi_definition_mkapi method EntityMatcher.string_similarity(s1: str, s2: str) → float

Calculate basic sequence matcher similarity ratio between two strings.

wittgenstein_entity_resolution.EntityMatcher.find_match

mkapi_definition_mkapi method EntityMatcher.find_match(primary: Dict[str, Any], candidate: Dict[str, Any]) → Optional[DuplicateCandidate]

Compare fields of two records and calculate a duplicate match score.

wittgenstein_entity_resolution.EntityResolver

mkapi_definition_mkapi class EntityResolver(trust_source_priority: List[str] = None)

Orchestrates deduplication and merges field records according to rule-based confidence strategies.

Methods

  • merge_records — Merge multiple source records into a single resolved record.

wittgenstein_entity_resolution.EntityResolver.merge_records

mkapi_definition_mkapi method EntityResolver.merge_records(records: List[Dict[str, Any]]) → ResolvedRecord

Merge multiple source records into a single resolved record.

Uses trust priority and non-empty rules to resolve attribute conflicts.

Raises

  • ValueError