diff --git a/trustgraph-flow/trustgraph/extract/kg/definitions/extract.py b/trustgraph-flow/trustgraph/extract/kg/definitions/extract.py index 2693e456..8512352b 100755 --- a/trustgraph-flow/trustgraph/extract/kg/definitions/extract.py +++ b/trustgraph-flow/trustgraph/extract/kg/definitions/extract.py @@ -161,12 +161,17 @@ class Processor(FlowProcessor): o=Value(value=v.metadata.id, is_uri=True) )) - ec = EntityContext( + # Output entity name as context for direct name matching + entities.append(EntityContext( + entity=s_value, + context=s, + )) + + # Output definition as context for semantic matching + entities.append(EntityContext( entity=s_value, context=defn["definition"], - ) - - entities.append(ec) + )) if triples: await self.emit_triples(