Skip to main content

map_to_canonical_relation

Function map_to_canonical_relation 

Source
pub fn map_to_canonical_relation(s: &str) -> String
Expand description

Maps an arbitrary relation label to its canonical form, never producing a non-canonical value (GAP-SG-48).

Relation handling used to be inconsistent: non-canonical relations were accepted raw (with only a WARN) while non-canonical entity types were rejected outright. This unifies the policy — extraction never persists a label outside the canonical vocabulary. Known aliases are rewritten via a fixed table; values that are already canonical pass through unchanged; anything else falls back to the generic related.

Alias table (mirrors the project’s canonical relation map): adds/createscauses, implementssupports, blockscontradicts, tested_byrelated, part_ofapplies_to.