Skip to main content
Version: 0.0.5 (stable)

agrag.candidates

Review extraction candidates and prepare schema patches.

Modules:

  • errors – Errors raised by candidate review operations.
  • patch – Plan and serialize deterministic candidate schema patches.
  • review – List and change the review state of candidate groups.
  • search – Word search over pending and approved candidates.

Classes:

  • ApprovalResult – Report approvals and the patch built from them.
  • CandidateQuery – Filter candidate groups by kind, label, state, and total sightings.
  • PatchNotAppliedError – The active schema does not contain every change in a patch.
  • PruneReport – Report groups matched and deleted by a prune operation.
  • ReviewOutcome – Report candidate groups moved and groups that could not be moved.
  • SchemaPatch – A deterministic schema change set and its approved candidate ids.

Functions:

  • approve_candidates – Approve resolvable candidates and plan a deterministic schema patch.
  • candidate_patch – Build a patch from approved candidate records in the graph.
  • list_candidates – List candidate groups, ordered and paged by aggregate sightings.
  • prune_candidates – Count or delete groups matching the selected prune criteria.
  • read_patch – Read a JSON file and validate it as a schema patch.
  • reject_candidates – Reject selected candidate groups and retain them as suppression records.
  • search_candidates – Find candidates whose label or text holds any word of the query.
  • write_patch – Write the patch as indented JSON, refusing replacement by default.