mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 00:16:23 +02:00
Output the entity term as well as its definition as entity contexts
This commit is contained in:
parent
8574861196
commit
a2ef2b8659
1 changed files with 9 additions and 4 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue