Skip to content

Add entity linking and co-reference resolution #6

Description

@jzonthemtn

Summary

PhEye detects entity spans but does not link them. For example, "Dr. Smith" and "John Smith" in the same document are treated as independent detections with no indication they refer to the same entity.

Proposal

Add co-reference resolution:

  • Cluster mentions that refer to the same real-world entity within a document
  • Assign a stable entity ID to each cluster
  • Expose clusters in the API response alongside span detections

This enables consistent pseudonymization downstream and improves redaction completeness.

Acceptance Criteria

  • PhEye resolves co-references (e.g., "John Smith... he... the patient") to the same entity
  • Entity linking connects detected entities to canonical identifiers where possible
  • Improves downstream redaction consistency (all references to the same person are redacted)
  • Tests cover pronoun resolution and entity linking on representative documents
  • Accuracy benchmarked with Philter Scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions