Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
?inter rdf:rest*/rdf:first ?node.
{
BIND (brick:hasTag as ?p)
?node owl:onProperty ?p.
?node owl:hasValue ?o.
} UNION {
BIND (brick:measures as ?p)
?node owl:onProperty ?p.
?node owl:hasValue ?o.
}
}""")
class2tag = defaultdict(set)
for (cname, p, o, rest) in res:
cname = cname.split('#')[1]
o = o.split('#')[1]
if p == BRICK.hasTag:
class2tag[cname].add(o)
for cname, tagset in class2tag.items():
self.lookup[tuple(tagset)].add(cname)