mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-28 09:56:22 +02:00
Output the entity term as well as its definition as entity contexts (#630)
This commit is contained in:
parent
202d80f6b8
commit
19a83d9335
1 changed files with 9 additions and 4 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue