From ef3ec92344b6506694fedcbc95ff57cf6dd45bd5 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Mon, 21 Jul 2025 11:47:50 +0100 Subject: [PATCH] Fix missing metadata --- trustgraph-flow/trustgraph/extract/kg/agent/extract.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trustgraph-flow/trustgraph/extract/kg/agent/extract.py b/trustgraph-flow/trustgraph/extract/kg/agent/extract.py index 114e91f3..97443443 100644 --- a/trustgraph-flow/trustgraph/extract/kg/agent/extract.py +++ b/trustgraph-flow/trustgraph/extract/kg/agent/extract.py @@ -179,6 +179,10 @@ class Processor(FlowProcessor): extraction_data, v.metadata ) + # Put document metadata into triples + for t in v.metadata.metadata: + triples.append(t) + for tpl in triples: print("TRIPLE>>>", tpl.s, tpl.p, tpl.o) @@ -204,7 +208,7 @@ class Processor(FlowProcessor): """Process combined extraction data to generate triples and entity contexts""" triples = [] entity_contexts = [] - + # Process definitions for defn in data.get("definitions", []):