Skip to content

Commit

Permalink
SGS does not do fill()
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Dec 3, 2024
1 parent 5ce3233 commit 5de8c11
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion buildingmotif/ingresses/semantic_graph_synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ def graph(self, ns: Namespace) -> Graph:
# if the evaluation returns a Template, we need to mint new URIs in the given namespace
# for any unbound parameters. If it returns a Graph, we can just add it to the output.
if isinstance(ev, Template):
_, graph = ev.fill(ns)
# remove all triples where either the subject or object is in the PARAM namespace
for s, p, o in ev.body:
if str(s).startswith(str(ns.PARAM)) or str(o).startswith(str(ns.PARAM)):
ev.body.remove((s, p, o))
graph = ev.body
else:
graph = ev
logger.info(f"Adding graph with {len(graph)} triples to output")
Expand Down

0 comments on commit 5de8c11

Please sign in to comment.