diff --git a/trustgraph-flow/trustgraph/extract/kg/definitions/extract.py b/trustgraph-flow/trustgraph/extract/kg/definitions/extract.py index 9cf87e9a..9d289e2d 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=Term(type=IRI, iri=v.metadata.id) )) - 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(