I want to check for isomorphism across subgraphs in a larger dataset. Is there a way to do this in rdflib without breaking the graph into multiple variables, like in the example from rdflib docs:
g1 = Graph().parse(format='n3', data='''
@prefix : <http://example.org/ns#> .
[]:rel <http://example.org/a> ;
:rel <http://example.org/b> ;
:rel [ :label "A bnode." ] .
''')
g2 = Graph().parse(format='n3', data='''
@prefix ns: <http://example.org/ns#> .
[]:rel <http://example.org/a> ;
:rel <http://example.org/b> ;
:rel [ :label "A bnode." ] .
''')
isomorphic(g1, g2)
my graph
[]:rel <http://example.org/a> ;
:rel <http://example.org/b> ;
:rel [ :label "A bnode." ] .
[]:rel <http://example.org/a> ;
:rel <http://example.org/c> ;
:rel [ :label "A bnode." ] .
[]:rel <http://example.org/a> ;
:rel <http://example.org/b> ;
:rel [ :label "A bnode." ] .
Thanks for any help!