Output the entity term as well as its definition as entity contexts (#629)

This commit is contained in:
cybermaggedon 2026-02-09 15:18:05 +00:00 committed by GitHub
parent 8574861196
commit 4fca97d555
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -161,12 +161,17 @@ class Processor(FlowProcessor):
o=Term(type=IRI, iri=v.metadata.id) 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, entity=s_value,
context=defn["definition"], context=defn["definition"],
) ))
entities.append(ec)
if triples: if triples:
await self.emit_triples( await self.emit_triples(