I am looking to transform data from a NoSQL database into RDF using pyLD. This is a snippet of the code:
doc = {
'http://example.com': 'test',
'http://purl.org/net/something#isGiven':'dose'}
context = {
'dose':{'@id':'http://purl.org/net/something#isGiven','@type':'@id'}
}
norm = jsonld.normalize(
doc,{'algorithm': 'URDNA2015', 'format': 'application/nquads'})
print norm
This is the output generated:
_:c14n0 <http://example.com> "test" .
_:c14n0 <http://purl.org/net/something#isGiven> "dose" .
So the key of JSON becomes the property and the value the object. Now, how does one assert the subject?
I'd like my output to be:
<http://example.com/person> <http://example.com> "test" .
<http://example.com/person> <http://purl.org/net/something#isGiven> "dose" .