Skip to main content

Module heuristic

Module heuristic 

Source

Functions§

extract_candidate_triples
Extract candidate (subject, relation, object) triples from prose. Runs the heuristic pipeline: entity detection, relation labeling, co-occurrence scoring, and confidence calculation.
extract_entities
Extract entities from a sentence using capitalization + pronoun linking + alias resolution.
normalize_relation
Normalize a relation type against an optional caller-supplied ontology. If the relation is in the ontology map, return the mapped value; otherwise return as-is.